You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, addchild and addsibling require you to pass the data directly. Is it reasonable to add methods which allow you to specify child::Node{T}s rather than data::T?
I'm working with a problem where the end product is conveniently represented as a LCRS tree, but it's most sensible to build it from the bottom up, rather than the top down. This means I want to pass a subtree as a child rather than just the data, because that node has a collection of children/siblings already. Presumably we could do this with making Node{T}s which duplicate data and then graftchildren! to this duplicate node, but it seems like we could this more directly
E- This runs into the issue where you could add a Node from a tree to the tree again somewhere else, so it's not necessarily safe. That might be enough to disqualify this
The text was updated successfully, but these errors were encountered:
Right now,
addchild
andaddsibling
require you to pass the data directly. Is it reasonable to add methods which allow you to specifychild::Node{T}
s rather thandata::T
?I'm working with a problem where the end product is conveniently represented as a
LCRS
tree, but it's most sensible to build it from the bottom up, rather than the top down. This means I want to pass a subtree as a child rather than just the data, because that node has a collection of children/siblings already. Presumably we could do this with makingNode{T}
s which duplicatedata
and thengraftchildren!
to this duplicate node, but it seems like we could this more directlyE- This runs into the issue where you could add a
Node
from a tree to the tree again somewhere else, so it's not necessarily safe. That might be enough to disqualify thisThe text was updated successfully, but these errors were encountered: