Commit 3aeed259 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent b222b803
...@@ -267,9 +267,10 @@ def Restructure(ztree, newStructure): ...@@ -267,9 +267,10 @@ def Restructure(ztree, newStructure):
# assignments more efficiently taking that Av and Bv are key↑ and the # assignments more efficiently taking that Av and Bv are key↑ and the
# property of D function so that if B2 > B1 (all keys in B2 > all keys # property of D function so that if B2 > B1 (all keys in B2 > all keys
# in B1) and A < B1.hi, then D(B2, A) > D(B1, A). # in B1) and A < B1.hi, then D(B2, A) > D(B1, A).
print(C)
jv, iv = scipy.optimize.linear_sum_assignment(C) jv, iv = scipy.optimize.linear_sum_assignment(C)
for (j,i) in zip(jv, iv): for (j,i) in zip(jv, iv):
RNv[j].node.Z = RZv.node RNv[j].node.Z = RZv[i].node
# if N(old) > N(new) - some old nodes won't be linked to (it is ok) # if N(old) > N(new) - some old nodes won't be linked to (it is ok)
# if N(old) < N(new) - some new nodes won't be linked from - link them # if N(old) < N(new) - some new nodes won't be linked from - link them
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment