-
Notifications
You must be signed in to change notification settings - Fork 214
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
Fix geometry bug in is_straight_line_drawing #412
Fix geometry bug in is_straight_line_drawing #412
Conversation
"crosses" fits the requirement as it means that the interior parts of the geometry share some common points, not exterior parts such as end-points, and it means "not within".
Why is this assigned to me? |
Sorry I meant to leave a comment that I just wanted you to give it a sanity check. I've never used the numeric_cast before, but I presume it's as simple as this. |
I just don't really know who else to assign my own pull requests to, since I assume JZ Maddock wants to minimise his Boost workload these days. |
689eb04
to
9176040
Compare
Whoops, accidentally pushed my CMake changes here and force-pushed to get rid of them. |
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 implementation aligns well with the general style and structure of the Boost Graph Library.
The introduction of a new dependency on Boost::Geometry was briefly discussed in issue #388 and deemed worthwhile during that discussion.
The function is well-organized but remains somewhat lengthy despite the effective code reduction by @jeremy-murphy. While I recognize that adding further function extraction, comments, or documentation could help new contributors better understand the context and usage, I understand that this is not the primary focus of this quick fix.
The code appears correct, and all tests pass; however, I am not deeply familiar with planar graph theory. It might be beneficial for someone with more expertise in this area to provide additional input, though @jeremy-murphy’s expertise may already suffice.
In summary, the tests pass, and the code is consistent with the library's conventions. While I may not be fully qualified to evaluate the deeper theoretical aspects, I’m happy to assist further if needed!
Fix the geometry bug uncovered and documented by @Hermann-SW by replacing the custom function with one from Boost.Geometry.
crosses
meets the requirement described in the old code for returning true for 'intersections' that don't include endpoints or self-intersection.I decided to remove the tolerance altogether on the assumption that it was indicative of a poor implementation.