| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class | |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private final Set |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Set | |
| public boolean | |
| public Set | |
| public Map | |
| public Set | |
| private boolean | |
| public Set | |
| public void | |
| public Stream | |
| private boolean | |
| private boolean | pathExists(T u, T v, boolean includeAdjacent)
Returns true if there exists a path from u to v in this graph. |
| public void | |
| public Graph | |
| public Graph | |
| public void | |
| public String | |
| public Graph |
| edges | back to summary |
|---|---|
| private final Map<T, Set<T>> edges | |
| nodes | back to summary |
|---|---|
| private final Set<T> nodes | |
| Graph | back to summary |
|---|---|
| public Graph(Set<T> nodes, Map<T, Set<T>> edges) | |
| adjacentNodes | back to summary |
|---|---|
| public Set | |
| contains | back to summary |
|---|---|
| public boolean contains(T u) | |
| dfs | back to summary |
|---|---|
| public Set Returns all nodes reachable from the given set of roots. | |
| edges | back to summary |
|---|---|
| public Map | |
| edgesFrom | back to summary |
|---|---|
| public Set | |
| isAdjacent | back to summary |
|---|---|
| private boolean isAdjacent(T u, T v) | |
| nodes | back to summary |
|---|---|
| public Set | |
| ordered | back to summary |
|---|---|
| public void ordered(Consumer<T> action) Traverse this graph and performs the given action in topological order | |
| orderedNodes | back to summary |
|---|---|
| public Stream Returns nodes sorted in topological order. | |
| pathExists | back to summary |
|---|---|
| private boolean pathExists(T u, T v) | |
| pathExists | back to summary |
|---|---|
| private boolean pathExists(T u, T v, boolean includeAdjacent) Returns true if there exists a path from u to v in this graph. If includeAdjacent is false, it returns true if there exists another path from u to v of distance > 1 | |
| printGraph | back to summary |
|---|---|
| public void printGraph(PrintWriter out) | |
| reduce | back to summary |
|---|---|
| public Graph Returns a new Graph after transitive reduction | |
| reduce | back to summary |
|---|---|
| public Graph Returns a new Graph after transitive reduction. All edges in the given g takes precedence over this graph.
| |
| reverse | back to summary |
|---|---|
| public void reverse(Consumer<T> action) Traverses this graph and performs the given action in reverse topological order | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| transpose | back to summary |
|---|---|
| public Graph Returns a transposed graph from this graph | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Map | |
| pack-priv final Set |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | |
| public Graph |
| edges | back to summary |
|---|---|
| pack-priv final Map<T, Set<T>> edges | |
| nodes | back to summary |
|---|---|
| pack-priv final Set<T> nodes | |
| Builder | back to summary |
|---|---|
| pack-priv Builder() | |
| addEdge | back to summary |
|---|---|
| public void addEdge(T u, T v) | |
| addNode | back to summary |
|---|---|
| public void addNode(T node) | |
| addNodes | back to summary |
|---|---|
| public void addNodes(Set<T> nodes) | |
| build | back to summary |
|---|---|
| public Graph | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object o)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public int | |
| public String |
| Edge | back to summary |
|---|---|
| pack-priv Edge(T u, T v) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Graph | |
| pack-priv final Deque |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| private void | |
| private void |
| graph | back to summary |
|---|---|
| pack-priv final Graph<T> graph | |
| result | back to summary |
|---|---|
| pack-priv final Deque<T> result | |
| TopoSorter | back to summary |
|---|---|
| pack-priv TopoSorter(Graph<T> graph) | |
| ordered | back to summary |
|---|---|
| public void ordered(Consumer<T> action) | |
| reverse | back to summary |
|---|---|
| public void reverse(Consumer<T> action) | |
| sort | back to summary |
|---|---|
| private void sort() | |
| visit | back to summary |
|---|---|
| private void visit(T node, Set<T> visited, Set<T> done) | |