Skip to content
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

feat: RBNode.reverse #737

Merged
merged 2 commits into from
Apr 17, 2024
Merged

feat: RBNode.reverse #737

merged 2 commits into from
Apr 17, 2024

Conversation

digama0
Copy link
Member

@digama0 digama0 commented Apr 13, 2024

This adds the function RBNode.reverse which left-right reverses an RBNode. This is not order-preserving, but it is still an important symmetry and it simplifies some reasoning about left and right rebalancing. It can even be lifted to an operation on RBSet and RBMap provided it reverses the comparator.

This was referenced Apr 13, 2024
@digama0 digama0 added awaiting-review This PR is ready for review; the author thinks it is ready to be merged. depends on another PR This is stacked on top of another Batteries PR. labels Apr 13, 2024
@semorrison semorrison merged commit 6361c24 into main Apr 17, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-review This PR is ready for review; the author thinks it is ready to be merged. depends on another PR This is stacked on top of another Batteries PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants