CppAD: A C++ Algorithmic Differentiation Package  20171217
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
template<class CompareType , class ResultType >
ResultType CppAD::CondExpTemplate ( enum CompareOp  cop,
const CompareType &  left,
const CompareType &  right,
const ResultType &  exp_if_true,
const ResultType &  exp_if_false 
)

Template function to implement Conditional Expressions for simple types that have comparision operators.

Template Parameters
CompareTypeis the type of the left and right operands to the comparision operator.
ResultTypeis the type of the result, which is the same as CompareType except during forward and reverse mode sparese calculations.
Parameters
copspecifices which comparision to use; i.e., $code <$$, $code <=$$, $code ==$$, $code >=$$, $code >$$, or $code !=$$.
leftis the left operand to the comparision operator.
rightis the right operand to the comparision operator.
exp_if_trueis the return value is the comparision results in true.
exp_if_falseis the return value is the comparision results in false.
Returns
see exp_if_true and exp_if_false above.

Definition at line 234 of file base_cond_exp.hpp.

Referenced by CondExpOp().