From 008fb6dd5608c1874c50be757399f3a3c55d3651 Mon Sep 17 00:00:00 2001 From: JSDurand Date: Tue, 14 Mar 2023 23:40:31 +0800 Subject: fix counting Previously I counted comparisons when there were no comparisons. --- src/incremental.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/incremental.rs b/src/incremental.rs index 3f853bf..3f55216 100644 --- a/src/incremental.rs +++ b/src/incremental.rs @@ -160,8 +160,6 @@ fn smi_step( }; if let Some(cand) = to_compare { - *count += 1; - let acand = a.get(cand).unwrap(); let a_assoc = a.get(assoc).unwrap(); @@ -179,6 +177,8 @@ fn smi_step( continue; } + *count += 1; + add_edge(graph.borrow_mut(), cand, assoc); match acand.partial_cmp(a_assoc) { -- cgit v1.2.3-18-g5258