V
- the vertex type.E
- the edge type.public class PatonCycleBase<V,E> extends Object implements UndirectedCycleBase<V,E>
See:
K. Paton, An algorithm for finding a fundamental set of cycles for an undirected linear graph,
Comm. ACM 12 (1969), pp. 514-518.
Constructor and Description |
---|
PatonCycleBase()
Create a cycle base finder with an unspecified graph.
|
PatonCycleBase(UndirectedGraph<V,E> graph)
Create a cycle base finder for the specified graph.
|
Modifier and Type | Method and Description |
---|---|
List<List<V>> |
findCycleBase()
Finds a cycle base of the graph.
Note that the full algorithm is executed on every call since the graph may have changed between calls. |
UndirectedGraph<V,E> |
getGraph()
Returns the graph on which the cycle base search algorithm is executed by this object.
|
void |
setGraph(UndirectedGraph<V,E> graph)
Sets the graph on which the cycle base search algorithm is executed by this object.
|
public PatonCycleBase()
public PatonCycleBase(UndirectedGraph<V,E> graph)
graph
- - the DirectedGraph in which to find cycles.IllegalArgumentException
- if the graph argument is
null
.public UndirectedGraph<V,E> getGraph()
getGraph
in interface UndirectedCycleBase<V,E>
public void setGraph(UndirectedGraph<V,E> graph)
setGraph
in interface UndirectedCycleBase<V,E>
graph
- the graph.public List<List<V>> findCycleBase()
findCycleBase
in interface UndirectedCycleBase<V,E>
null
.Copyright © 2017. All rights reserved.