\(\newcommand{\B}[1]{ {\bf #1} }\) \(\newcommand{\R}[1]{ {\rm #1} }\)
a_double_cond_assign#
View page sourceAD Conditional Assignment#
Syntax#
.cond_assign ( cop , left , right , if_true , if_false )Purpose#
The code
if ( left cop right )elserecords either the true or false case depending on the value
of left and right ; see cpp_fun_ctor.
If left or right is a
variable,
it may be desirable to switch between if_true and if_false
depending of the value of the independent variable during
calls to order zero cpp_fun_forward.
The cond_assign does this.
target#
This object has c++ prototype
a_double& targetcop#
This argument has c++ prototype
const char *copThe comparison is
where cop is one of the following:
cop |
|
|
less than |
|
less than or equal |
|
equal |
|
greater than or equal |
|
greater than |
left#
This argument has c++ prototype
const a_double& leftIt specifies the left operand in the comparison.
right#
This argument has c++ prototype
const a_double& rightIt specifies the right operand in the comparison.
if_true#
This argument has c++ prototype
const a_double& if_trueIt specifies the value assigned to ad if the result of the comparison is true.
if_false#
This argument has c++ prototype
const a_double& if_falseIt specifies the value assigned to ad if the result of the comparison is false.