Commit 8eb083f4 authored by Yoann Dufresne's avatar Yoann Dufresne

add third sorting critera

parent eeab1f7a
......@@ -65,7 +65,8 @@ class Optimizer:
def node_sorting_value(node):
u = opt.d2g.node_by_idx[int(node)]
return (0 if len(Counter(opt.d2g.get_covering_variable_node(int(node))) - coverage) == 0 else 1,
- u.get_link_divergence())
- u.get_link_divergence(),
self.d2g[str(u.idx)][str(current_node)]["distance"])
neighbors.sort(key=node_sorting_value)
stack.append(neighbors)
......
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