Attribute "rank"

Use:required
Used by:sub-graph
Description:Rank constraints on the nodes in a sub-graph.

If rank="same", all nodes are placed on the same rank. If rank="min", all nodes are placed on the minimum rank. If rank="source", all nodes are placed on the minimum rank, and the only nodes on the minimum rank belong to some sub-graph whose rank attribute is "source" or "min". Analogous criteria hold for rank="max" and rank="sink".

Note: the minimum rank is topmost or leftmost, and the maximum rank is bottommost or rightmost.
Values:"same", "min", "source", "max", "sink"
Default Value:same
Sponsored links:

Example 1/2:
Source code:
<graph file-name="graphs/rank1">
  
<cluster id="1" label="rank='same'">
  
<node id="a1" label="a"/>
<node id="b1" label="b"/>
<sub-graph rank="same">
  
<node id="c1" style="filled" label="c"/>
<node id="d1" style="filled" label="d"/>
</sub-graph>
<node id="e1" label="e"/>
<node id="f1" label="f"/>
<edge from="a1" to="b1"/>
<edge from="b1" to="c1"/>
<edge from="c1" to="d1"/>
<edge from="d1" to="e1"/>
<edge from="e1" to="f1"/>
</cluster>
<cluster id="2" label="rank='min'">
  
<node id="a2" label="a"/>
<node id="b2" label="b"/>
<sub-graph rank="min">
  
<node id="c2" style="filled" label="c"/>
<node id="d2" style="filled" label="d"/>
</sub-graph>
<node id="e2" label="e"/>
<node id="f2" label="f"/>
<edge from="a2" to="b2"/>
<edge from="b2" to="c2"/>
<edge from="c2" to="d2"/>
<edge from="d2" to="e2"/>
<edge from="e2" to="f2"/>
</cluster>
<cluster id="3" label="rank='source">
  
<node id="a3" label="a"/>
<node id="b3" label="b"/>
<sub-graph rank="source">
  
<node id="c3" style="filled" label="c"/>
<node id="d3" style="filled" label="d"/>
</sub-graph>
<node id="e3" label="e"/>
<node id="f3" label="f"/>
<edge from="a3" to="b3"/>
<edge from="b3" to="c3"/>
<edge from="c3" to="d3"/>
<edge from="d3" to="e3"/>
<edge from="e3" to="f3"/>
</cluster>
</graph>
Example 2/2:
Source code:
<graph file-name="graphs/rank2">
  
<cluster id="1" label="rank='max'">
  
<node id="a1" label="a"/>
<node id="b1" label="b"/>
<sub-graph rank="max">
  
<node id="c1" style="filled" label="c"/>
<node id="d1" style="filled" label="d"/>
</sub-graph>
<node id="e1" label="e"/>
<node id="f1" label="f"/>
<edge from="a1" to="b1"/>
<edge from="b1" to="c1"/>
<edge from="c1" to="d1"/>
<edge from="d1" to="e1"/>
<edge from="e1" to="f1"/>
</cluster>
<cluster id="2" label="rank='sink'">
  
<node id="a2" label="a"/>
<node id="b2" label="b"/>
<sub-graph rank="sink">
  
<node id="c2" style="filled" label="c"/>
<node id="d2" style="filled" label="d"/>
</sub-graph>
<node id="e2" label="e"/>
<node id="f2" label="f"/>
<edge from="a2" to="b2"/>
<edge from="b2" to="c2"/>
<edge from="c2" to="d2"/>
<edge from="d2" to="e2"/>
<edge from="e2" to="f2"/>
</cluster>
<cluster id="3" label="no rank\lconstraints\l">
  
<node id="a3" label="a"/>
<node id="b3" label="b"/>
<node id="c3" style="filled" label="c"/>
<node id="d3" style="filled" label="d"/>
<node id="e3" label="e"/>
<node id="f3" label="f"/>
<edge from="a3" to="b3"/>
<edge from="b3" to="c3"/>
<edge from="c3" to="d3"/>
<edge from="d3" to="e3"/>
<edge from="e3" to="f3"/>
</cluster>
</graph>
Sponsored links

 Copyright 2002-2010 by Martin Loetzsch (http://martin-loetzsch.de), all rights reserved. See the DotML licence for details.