On Thu, 2012-05-24 at 11:07 +0200, tobi wrote: > (Completely giving up anything I knew about binary trees now, because it > wasn't much and it wasn't > even from a book): > You said that you can traverse from any node in the tree. No, any node can be considered as a root for a subtree. Anynode.parent provides what I think your saying.
> Consequently every node has to provide > such functionality. (Aside, I think that separating the functionality from the node is the key of what I was trying to say. But that is a side issue.) > I don't deem it necessary to distinguish between root and other nodes. Only in that the "tree" happens to be a directed graph that has one special node. I told you graphs were interesting. > The codeis only once there anyway. It could even have helped in your case to > "em-parent" (sorry, not a > native English speaker) a node that you formerly assumed to be the root like > > NewNode.Left = RootNode > RootNode = NewNode > > As interesting as it sounds, I'm probably not the right person to work on > this. I don't have much > time for (I don't think so but from a pure conscientiousness point I need to > prepare my A-level a > bit) and nobody else wants to wait until I finish the theory ;) > Having been born some time in the middle of the last century, I have no idea what an A-level is. I hope it's not painful. :-) > Regards, > Tobi and regards from me too! But if A-levels are what I think they are, I can recall thinking some 40 years ago, "calculus, as if I am ever going to need that in my life, ha!". Wrong. :-) Now get back to those books! ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user