---------------------------------------------------------------- lines 921-970 of file: include/cppad/example/valvector/class.hpp ---------------------------------------------------------------- {xrst_begin valvector_condexp} {xrst_spell valvectors } The valvector Conditional Expressions ##################################### Computes element-by-element :ref:`CondExp-name` values where the arguments are valvectors. Syntax ****** *result* = ``CondExp`` *Rel* ( *left* , *right* , *if_true* , *if_false* ) Discussion ********** For each valid index *i* , this computes the result | |tab| ``if`` ( *left* [ *i* ] *op* *right* [ *i* ] ) | |tab| |tab| *result* [ *i* ] = *if_true* [ *i* ] | |tab| ``else`` | |tab| |tab| *result* [ *i* ] = *if_false* [ *i* ] where the relational *Rel* and the operator *op* have the following correspondence: .. csv-table:: *Rel* , ``Lt`` , ``Le`` , ``Eq`` , ``Ge`` , ``Gt`` *op* , < , <= , == , >= , > Arguments ********* All of the argument are ``const`` valvectors. result ****** The result has size equal to the maximum of the size of *left* , *right* , *if_true* and *if_false* . The size of each argument must be one, or the same as the size of *result*. {xrst_toc_hidden example/valvector/condexp.cpp } Example ======= The file :ref:`valvector_condexp.cpp-name` is an example and test of the valvector conditional expressions. {xrst_end valvector_condexp}