gert-spanning-tree
Finds rooted spanning trees of undirected Gert graphs
Usage
var Graph = Graph;var Spanning = ; var graph = directed: false vertices: 'a' 'b' 'c' 'd' edges: 'a' 'b' 'b' 'c' 'c' 'a' 'c' 'd' ; var spanningTree = ;spanningTree; // [['a', 'b'], ['a', 'c'], ['c', 'd']]
API
Spanning(graph, root, [depthFirst])
Returns a spanning tree of undirected Gert graph graph
rooted at vertex root
. If depthFirst
is true
then the vertices will be traversed depth-first rather than breadth-first.