Unary
The unary operators have one argument and one result node.
The argument is a node index and the result is the next node.
Require C++11
The following unary operators require a compiler that supports c++11:
asinh, acosh, atanh,
erf, erfc,
expm1, log1p.
Binary
The binary operators have two arguments and one result node.
The arguments are node indices and the result is the next node.
The first (second) argument is the left (right) operand node index.
Conditional Expression
The conditional expression operators have four arguments and one result node.
The arguments are node indices and the result is the next node.
The first argument is left
,
the second is right
,
the third is if_true
,
the fourth is if_false
,
the result is given by
if( leftcopright) result = if_true;
else result = if_false;
where
cop
is given in the comment after the enum type values below.
Other Comparisons
Note that
CondExpGt(left, right, if_true, if_false)
is equivalent to
CondExpLe(left, right, if_false, if_true)
Similar conversions can be used for all the possible
conditional expressions
.
Comparison
The comparison operators have two arguments and no result node.
The first (second) argument is the left (right) operand node index.
The comparison result was true for the value of the independent
dynamic parameters and independent variables at which this graph was created.
Other Comparisons
The comparison result true for
left > right
is equivalent to the comparison result true for
right < left
.
The comparison result false for
left > right
is equivalent to the comparison result true for
left <= right
.
In a similar fashion, all the possible comparisons results
can be converted to a true result for one of the comparisons above.
Summation
The summation operator has one node result and a variable
number of arguments.
The first argument is the number of nodes in the summation,
and the other arguments are the indices of the nodes to be summed.
The total number of arguments for this operator
is one plus the number of nodes in the summation.
Discrete Function
The discrete function operator has two arguments and one node result.
The first argument is the index in
discrete_name_vec
for the
name
of the discrete function that is called.
The second argument is the index of the node that is the argument
to the discrete function.
Atomic Function
The atomic function operator has a variable number of arguments
and a variable number of node results.
The total number of arguments for this operator is three plus the number
of arguments for the function being called.
The first argument is the index in
atomic_name_vec
for the
name
of the atomic_three function that is called.
The second argument is the number of result for this function call.
The order of the results is determined by function being called.
The third argument is the number of arguments
for this function call.
The other arguments are the indices of nodes for each argument to the
function call. The order of the arguments is determined by function
being called.