GraphCrawler<T extends Object> class Null safety

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(Edges<T> edges)

Properties

edges Edges<T>
Function returning an Iterable<T> representing edge vertices. [...]
final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

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 non-existent method or property is accessed. [...]
inherited
path(T start, T target) List<T>
Returns the shortest detected path from start to target. [...]
paths(T start, T target) List<List<T>>
Returns a list containing all paths connecting start and target.
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