Package com.jgalgo.alg.closure
Class ClosuresEnumeratorAbstract
java.lang.Object
com.jgalgo.alg.closure.ClosuresEnumeratorAbstract
- All Implemented Interfaces:
ClosuresEnumerator
- Direct Known Subclasses:
ClosuresEnumeratorSchrageBaker
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
-
Method Summary
Modifier and TypeMethodDescriptionclosuresIter
(Graph<V, E> g) Iterate over all closures in the given graph.
-
Constructor Details
-
ClosuresEnumeratorAbstract
public ClosuresEnumeratorAbstract()Default constructor.
-
-
Method Details
-
closuresIter
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
-