|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.algo.Cycles
Reponsible for finding cycles within a graph that have certain properties.
Constructor Summary | |
Cycles()
|
Method Summary | |
static EdgeList |
findCycle(Graph graph,
boolean directed)
Returns an edge list that contains the edges of a cycle found in the given graph. |
static void |
findCycleEdges(Graph graph,
EdgeMap cycleEdges)
This method marks edges of a given graph whose removal or reversal would make that graph acyclic. |
static void |
findCycleEdgesDFS(Graph graph,
EdgeMap cycleEdges)
Like Cycles.findCycleEdges(Graph, EdgeMap) this method
edges of a given graph whose removal or reversal would make
that graph acyclic. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Cycles()
Method Detail |
public static void findCycleEdges(Graph graph, EdgeMap cycleEdges)
graph
- the input graphcycleEdges
- return value. cycleEdge.getBool(e) == true iff
e is a detected cycle edge.public static void findCycleEdgesDFS(Graph graph, EdgeMap cycleEdges)
Cycles.findCycleEdges(Graph, EdgeMap)
this method
edges of a given graph whose removal or reversal would make
that graph acyclic. The implementation of this method is
based on a Depth First Search. The number of marked cycle edges
is expected to be slightly larger than when using
Cycles.findCycleEdges(Graph, EdgeMap)
. The advantage of this method
is that the result set is more stable when edges get added or removed
over the time.
graph
- the input graphcycleEdges
- return value. cycleEdge.getBool(e) == true iff
e is a detected cycle edge.public static EdgeList findCycle(Graph graph, boolean directed)
If the returned cycle is empty then no cycle has been found in the given graph.
|
© 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 |