You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is closely related to the second item. I don't want to use the edge-weight for ordering. I want to give the ordering my self as an argument to build the tree.
OK I see, I plan to add this feature in the future interface. For the moment an easy way to do it is to use the ranks in your ordering as edge weights. E.g.
# complete graph with 3 verticesg=UndirectedGraph(3)
# the edges are (in order) {0,1}, {0, 2}, and {1,2}g.add_edges([0, 0, 1], [1, 2, 2])
# assume that we want to take edges in the following order {0,2} (rank 0), {1, 2} (rank 1) and {0,1} (rank 2)rank_weights= [2, 0, 1]
tree, altitudes=bpt_canonical(g, rank_weights)
Hello, Benjamin
I need to build a hierarchy from an arbitrary ordering of the graph edges.
Do you think this is relevant and could be merged into the main branch?
I will probably just make a function similar to the c++
bpt_canonical
but without theedge_weights
parameter and thestable_sort
call.Best,
The text was updated successfully, but these errors were encountered: