Skip to content

Reimplement punch & address some unsigned underflow concerns. #53

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

Merged
merged 11 commits into from
Jul 27, 2025

Conversation

5cript
Copy link
Owner

@5cript 5cript commented Jul 26, 2025

Complete remake of punch function, now respecting all interval types (closed, open, left_open, right_open, dynamic).
For example (all closed adjacent intervals) A punch of [0, 100] with tree [0, 25][50,90] will result in [26, 49][91,100] now, because [0,25][25,50] would share are border and both contain 25, which is not what punch is supposed to do. If it is supposed to do that, use open/regular closed intervals.

closed_punch_source

Punch with [-10,60]

closed_punched

open_punch_source

Punch with [-10,60]

open_punched

@5cript 5cript force-pushed the feat/punch_again branch from b5449de to 761e09d Compare July 26, 2025 20:54
@5cript
Copy link
Owner Author

5cript commented Jul 26, 2025

Unrelated in this PR: Changed default for insert_overlap recursive parameter to true.

@5cript 5cript force-pushed the feat/punch_again branch from 7417bdc to a423348 Compare July 27, 2025 00:48
@5cript 5cript force-pushed the feat/punch_again branch from a423348 to c189555 Compare July 27, 2025 00:51
@5cript 5cript merged commit 10c74a5 into master Jul 27, 2025
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant