public abstract class CycleDetectionAlgorithm extends Object
| Constructor and Description |
|---|
CycleDetectionAlgorithm(Graph graph)
Example constructor for the algorithm.
|
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
detectCycles()
Perform cycle detection on the entire graph.
|
abstract boolean |
detectCycles(Edge e)
Determine whether an individual edge is on a cycle.
|
abstract boolean |
detectCycles(Vertex v)
Determine whether an individual vertex is on a cycle.
|
abstract void |
findCycleSubgraph(Graph subgraph)
Find the subgraph of all cycles.
|
abstract void |
findCycleSubgraph(Graph subgraph,
Edge e)
Find the subgraph of all cycles which contain a particular edge.
|
abstract void |
findCycleSubgraph(Graph subgraph,
Vertex v)
Find the subgraph of all cycles which contain a particular vertex.
|
protected Graph m_graph
public CycleDetectionAlgorithm(Graph graph)
graph - the Graph on which to operatepublic abstract void findCycleSubgraph(Graph subgraph) throws Exception
subgraph - an output parameter which receives the subgraph of all
vertices and edges which participate in cycles; on entry, should be
emptyException - if subgraph.addEdge failspublic abstract void findCycleSubgraph(Graph subgraph, Vertex v) throws Exception
subgraph - an output parameter which receives the subgraph of
all vertices and edges which participate in cycles containing v; on
entry, should be emptyv - the vertex to testException - if subgraph.addEdge failspublic abstract void findCycleSubgraph(Graph subgraph, Edge e) throws Exception
subgraph - an output parameter which receives the subgraph of
all vertices and edges which participate in cycles containing e; on
entry, should be emptye - the edge to testException - if subgraph.addEdge failspublic abstract boolean detectCycles()
public abstract boolean detectCycles(Vertex v)
v - the vertex to testpublic abstract boolean detectCycles(Edge e)
e - the edge to testCopyright © 2019 JULIE Lab, Germany. All rights reserved.