diff options
author | Arnur Nigmetov <a.nigmetov@gmail.com> | 2018-05-15 22:50:19 +0200 |
---|---|---|
committer | Arnur Nigmetov <a.nigmetov@gmail.com> | 2018-05-15 22:50:19 +0200 |
commit | 01be01effedfe7b0a635d562ec5fe653abcf911d (patch) | |
tree | 65a0a73e307d6209e0a31f851317e35e668dcb6c | |
parent | a5454ea066a0b148c9f423fc8862e26aae79eefe (diff) |
Fixed iterator arithmetic for small diags
-rw-r--r-- | geom_matching/wasserstein/include/dnn/local/kd-tree.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<T>::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)); } } |