add derived from value Example Source Header

Description: a value node that computes the sum of its children

notes:
Category: Math
Author: Alex Hill
Revision: 11/01/01

    Comments

constructor add

method app

1 if this node has size greater than zero
1.1 for each child node do
1.1.0.1 get the size of the child node
1.1.0.2 for each value in the child node do
1.1.0.2.1 if the element is less than the size of this node then
1.1.0.2.1.1 if the first child, initialize the element value
1.1.0.2.1.2 else, add the child value to the element value