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

Transactional adds/removes #15

Open
ghost opened this issue Mar 28, 2017 · 0 comments
Open

Transactional adds/removes #15

ghost opened this issue Mar 28, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented Mar 28, 2017

As a compromise between the status quo and #12, what about adding a transactional add/remove of nodes and edges?

For example, some code like this:

for node_ind in nodes_to_remove.iter() {
  tree.remove_node(*node_ind);
}
for edge_ind in edges_to_remove.iter() {
  tree.remove_edge(*edge_ind);
}

As I understand it, this code has somewhat random behavior since each run through the loop will cause the tree to change. However, if I could specify something like tree.transact(&nodes_to_remove, tree.remove_node), that would solve my own stability needs without needing the whole graph to be redone.

On the other hand, it's a very database thing to do.

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

0 participants