Closed lxvm closed 7 months ago
Not sure why the tests are not running since I switched it to ready for review
Can you rebase on top of the master branch ?
@blegat I rebased this pr onto master and fixed a missing test dependency
The tests don't work if you use the default library instead of CDDLib ?
Since the implementation is somewhat different from the Cohen-Hickey algorithm I am still figuring this out.
Yes I don't remember why I implemented like this. We could probably merge this PR with the new tests and fixed implementation using unique
. Then, in a later PR, we could rewrite the implementation with Cohen-Hickey and see if we can remove the unique
and the tests are still passing.
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
268c701
) 88.95% compared to head (a867113
) 88.95%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I updated the tests as you suggested and exchanged CDDLib for the default library in exact arithmetic.
I agree it would be great to merge this "patch" fix and revisit the algorithm. When I read the implementation, it is very similar to Cohen-Hickey in that it is recursive, however it does not perform certain manipulations such as elimination that I would expect from Cohen-Hickey. I think this is interesting and may be more efficient, i.e. fewer computations, but it would be useful to pinpoint where the redundancy originates from.
Yes, I don't remember exactly why I thought it would work but I could try to recollect my thoughts (good example of why comments are important ^^)
Hi,
This pr is attempting to fix #285 and #249 by removing redundant simplices produced by
triangulation_indices
. So far I have added 7 polyhedra to the tests and have checked whether their volume is calculated correctly. Of these, 5 volumes were previously calculated incorrectly, including several examples from the issues and the isocahedron, and two were correct, namely the 5-simplex and the dodecahedron.The fix I have attempted so far is naively calling
unique
on the list of simplices, and with a bit more work I hope that I can correct the implementation itself. Since the implementation is somewhat different from the Cohen-Hickey algorithm I am still figuring this out.