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>
Strongly connected component (SCC) of a graph.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intThe Tarjan's algorithm is such that this index constitutes the reverse topological order of the topological sort of the SCC DAG. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAllMethods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Field Details
-
index
public final int indexThe 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.
-
-
Constructor Details
-
SCC
public SCC(int index)
-
-
Method Details
-
iterator
-
size
public int size()- Specified by:
sizein interfaceCollection<N>- Specified by:
sizein interfaceSet<N>- Specified by:
sizein classAbstractCollection<N>
-