public class CycleDetectionAlgorithmDFS extends CycleDetectionAlgorithm
m_graph| Constructor and Description |
|---|
CycleDetectionAlgorithmDFS(Graph graph) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
detectCycles()
Perform cycle detection on the entire graph.
|
boolean |
detectCycles(Edge e)
Determine whether an individual edge is on a cycle.
|
boolean |
detectCycles(Vertex v)
Determine whether an individual vertex is on a cycle.
|
void |
findCycleSubgraph(Graph subgraph)
Find the subgraph of all cycles.
|
void |
findCycleSubgraph(Graph subgraph,
Edge e)
Find the subgraph of all cycles which contain a particular edge.
|
void |
findCycleSubgraph(Graph subgraph,
Vertex v)
Find the subgraph of all cycles which contain a particular vertex.
|
public CycleDetectionAlgorithmDFS(Graph graph)
public void findCycleSubgraph(Graph subgraph) throws Exception
CycleDetectionAlgorithmfindCycleSubgraph in class CycleDetectionAlgorithmsubgraph - an output parameter which receives the subgraph of all
vertices and edges which participate in cycles; on entry, should be
emptyException - if subgraph.addEdge failsCycleDetectionAlgorithm.findCycleSubgraph(Graph)public void findCycleSubgraph(Graph subgraph, Vertex v) throws Exception
CycleDetectionAlgorithmfindCycleSubgraph in class CycleDetectionAlgorithmsubgraph - 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 failsCycleDetectionAlgorithm.findCycleSubgraph(Graph,Vertex)public void findCycleSubgraph(Graph subgraph, Edge e) throws Exception
CycleDetectionAlgorithmfindCycleSubgraph in class CycleDetectionAlgorithmsubgraph - 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 failsCycleDetectionAlgorithm.findCycleSubgraph(Graph,Edge)public boolean detectCycles()
CycleDetectionAlgorithmdetectCycles in class CycleDetectionAlgorithmCycleDetectionAlgorithm.detectCycles()public boolean detectCycles(Vertex v)
CycleDetectionAlgorithmdetectCycles in class CycleDetectionAlgorithmv - the vertex to testCycleDetectionAlgorithm.detectCycles(Vertex)public boolean detectCycles(Edge e)
CycleDetectionAlgorithmdetectCycles in class CycleDetectionAlgorithme - the edge to testCycleDetectionAlgorithm.detectCycles(Edge)Copyright © 2019 JULIE Lab, Germany. All rights reserved.