GraphCrawler<T extends Object> class
Utility class for crawling a graph defined by edges and retrieving paths and walks.
- A directed path is defined as a list of connected vertices where each inner vertex is listed at most once. The first and the last vertex may be same in order to represent a cycle.
- A directed walk is defined as a list of connected vertices that can be traversed in sequential order.
Constructors
-
GraphCrawler.new(Edges<
T> edges)
Properties
Methods
-
mappedTree(
T start, [T? target]) → Map< T, List< Set< >T> > -
Returns a map containing all paths commencing at
start
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
path(
T start, T target) → List< T> -
Returns the shortest path from
start
totarget
. -
paths(
T start, T target) → List< List< T> > -
Returns a list containing all paths connecting
start
andtarget
. -
shortestPaths(
T start) → Map< T, Iterable< T> > -
Returns a map containing the shortest paths from
start
to each reachable vertex. The map keys represent the set of vertices reachable fromstart
. -
toString(
) → String -
A string representation of this object.
inherited
-
tree(
T start, [T? target]) → List< Set< T> > -
Returns a tree-like structure with
start
as root vertex.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited