On Apr 28, 9:18 am, "Edward K. Ream" <[EMAIL PROTECTED]> wrote:
> I would very
> much like to get rid of the parents list entirely. I wrote a long
> post telling why that is desirable, but I don't know how to do it
> yet. The problem is in writing p.findAllPotentiallyDirtyNodes without
> v.parents. Theoretically, it must be possible, but I need some
> inspiration.
No. It's not possible. The problem is easily stated: the position
stack p.stack only tells about the direct parents at position p. But
in general not all the cloned vnodes in v.t.vnodeList will be in the
same subtree as p, so p simply can not be used to recover their
parents.
In effect, that is the end of the story: the only way to recover "off-
tree" parents would be to do a complete traversal of the tree, looking
for positions p such that p.v == v. That's way too slow. Some other
optimizations are conceivable, but they will be very ugly.
In short, it looks like the v.parents list is truly useful, and trying
to do without it will cause serious complications. So it looks like
v.parents is here to stay.
Edward
If inspiration does strike, I'll actually post the long
> posting...
>
> Still haven't transitioned to using the new code: I don't recommend
> using it for anything important.
>
> Edward
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en
-~----------~----~----~----~------~----~------~--~---