Walkable<E>.undirected constructor

Walkable<E>.undirected(
  1. Set<(E, E)> edges
)

Creates a walkable with an undirected graph topology.

Each edge in the undirected walkable is bidirectional, i.e. if a is a successor of b, then b is a successor of a.

Example

final walkable = Walkable.undirected([
  ('a', 'b'),
  ('b', 'c'),
]);
print(walkable.successors('a')); // ['b']
print(walkable.successors('b')); // ['a', 'c']
print(walkable.successors('c')); // ['b']

Implementation

factory Walkable.undirected(Set<(E, E)> edges) = _UndirectedWalkable<E>;