Package jenkins.util
Class DirectedGraph.SCC<N>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<N>
-
- jenkins.util.DirectedGraph.SCC<N>
-
- All Implemented Interfaces:
Iterable<N>
,Collection<N>
,Set<N>
- Enclosing class:
- DirectedGraph<N>
public static class DirectedGraph.SCC<N> extends AbstractSet<N>
Strongly connected component (SCC) of a graph.
-
-
Field Summary
Fields Modifier and Type Field Description int
index
The Tarjan's algorithm is such that this index constitutes the reverse topological order of the topological sort of the SCC DAG.
-
Constructor Summary
Constructors Constructor Description SCC(int index)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterator<N>
iterator()
int
size()
-
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
-
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
-
-
-
Field Detail
-
index
public final int index
The Tarjan's algorithm is such that this index constitutes the reverse topological order of the topological sort of the SCC DAG.That is, if you think about a derived graph where nodes are SCCs of the original directed graph, it will always form a DAG even when the original graph has cycles. Smallest SCC# means it's more of a sink, and larger SCC# means it's more of a source.
-
-