You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(geometry): Add Bentley-Ottmann algorithm for line segment intersection (#6871)
* feat(geometry): add Bentley-Ottmann line segment intersection algorithm
- Implement sweep-line algorithm for finding all intersection points
- Time complexity: O((n + k) log n) where n is segments, k is intersections
- Uses event queue (PriorityQueue) and status structure (TreeSet)
- Handles vertical/horizontal segments, collinear overlaps, and touching endpoints
- Includes comprehensive Javadoc with examples and references
* test(geometry): add comprehensive tests for Bentley-Ottmann algorithm
- 19 test cases covering typical, edge, and degenerate cases
- Tests include: single/multiple intersections, parallel segments, grid patterns
- Performance test with 100 random segments
- All tests validate correctness of intersection detection
* style(geometry): fix code style
* test(geometry): Achieve 100% test coverage for BentleyOttmann
* style(geometry): fix code style again
* fix: correct import order in BentleyOttmann
* fix(geometry): Resolve SpotBugs and PMD static analysis warnings
* Reorder import statements in BentleyOttmannTest
---------
Co-authored-by: Deniz Altunkapan <[email protected]>
0 commit comments