|
Eclipse Draw2d 3.0.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.draw2d.internal.graph.GraphUtilities
Some utility methods for graphs.
Constructor Summary | |
GraphUtilities()
|
Method Summary | |
static boolean |
isCyclic(DirectedGraph graph)
Returns true if the given graph contains at least one cycle. |
static boolean |
isCyclic(NodeList nodes)
Recursively removes leaf nodes from the list until there are no nodes remaining (acyclic) or there are no leaf nodes but the list is not empty (cyclic), then returns the result. |
static int |
numberOfCrossingsInGraph(DirectedGraph graph)
Counts the number of edge crossings in a DirectedGraph |
static int |
numberOfCrossingsInRank(Rank rank)
Counts the number of edge crossings in a Rank |
static boolean |
willCauseCycle(Node source,
Node target)
Returns true if adding an edge between the 2 given nodes will introduce a
cycle in the containing graph. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GraphUtilities()
Method Detail |
public static boolean isCyclic(DirectedGraph graph)
true
if the given graph contains at least one cycle.
graph
- the graph to test
public static boolean isCyclic(NodeList nodes)
nodes
- the list of nodes to test
public static int numberOfCrossingsInGraph(DirectedGraph graph)
graph
- the graph whose crossed edges are counted
public static int numberOfCrossingsInRank(Rank rank)
rank
- the rank whose crossed edges are counted
public static boolean willCauseCycle(Node source, Node target)
true
if adding an edge between the 2 given nodes will introduce a
cycle in the containing graph.
source
- the potential source nodetarget
- the potential target node
|
Eclipse Draw2d 3.0.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |