-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add spatial_hash
implementation
#8
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nahueespinosa
force-pushed
the
nahuel/voxel_hash
branch
2 times, most recently
from
November 5, 2022 22:06
e528efa
to
fd8e6c0
Compare
nahueespinosa
force-pushed
the
nahuel/voxel_hash
branch
from
November 6, 2022 15:17
fd8e6c0
to
1d99f9f
Compare
hidmic
reviewed
Nov 7, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nahueespinosa Awesome work as usual. Left some comments.
This LGTM if @camistolo is on board. |
nahueespinosa
changed the title
Add
Add Nov 11, 2022
voxel_hash
implementationspatial_hash
implementation
Alright, going in! |
nahueespinosa
force-pushed
the
nahuel/voxel_hash
branch
from
November 11, 2022 20:12
d188841
to
25c33fb
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For different parts of the algorithm we will need to mark particles that are close to each other with a cluster id. This is used in adaptive sampling to compute the KL-distance and it is also normally used in the estimation process, where they take the most likely cluster (by adding up the weights) and computing the mean and covariance of those samples.
One way of doing that is to discretize particle positions with respect to an user-defined cell size, and then compute a hash that represents that region of space. This is known as voxel hashing.
Here is a super simple implementation that takes a tuple of
doubles
and has the following properties after rounding the real values: