V
 the vertex type.E
 the edge type.public class JohnsonSimpleCycles<V,E> extends Object implements DirectedSimpleCycles<V,E>
See:
D.B.Johnson, Finding all the elementary circuits of a directed graph, SIAM J. Comput., 4 (1975),
pp. 7784.
Constructor and Description 

JohnsonSimpleCycles()
Create a simple cycle finder with an unspecified graph.

JohnsonSimpleCycles(DirectedGraph<V,E> graph)
Create a simple cycle finder for the specified graph.

Modifier and Type  Method and Description 

List<List<V>> 
findSimpleCycles()
Finds the simple cycles of the graph.
Note that the full algorithm is executed on every call since the graph may have changed between calls. 
DirectedGraph<V,E> 
getGraph()
Returns the graph on which the simple cycle search algorithm is executed by this object.

void 
setGraph(DirectedGraph<V,E> graph)
Sets the graph on which the simple cycle search algorithm is executed by this object.

public JohnsonSimpleCycles()
public JohnsonSimpleCycles(DirectedGraph<V,E> graph)
graph
  the DirectedGraph in which to find cycles.IllegalArgumentException
 if the graph argument is
null
.public DirectedGraph<V,E> getGraph()
getGraph
in interface DirectedSimpleCycles<V,E>
public void setGraph(DirectedGraph<V,E> graph)
setGraph
in interface DirectedSimpleCycles<V,E>
graph
 the graph.public List<List<V>> findSimpleCycles()
findSimpleCycles
in interface DirectedSimpleCycles<V,E>
null
.Copyright © 2016. All rights reserved.