-
Notifications
You must be signed in to change notification settings - Fork 39
Description
Very impressive library so far. Just wanted to mention here, unless I'm misreading your API docs, that the Graph object doesn't have an implementation of Prim's or Kruskal's minimum/maximum spanning tree. This is the last thing keeping me on e.g. scipy.sparse.csgraph, and was the first thing I looked for here.
Ideally, I would imagine a slightly more useful MST interface that e.g. defaults to the spanning tree for the whole graph, but could accept an array of node activation flags and an (optional) cost matrix to calculate the MST on that induced subgraph. This is part of a simple way to approximate the steiner tree on those nodes, for instance. If the user doesn't supply a cost matrix, then the metric closure would work (again, if desired...MST on the original graph weights is probably the default).
I did find these, but a number expressly say the tree is not minimal:
spanning_arborescencespanning_arborescence_kruskalrandom_spanning_arborescence_kruskal(very nice! Wilson's algorithm? Is this a uniform-random sample over unweighted trees? Is the MST the mode for weighted edges, like it normally would be?