Package com.jgalgo.alg.cycle
Class CyclesEnumeratorAbstract
java.lang.Object
com.jgalgo.alg.cycle.CyclesEnumeratorAbstract
- All Implemented Interfaces:
CyclesEnumerator
- Direct Known Subclasses:
CyclesEnumeratorJohnson
,CyclesEnumeratorTarjan
Abstract class for enumerating all simple cycles in a graph.
The class implements the interface by solving the problem on the index graph and then maps the results back to the original graph. The implementation for index graphs is abstract and left to the subclasses.
- Author:
- Barak Ugav
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncyclesIter
(Graph<V, E> g) Iterate over all cycles in the given graph.
-
Constructor Details
-
CyclesEnumeratorAbstract
public CyclesEnumeratorAbstract()Default constructor.
-
-
Method Details
-
cyclesIter
Description copied from interface:CyclesEnumerator
Iterate over all cycles in the given graph.If
g
isIntGraph
, the returned iterator will iterate overIPath
objects.- Specified by:
cyclesIter
in interfaceCyclesEnumerator
- Type Parameters:
V
- the vertices typeE
- the edges type- Parameters:
g
- a graph- Returns:
- an iterator that iteration over all cycles in the graph
-