Print

Print


Hi,

Thanks for your response.

>When you remove the node from the tree, what replaces it?
Nothing, null. and If this parent node has no child, then it will be
removed and so on.

>what was occupying the slot before, and where does that object go now that
the GPNode has displaced it?
That is a new node and I extend children by one and add that as new child.

regards,


On Wed, Feb 11, 2015 at 4:31 PM, Sean Luke <[log in to unmask]> wrote:

> On Feb 11, 2015, at 11:16 AM, nikima tomas <[log in to unmask]>
> wrote:
>
> > 1. Delete a GPNode from a GPTree. The function should find the node in
> the tree and remove that, then update children field of parent and also
> update argposition (and other details) of sibling. Note that the node is
> extracted before from tree and we know it is surely in the tree.
>
> ECJ doesn't have a function which does this.  When you remove the node
> from the tree, what replaces it?
>
>
> > 2. Add a new created GPNode to a proper position in the tree. The
> function should find the right position in the tree (probably based on
> parent type of new node), and add node as a new child of its new parent. It
> should also update Argposition (and other details) of its new sibling if
> they are not valid.
>
> ECJ again doesn't have a built-in function to do this.  There are many
> posible "proper positions" in a typical GPTree.  Which would would ECJ
> choose?  Additionally, what was occupying the slot before, and where does
> that object go now that the GPNode has displaced it?
>
> Sean
>