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

Tree type and methods #756

Open
dfellis opened this issue Jun 11, 2024 · 1 comment
Open

Tree type and methods #756

dfellis opened this issue Jun 11, 2024 · 1 comment
Milestone

Comments

@dfellis
Copy link
Member

dfellis commented Jun 11, 2024

With Alan remaining loop-less in both types and code, a Tree type to safely represent such structures is necessary. We can probably crib most of this from Alan v0.1

@dfellis dfellis added this to the v0.2 release milestone Jun 11, 2024
@dfellis
Copy link
Member Author

dfellis commented Aug 23, 2024

The remaining pieces for the Tree type:

  • subtree to take a Node{T} and produce a new Tree{T} with that node as the root and only include the child nodes
  • addChild that takes a Node{T} to make a child from it. As it is a tree and not a Graph, this will be implemented with subtree under-the-hood.
  • prune to remove a Node{T} and all of its children from a Tree{T}
  • delete to remove a Node{T} and attach its children to its own parent node.

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