Commit ca3ba6bc authored by Tiago Peixoto's avatar Tiago Peixoto

Fix bug in LayeredBlockState.get_edges_prob()

parent abfc17cf
...@@ -869,7 +869,8 @@ class LayeredBlockState(OverlapBlockState, BlockState): ...@@ -869,7 +869,8 @@ class LayeredBlockState(OverlapBlockState, BlockState):
try: try:
new_es = [] new_es = []
for u, v, l in missing: for i in range(len(missing)):
u, v, l = edge_list[i]
if not l[1]: if not l[1]:
state = self.agg_state state = self.agg_state
else: else:
...@@ -882,7 +883,8 @@ class LayeredBlockState(OverlapBlockState, BlockState): ...@@ -882,7 +883,8 @@ class LayeredBlockState(OverlapBlockState, BlockState):
new_es.append((e, l)) new_es.append((e, l))
old_es = [] old_es = []
for u, v, l in spurious: for i in range(len(spurious)):
u, v, l = edge_list[i + len(missing)]
if not l[1]: if not l[1]:
state = self.agg_state state = self.agg_state
es = state.g.edge(u, v, all_edges=True) es = state.g.edge(u, v, all_edges=True)
......
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