V
 the vertex type.E
 the edge type.public class HawickJamesSimpleCycles<V,E> extends Object implements DirectedSimpleCycles<V,E>
See:
K. A. Hawick, H. A. James. Enumerating Circuits and Loops in Graphs with SelfArcs and
MultipleArcs. Computational Science Technical Note CSTN013, 2008
Constructor and Description 

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

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

Modifier and Type  Method and Description 

long 
countSimpleCycles()
Count the number of simple cycles.

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 
printSimpleCycles()
Print to the standard output all simple cycles without building a list to keep them, thus
avoiding high memory consumption when investigating large and much connected graphs.

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

public HawickJamesSimpleCycles()
public HawickJamesSimpleCycles(DirectedGraph<V,E> graph) throws IllegalArgumentException
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) throws IllegalArgumentException
setGraph
in interface DirectedSimpleCycles<V,E>
graph
 the graph.IllegalArgumentException
 if the argument is null
.public List<List<V>> findSimpleCycles() throws IllegalArgumentException
findSimpleCycles
in interface DirectedSimpleCycles<V,E>
null
.IllegalArgumentException
 if the current graph is null.public void printSimpleCycles()
public long countSimpleCycles()
Copyright © 2017. All rights reserved.