toTreeFrom<K> method
Returns a Map representation of this graph from roots
.
Implementation
Map<K, dynamic> toTreeFrom<K>(List<T> roots,
{K Function(T value)? keyCast,
bool sortByInputDependency = false,
bool bfs = false}) {
return GraphWalker<T>(
sortByInputDependency: sortByInputDependency, bfs: bfs)
.toTreeFrom<K>(roots,
nodeProvider: (s, v) => getNode(v),
outputsProvider: (s, n) => n._outputs);
}