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

change the keys in _nodes #226

Open
Freakwill opened this issue Apr 11, 2024 · 0 comments
Open

change the keys in _nodes #226

Freakwill opened this issue Apr 11, 2024 · 0 comments

Comments

@Freakwill
Copy link

Freakwill commented Apr 11, 2024

Let nodes of tree be {(k,):Node(identifier=(k,))}, k=1,2,3...

I want to transform it to a new tree with nodes {(0,k):Node(identifier=(0,k))}, k=1,2,3...

What should I do?

The problem is from the case when I paste a new_tree to a tree, with duplicated nid. What I want is that, when I set identifier of a node, the key (nid) of the node in the tree can be changed automatically, meanwhile the _predecessor and _successors of the neighbors of the node also should be changed.

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

No branches or pull requests

1 participant