V
- the vertex type.E
- the edge type.public class TarjanSimpleCycles<V,E> extends Object implements DirectedSimpleCycles<V,E>
See:
R. Tarjan, Enumeration of the elementary circuits of a directed graph, SIAM J. Comput., 2 (1973),
pp. 211-216.
Constructor and Description |
---|
TarjanSimpleCycles()
Create a simple cycle finder with an unspecified graph.
|
TarjanSimpleCycles(Graph<V,E> graph)
Create a simple cycle finder for the specified graph.
|
Modifier and Type | Method and Description |
---|---|
List<List<V>> |
findSimpleCycles()
Find the simple cycles of the graph.
|
Graph<V,E> |
getGraph()
Get the graph
|
void |
setGraph(Graph<V,E> graph)
Set the graph
|
public TarjanSimpleCycles()
public TarjanSimpleCycles(Graph<V,E> graph)
graph
- - the DirectedGraph in which to find cycles.IllegalArgumentException
- if the graph argument is
null
.public List<List<V>> findSimpleCycles()
findSimpleCycles
in interface DirectedSimpleCycles<V,E>
null
.Copyright © 2019. All rights reserved.