-
Notifications
You must be signed in to change notification settings - Fork 20
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
Several minor improvements #148
Open
nmellado
wants to merge
6
commits into
master
Choose a base branch
from
several_improvements
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
bd2f796
[fitting] Mark sphere parameters as protected + add ro accessors
nmellado bd7d1ca
[fitting] add accessor to mean curvature in algebraic sphere
nmellado 48cea2d
[tests] attempt to fix fit_line random failures
nmellado 5cb11da
[SpatialPartitioning] Prevent change of min_cell_size after construction
nmellado ff12255
[SpatialPartitioning] Add test for KdTree datastructure
nmellado 9f3efa8
[SpatialPartitioning] Add support for duplicated indices in KdTree
nmellado File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
@azaleostu I did this trick to stop the recursion when a node contains only several copies of the same point. Unfortunately it does not do the trick, and I cannot reproduce the segfault on my computer.
Could you please give it a try ?
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.
I am getting consistent segfaults when there are duplicates. I haven't been able the find the source yet but it looks like duplicate samples can break the node structure.
For example in some runs I have been getting the same node index being processed multiple times, even at different depths:
There also seems to be some corrupted data after the build, like empty leaves, inconsistent child indices, negative child indices, etc.
I'm still not sure where the issue might be but I think there could be some edge cases in the build algorithm when it comes to duplicates, I will try again when I can.
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.
Ok, i ran to similar inconsistent behaviors.
Something I found: the reallocation of the nodeContainer breaks (when the number of nodes goes larger than the preallocation) the structure: nodes copy fails, and nodes are inconsistently initialized as leaf or internal, intervals are lost, ...
What I don't get is: how is this related to duplicates ?!
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.
I'm also unsure since it seems like the algorithm should work with duplicates, I see that the node array alloc is based on
point_count()
instead ofsample_count()
, maybe changing this could at least fix the realloc issues?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.
The fix could work indeed.
But it does not solve the reallocation problem, we need to fix this..