Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

Commit a51cc3f

Browse files
Merge branch 'jfransman-fix_heuristic_dfs'
2 parents 5d3a060 + 7d93fa3 commit a51cc3f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pydcop/computations_graph/pseudotree.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,8 @@ def _generate_dfs_tree(variables, relations, root=None):
350350
if root is None:
351351
# heuristic :
352352
# root = random.choice(variables)
353-
nodes.sort(key=lambda a: n.neighbors_count())
354-
root = nodes[0]
353+
nodes.sort(key=lambda n: n.neighbors_count())
354+
root = nodes[-1]
355355
else:
356356
for n in nodes:
357357
if n.variable == root:

0 commit comments

Comments
 (0)