Open
Conversation
… polygon This still has one Core.Box that I cant seem to get rid of...
It's cheap and we should be doing it. Especially because it _really_ helps us going forward.
Member
Author
|
So the problem here is the same polygon type issue we ran into earlier. Everything has to be This sucks but it's the easiest way forward. |
rafaqz
reviewed
Oct 19, 2025
| p_start = p_end | ||
| end | ||
|
|
||
| result = SpatialTreeInterface.depth_first_search(per_edge_function,extent -> extent.Y[1] <= y <= extent.Y[2], tree) |
Member
There was a problem hiding this comment.
The second function could be defined above too this is hard to read
Member
Author
There was a problem hiding this comment.
Yeah...I might move the internal Hao Sun logic out since it's shared between the tree accelerated and nonaccelerated functions.
rafaqz
reviewed
Oct 19, 2025
| if !((v1 < 0 && v2 < 0) || (v1 > 0 && v2 > 0)) # if not cases 11 or 26 | ||
| u1, u2 = GI.x(p_start) - x, GI.x(p_end) - x | ||
| f = Predicates.orient(p_start, p_end, (x, y); exact) | ||
| if v2 > 0 && v1 ≤ 0 # Case 3, 9, 16, 21, 13, or 24 |
Member
There was a problem hiding this comment.
This wants a little comment giving context to the case numbers
Member
Author
|
There could be two reasons for the extra overhead:
|
asinghvi17
pushed a commit
that referenced
this pull request
Nov 9, 2025
Address PR #340 review comments by: - Creating `_hao_sun_edge_case` helper function to eliminate code duplication - Adding detailed comments explaining the 26 cases from Hao & Sun (2018) - Refactoring both standard and tree-accelerated implementations to use shared logic
asinghvi17
pushed a commit
that referenced
this pull request
Nov 9, 2025
Address PR #340 review comments by: - Creating `_hao_sun_edge_case` helper function to eliminate code duplication - Adding detailed comments explaining the 26 cases from Hao & Sun (2018) - Refactoring both standard and tree-accelerated implementations to use shared logic
This file contains hidden or 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
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.
This still has one Core.Box that I cant seem to get rid of...but is otherwise fully type stable
Benchmarks
Current naive Hao-Sun
Prepared with natural tree and using STI
36x speedup!
Target: TGGeometry
Benchmarking script