Package org.jgrapht.alg.cycle
Interface UndirectedCycleBase<V,E>
-
- Type Parameters:
V
- the vertex type.E
- the edge type.
- All Known Implementing Classes:
PatonCycleBase
public interface UndirectedCycleBase<V,E>
A common interface for classes implementing algorithms for finding a cycle base of an undirected graph.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<java.util.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.
-
-
-
Method Detail
-
getGraph
UndirectedGraph<V,E> getGraph()
Returns the graph on which the cycle base search algorithm is executed by this object.- Returns:
- The graph.
-
setGraph
void setGraph(UndirectedGraph<V,E> graph)
Sets the graph on which the cycle base search algorithm is executed by this object.- Parameters:
graph
- the graph.- Throws:
java.lang.IllegalArgumentException
- if the argument isnull
.
-
findCycleBase
java.util.List<java.util.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.- Returns:
- A list of cycles constituting a cycle base for the graph. Possibly empty but never
null
. - Throws:
java.lang.IllegalArgumentException
- if the current graph is null.
-
-