Description
The if node selects a value or path based on the value of its first child-node. The mode of operation is dependent on how many child-nodes the if node has. In all cases it is the value of the first (leftmost) node that controls the evaluation.
| child-node count | returns |
| 1 | 0 or 1 |
| 2 | 0 or value2 |
| 3 | value2 or value3 |
| 4 | value2 or value3 or value4 |
Constraints
Calculus
General
The first (leftmost) child-node is evaluated and compared to the child-node's weight1) to give a meta result. This meta result then determines how the if node will act. (see below)
| value1 | meta result |
>= weight1 | true |
< weight1 AND > -weight1 | undetermined |
<= -weight1 | false |
| ERROR | ERROR |
1 child-node
| value1 | meta result | returns |
>= weight1 | true | 1 |
< weight1 AND > -weight1 | undetermined | 0 |
<= -weight1 | false | 0 |
| ERROR | ERROR | ERROR |
2 child-nodes
| value1 | meta result | returns |
>= weight1 | true | value2 |
< weight1 AND > -weight1 | undetermined | 0 |
<= -weight1 | false | 0 |
| ERROR | ERROR | ERROR |
3 child-nodes
| value1 | meta result | returns |
>= weight1 | true | value2 |
< weight1 AND > -weight1 | undetermined | value3 |
<= -weight1 | false | value3 |
| ERROR | ERROR | ERROR |
4 child-nodes
| value1 | meta result | returns |
>= weight1 | true | value2 |
< weight1 AND > -weight1 | undetermined | value3 |
<= -weight1 | false | value4 |
| ERROR | ERROR | ERROR |