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

RBTree: How to get parent node based on current cursor? #68

Open
JunichiSugiura opened this issue Apr 14, 2022 · 2 comments · May be fixed by #69
Open

RBTree: How to get parent node based on current cursor? #68

JunichiSugiura opened this issue Apr 14, 2022 · 2 comments · May be fixed by #69

Comments

@JunichiSugiura
Copy link

JunichiSugiura commented Apr 14, 2022

I'm looking for a way to bubble up cache changes in node to its ancestors all the way to the root in RBTree.
I see there's .parent() method in rbtree::AtomicLinkOps but I'm not sure how to access it from Cursor.

@JunichiSugiura JunichiSugiura linked a pull request Apr 16, 2022 that will close this issue
@Amanieu
Copy link
Owner

Amanieu commented Apr 16, 2022

The parent node isn't really exposed in the RBTree interface because the RBTree API exposes the data structure as a linear sequence of ordered values. The internal tree structure is hidden.

What exactly are you trying to achieve with this?

@JunichiSugiura
Copy link
Author

Hi, @Amanieu. Thanks for the response.
I'm trying to re-implement VSCode's buffer implementation in Rust. It requires some low-level tree manipulation logic it seems.

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 a pull request may close this issue.

2 participants