Package com.jgalgo.alg.cycle
Class CyclesEnumeratorAbstract
- java.lang.Object
-
- com.jgalgo.alg.cycle.CyclesEnumeratorAbstract
-
- All Implemented Interfaces:
CyclesEnumerator
- Direct Known Subclasses:
CyclesEnumeratorJohnson
,CyclesEnumeratorTarjan
public abstract class CyclesEnumeratorAbstract extends Object implements CyclesEnumerator
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
Constructors Constructor Description CyclesEnumeratorAbstract()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <V,E>
Iterator<Path<V,E>>cyclesIter(Graph<V,E> g)
Iterate over all cycles in the given graph.
-
-
-
Method Detail
-
cyclesIter
public <V,E> Iterator<Path<V,E>> cyclesIter(Graph<V,E> g)
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
-
-