public final class DaggerGraphs
extends java.lang.Object
com.google.common.graph types.| Modifier and Type | Method and Description |
|---|---|
static <N> com.google.common.collect.ImmutableList<N> |
shortestPath(com.google.common.graph.SuccessorsFunction<N> graph,
N nodeU,
N nodeV)
Returns a shortest path from
nodeU to nodeV in graph as a list of the
nodes visited in sequence, including both nodeU and nodeV. |
static <N> com.google.common.collect.ImmutableSet<N> |
unreachableNodes(com.google.common.graph.Graph<N> graph,
N node)
Returns the nodes in a graph that are not reachable from a node.
|
public static <N> com.google.common.collect.ImmutableList<N> shortestPath(com.google.common.graph.SuccessorsFunction<N> graph,
N nodeU,
N nodeV)
nodeU to nodeV in graph as a list of the
nodes visited in sequence, including both nodeU and nodeV. (Note that there may
be many possible shortest paths.)
If nodeV is not reachable
from nodeU, the list returned is empty.
java.lang.IllegalArgumentException - if nodeU or nodeV is not present in graphpublic static <N> com.google.common.collect.ImmutableSet<N> unreachableNodes(com.google.common.graph.Graph<N> graph,
N node)