Package com.jgalgo.alg.closure
Class ClosuresEnumeratorAbstract
- java.lang.Object
-
- com.jgalgo.alg.closure.ClosuresEnumeratorAbstract
-
- All Implemented Interfaces:
ClosuresEnumerator
- Direct Known Subclasses:
ClosuresEnumeratorSchrageBaker
public abstract class ClosuresEnumeratorAbstract extends Object implements ClosuresEnumerator
Abstract class for enumerating over all the closure subsets in a directed 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 ClosuresEnumeratorAbstract()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <V,E>
Iterator<Set<V>>closuresIter(Graph<V,E> g)
Iterate over all closures in the given graph.
-
-
-
Method Detail
-
closuresIter
public <V,E> Iterator<Set<V>> closuresIter(Graph<V,E> g)
Description copied from interface:ClosuresEnumerator
Iterate over all closures in the given graph.Given a directed graph \(G = (V, E)\), a closure is a subset of vertices \(C \subseteq V\) such that there are no edges from \(C\) to \(V \setminus C\). Although the empty set of vertices is considered a colure, it is not returned by this method.
If
g
isIntGraph
, the returned iterator will iterate overIntSet
objects.- Specified by:
closuresIter
in interfaceClosuresEnumerator
- Type Parameters:
V
- the vertices typeE
- the edges type- Parameters:
g
- a directed graph- Returns:
- an iterator that iteration over all closures in the graph
-
-