On Wed, Dec 10, 2014 at 11:27 AM, Todd Mars <tamn...@gmail.com> wrote:

​If you know the *position* p of a node, then p.parent() is its parent
*position* and you are done.

But if you just know the (v)node, then there is no such thing as *the*
parent of the node.  Instead, v.parents is a list of the vnodes having v as
a child.

Note that the same vnode may appear multiple times in any v.parents list.

Depending on what you want to do, you may want to traverse the entire tree,
looking for positions p such that p.v == v for the given vnode.  You can
then decide what to do with the found positions.

HTH.

Edward

P.S. Yes, the distinction between positions and nodes can be confusing, but
the payoffs are enormous.  For example, Leo can clone any node/tree in O(0)
time.

EKR

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to