Fix Epeck_d spatial searching compilation - #9570
Conversation
mglisse
left a comment
There was a problem hiding this comment.
This makes sense to me.
Note that it does not completely fix #9534: Fuzzy_iso_box.h uses an operation not guaranteed by the concept, so either that file or the concept needs to change, although that can be done in a separate PR, I don't care.
Hello @mglisse : What concept and what operation? |
See #9534 (comment) |
|
So let's undo the change to |
You mean what this PR is currently doing? Why? Since this iterator for this kernel can easily be made random access, it seems like a good idea to make it random access, whether users of the iterator need it or not. |
|
You are right. As this is model we know that it is random access. So all we have to do is to replace the minus by |
|
Thanks. Maintainer edits are already enabled on the PR. I can make the agreed std::distance() change myself, but if you were planning to push it directly, please let me know so we don't duplicate the work. @afabri |
|
@UtkarsHMer05 please go ahead. Best, Andreas |
|
@afabri Done, thanks. I kept the random-access iterator change and updated Fuzzy_iso_box to use std::distance(). I also revalidated the issue_9534 regression and all 17 Spatial Searching targets in both Release and Debug. |
Summary
Fixes Spatial Searching compilation failures when using
Epeck_d.Iterator_from_indicesalready implements the operations required by arandom-access iterator through
increment(),decrement(),advance(),and
distance_to(), but advertised only bidirectional traversal.This change:
operator[]returning the iterator reference type,avoiding the inherited Boost proxy result;
Epeck_d;Fuzzy_iso_box,Fuzzy_sphere, Kd-tree insertion, search,removal, and size verification.
The regression test is enabled when Eigen support is available.
Fixes #9534.
Validation
Validated from a clean worktree based on
public/maincommit10968626f93fca92bd0b2b934c2899819e732bb1.expected iterator/random-access compilation errors.
Epick_d,Epick_d_eigen,test_bbox_d,remove, andSplitterstests.tri2Debug test with 1,000 points.