From 01be01effedfe7b0a635d562ec5fe653abcf911d Mon Sep 17 00:00:00 2001 From: Arnur Nigmetov Date: Tue, 15 May 2018 22:50:19 +0200 Subject: Fixed iterator arithmetic for small diags --- geom_matching/wasserstein/include/dnn/local/kd-tree.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'geom_matching/wasserstein') diff --git a/geom_matching/wasserstein/include/dnn/local/kd-tree.hpp b/geom_matching/wasserstein/include/dnn/local/kd-tree.hpp index 3a4f0eb..bdeef45 100644 --- a/geom_matching/wasserstein/include/dnn/local/kd-tree.hpp +++ b/geom_matching/wasserstein/include/dnn/local/kd-tree.hpp @@ -101,7 +101,7 @@ hera::ws::dnn::KDTree::OrderTree size_t next_i = (i + 1) % traits.dimension(); // Replace with a size condition instead? - if (b < m - 1) q.push(KDTreeNode(b, m, next_i)); + if (m - b > 1) q.push(KDTreeNode(b, m, next_i)); if (e - m > 2) q.push(KDTreeNode(m+1, e, next_i)); } } -- cgit v1.2.3