Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weighted Sample Elimination uses cyHeap but PointCloud doesn't. #19

Open
graphitemaster opened this issue Jun 6, 2022 · 1 comment
Open

Comments

@graphitemaster
Copy link

I find it a bit strange that there is an implementation of a generic heap data structure for the weighted sample elimination algorithm but the point cloud data structure used for nearest neighbor searches uses the standard C++ <algorithm> provided make_heap, push_heap, and pop_heap functions. It's especially strange (to me) since the commit that introduced the weighted sample elimination also introduced this max heap data structure. I assume the intent was to use it for both algorithms.

With some local testing here, converting the point cloud data structure to using cyHeap by creating a side-channel heap structure is slightly faster than using the standard C++ max heap algorithms in <algorithm>.

@cemyuksel
Copy link
Owner

I am surprised to hear this. The cy::Heap class was designed to allow random access and updates. I did not put much effort into optimizing it. I would expect the standard C++ max heap functions in <algorithm> to be better optimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants