Skip to content

Fix/26 filter multimap breaking #30

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

Merged
merged 9 commits into from
Apr 15, 2022
Merged

Conversation

tzaeschke
Copy link
Owner

See issue #26.
Improve the API for PhTreeMultiMap. The current API expects filters that can filter nodes or entries.
The multimap uses collections ("buckets") at each coordinate to store multiple values.
As a result, the current implementation calls the filter once for every entry in every candidate bucket.
This is correct but inefficient.

Many filters will constrain on the coordinate (e.g. FilterSphere). It would be efficient if such a filter would be called only once per bucket, not once per entry in the bucket.

The new API enforces filters with three filter methods:

  • IsNodeValid(...) filters nodes.
  • IsEntryValid(...) filters buckets. It is called ...Entry... because each bucket is an entry in the internal PhTree.
  • IsBucketEntryValid(...) filters entries in buckets.

This change breaks the API.

@tzaeschke tzaeschke self-assigned this Apr 14, 2022
@tzaeschke tzaeschke force-pushed the fix/26-filter-multimap-breaking branch from 6fd05d6 to 853b750 Compare April 14, 2022 15:38
@tzaeschke tzaeschke merged commit 277ad87 into master Apr 15, 2022
@tzaeschke tzaeschke deleted the fix/26-filter-multimap-breaking branch April 15, 2022 10:01
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

Successfully merging this pull request may close these issues.

1 participant