Re: how to suppress carefully a recursive tree



On 23 jan, 12:02, "David Cressey" <cresse...@xxxxxxxxxxx> wrote:
"fj" <francois.j...@xxxxxxx> wrote in message

news:4e22c235-3e07-4fcd-a9d1-f3362ea99239@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx



On 23 jan, 01:12, David BL <davi...@xxxxxxxxxxxx> wrote:
On Jan 23, 1:10 am, fj <francois.j...@xxxxxxx> wrote:

On 22 jan, 15:52, Jan Hidders <hidd...@xxxxxxxxx> wrote:

On 22 jan, 12:04, fj <francois.j...@xxxxxxx> wrote:

I know how to suppress a normal tree but I meet the following kind
of
situation :

I'm guessing that when you say "suppress" you mean "represent in a
database". Correct?

No : I want to destroy, remove, kill ... a part of the data (a
complete tree or just a branch), but without destroying data shared by
other trees or branches.

Would the mark and sweep algorithm suit you purposes?

No

the mark and sweep algorithm needs to know all the tree roots in order
to mark all the used objects.

In my example I indicates that the node b3 belongs to the root r2
just for information to explain the storage count. But the deletion
routine I want to write just receives "r1" as argument, nothing else.
It does not know that r2 exists too ... It is just able to detect the
existence of other objects via the storage count of b3 which is a
little bit too high for being just referenced by r1 !

How is the tree represented? If it's in the usual child-parent
relationship, then you will have to traverse the sub tree in order to locate
all its nodes.

Each parent knows its children.
It could be possible to add extra information in children so they will
know theirs parents too.

Yes, at the moment I have to traverse the sub tree in order to locate
all its nodes


.



Relevant Pages

  • RE: Add Child Node to Treeview
    ... thinking yesterday afternoon that perhaps one way to get a unique strKey is ... into the!Parent section. ... 'Fill Tree ... qryFamTree has my main table joined to a second table by WhoID. ...
    (microsoft.public.access.formscoding)
  • Re: How to populate a treeview from a dataset
    ... If it is then check to see if the parentId and child id of the ... 15 is a parent and a child of itself. ... And that same business is the headquarters for the purchasing group. ... 15 Null - root tree node, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How to populate a treeview from a dataset
    ... If it is then check to see if the parentId and child id of the ... 15 is a parent and a child of itself. ... And that same business is the headquarters for the purchasing group. ... 15 Null - root tree node, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Add Child Node to Treeview
    ... You cannot use the same value for strKey for multiple nodes. ... even though they refer to the same child. ... When I base the tree on this query I get ... 'Find the parent node and add it below that node's last child ...
    (microsoft.public.access.formscoding)
  • [git pull] jfs update
    ... commit c5111f504d2a9b0d258d7c4752b4093523315989 ... tree 6a52864aff79691689aea21cb0cb928327d5de5b ... parent 69eb66d7da7dba2696281981347698e1693c2340 ... JFS: Take logsync lock before testing mp->lsn ...
    (Linux-Kernel)