V - The vertex type.E - The edge type.public class JohnsonSimpleCycles<V extends Vertex,E extends Edge<V>>
extends java.lang.Object
| Constructor and Description |
|---|
JohnsonSimpleCycles()
Create a simple cycle finder with an unspecified graph.
|
JohnsonSimpleCycles(Graph<V,E> graph) |
JohnsonSimpleCycles(Graph<V,E> graph,
boolean stopWhenOneFound)
Create a simple cycle finder for the specified graph.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.util.List<V>> |
findSimpleCycles() |
public JohnsonSimpleCycles()
public JohnsonSimpleCycles(Graph<V,E> graph, boolean stopWhenOneFound)
stopWhenOneFound - Indicator if the algorithm should stop when as soon as one cycle is detectedgraph - A directed graph in which to find cycles.java.lang.IllegalArgumentException - if the graph argument is
null.public java.util.List<java.util.List<V>> findSimpleCycles()