CppAD: A C++ Algorithmic Differentiation Package
20171217
|
|
inline |
Compute forward Jacobian sparsity patterns for op = CExpOp.
The C++ source code coresponding to this operation is
z = CondExpRel(y_0, y_1, y_2, y_3)
where Rel is one of the following: Lt, Le, Eq, Ge, Gt.
Vector_set | is the type used for vectors of sets. It can be either sparse_pack or sparse_list. |
i_z | is the AD variable index corresponding to the variable z. |
arg | arg[0] is static cast to size_t from the enum type enum CompareOp { CompareLt, CompareLe, CompareEq, CompareGe, CompareGt, CompareNe }for this operation. Note that arg[0] cannot be equal to CompareNe. arg[1] & 1 If this is zero, y_0 is a parameter. Otherwise it is a variable. arg[1] & 2 If this is zero, y_1 is a parameter. Otherwise it is a variable. arg[1] & 4 If this is zero, y_2 is a parameter. Otherwise it is a variable. arg[1] & 8 If this is zero, y_3 is a parameter. Otherwise it is a variable. arg[2 + j ] for j = 0, 1, 2, 3 is the index corresponding to y_j. |
num_par | is the total number of values in the vector parameter. |
dependency | Are the derivatives with respect to left and right of the expression below considered to be non-zero: CondExpRel(left, right, if_true, if_false)
|
sparsity | Input: if y_2 is a variable, the set with index t is the sparsity pattern corresponding to y_2. This identifies which of the independent variables the variable y_2 depends on. Input: if y_3 is a variable, the set with index t is the sparsity pattern corresponding to y_3. This identifies which of the independent variables the variable y_3 depends on. Output: The set with index T is the sparsity pattern corresponding to z. This identifies which of the independent variables the variable z depends on. |
Definition at line 981 of file cond_op.hpp.
Referenced by for_jac_sweep().