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

Nodes tree-wise bpointer/fpointers #126

Conversation

leonardbinet
Copy link
Collaborator

I encountered the following conditions:

  • having to deal with lots (potentially hundreds of thousands) of nodes containing data
  • having to generate multiple subtrees without impacting initial tree

The only solution I had was to create for each subtree a deepcopy, but it was very greedy and expensive in terms of memory.

This pull-request implements the ability to generate shallow copies of trees (no deep-copy of nodes), and mutate multiple shallow copies of the same tree without impacting other trees hierarchies.

I do so by assigning Nodes not a single _bpointer _fpointer, but one per shallow copy of tree.

@caesar0301 caesar0301 merged commit 86990a2 into caesar0301:feature/tree-wise-node-pointer Dec 2, 2019
@caesar0301
Copy link
Owner

caesar0301 commented Dec 2, 2019

Linked issue #127

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.

None yet

2 participants