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
Modifier and TypeFieldDescriptionfinal int
The Tarjan's algorithm is such that this index constitutes the reverse topological order of the topological sort of the SCC DAG. -
Constructor Summary
-
Method Summary
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 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:
size
in interfaceCollection<N>
- Specified by:
size
in interfaceSet<N>
- Specified by:
size
in classAbstractCollection<N>
-