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 Self-Arcs and
Multiple-Arcs. Computational Science Technical Note CSTN-013, 2008
Constructor and Description |
---|
HawickJamesSimpleCycles()
Create a simple cycle finder with an unspecified graph.
|
HawickJamesSimpleCycles(Graph<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()
Find the simple cycles of the graph.
|
Graph<V,E> |
getGraph()
Get the graph
|
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(Graph<V,E> graph)
Set the graph
|
public HawickJamesSimpleCycles()
public HawickJamesSimpleCycles(Graph<V,E> graph) throws IllegalArgumentException
graph
- the DirectedGraph in which to find cycles.IllegalArgumentException
- if the graph argument is
null
.public List<List<V>> findSimpleCycles() throws IllegalArgumentException
findSimpleCycles
in interface DirectedSimpleCycles<V,E>
null
.IllegalArgumentException
public void printSimpleCycles()
public long countSimpleCycles()
Copyright © 2018. All rights reserved.