|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.layout.hierarchic.BFSLayerer
Layerer that uses a breadth first search to assign layers to the nodes.
The nodes of the first layer can be freely chosen (see BFSLayerer.CORE_NODES
).
The nodes belonging to a subsequent layer are determined as follows:
Add all yet unassigned nodes to the new layer that are connected to nodes
already assigned.
As a consequence all connected nodes will be at most one layer apart. Also, edges between nodes that belong to the same layer are possible.
Field Summary | |
static Object |
CORE_NODES
The data provider key used to look up the core nodes of the bfs layering. |
Constructor Summary | |
BFSLayerer()
|
Method Summary | |
int |
assignNodeLayer(LayoutGraph graph,
NodeMap layer,
EdgeList reversedEdges)
This method assigns the nodes in the graph to layers. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final Object CORE_NODES
If the are no nodes marked as core nodes then nodes with indegree 0 are considered to be core nodes.
Constructor Detail |
public BFSLayerer()
Method Detail |
public int assignNodeLayer(LayoutGraph graph, NodeMap layer, EdgeList reversedEdges)
Postcondition: Forall (v,w) in E: layer(v) < layer(w) !
assignNodeLayer
in interface Layerer
graph
- the graph for which the layers are determined.layer
- here the layers are storedreversedEdges
- here the edges are stored which had been reversed.
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |