shortestPathsMatching method

Future<List<List<Node<T>>>> shortestPathsMatching(
  1. List<T> roots,
  2. NodeMatcher<T> targetMatcher, {
  3. bool findAll = true,
})

Returns the shortest paths from roots to Nodes matching targetMatcher.

Implementation

Future<List<List<Node<T>>>> shortestPathsMatching(
    List<T> roots, NodeMatcher<T> targetMatcher,
    {bool findAll = true}) async {
  var result =
      await scanPathsMatching(roots, targetMatcher, findAll: findAll);
  return result.paths.shortestPaths();
}