-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Light Cell Geometry #1499
Light Cell Geometry #1499
Conversation
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.
nice PR. Couple of comments..
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.
Thanks for the PR! Besides the indentation issues, I have some questions about bitwise operations and an unknown random
function 😉
Co-authored-by: David Coeurjolly <[email protected]> Co-authored-by: rolanddenis <[email protected]>
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.
Thanks for the update, some minor requested changes 👌
Co-authored-by: rolanddenis <[email protected]>
Co-authored-by: rolanddenis <[email protected]>
Co-authored-by: rolanddenis <[email protected]>
Co-authored-by: rolanddenis <[email protected]>
Finally it works. I do not know where was the problem (since it was working fine on my laptop), so I static_cast everywhere possible. There was an implicit conversion that went bad on some system certainly. So I think the PR is ready now. |
thx merging |
PR Description
This PR changes the data structure for storing cell covers in CellGeometry. Previous one was a CubicalComplex, which is based on a std::unordered_map Cell -> Data (here Data is not used). We use instead a new class UnorderedSetByBlock to store set of Points (Cells are represented by their Khalimsky points). The UnorderedSetByBlock is an std::unordered_map Point -> Word, where points are gathered by blocks of 32 consecutive points along x axis. If any point in a block is present, the corresponding element is present and bits to 1 in the word correspond to points present in the set. On average, memory occupancy is divided by four, the structure is four times faster for traversal and approximately same speed for queries/insertion/erase.
CellGeometry and DigitalConvexity use now this data structure. A drawback is that this version is not fully backward compatible with the first version since the few operations involving CubicalComplex are removed.
Checklist
cmake
mode (otherwise, Travis C.I. will fail).