Prev  Next 
b = x Op y
AD<Base>
object.
The comparison has the same interpretation as for
the
Base
type.
Op
is one of the following:
Op  Meaning 
< 
is
x
less than
y

<= 
is
x
less than or equal
y

> 
is
x
greater than
y

>= 
is
x
greater than or equal
y

== 
is
x
equal to
y

!= 
is
x
not equal to
y

x
has prototype
const Type &x
where
Type
is
AD<Base>
,
Base
, or int
.
y
has prototype
const Type &y
where
Type
is
AD<Base>
,
Base
, or int
.
b
has type
bool b
bool
value
(not an AD of Base
object).
Thus it will not be recorded as part of an
AD of
Base
operation sequence
.
For example, suppose
x
and
y
are
AD<Base>
objects,
the tape corresponding to
AD<Base>
is recording,
b
is true,
and the subsequent code is
if( b )
y = cos(x);
else y = sin(x);
only the assignment
y = cos(x)
is recorded on the tape
(if
x
is a parameter
,
nothing is recorded).
The CompareChange
function can yield
some information about changes in comparison operation results.
You can use CondExp
to obtain comparison operations
that depends on the
independent variable
values with out retaping the AD sequence of operations.
Op
operators listed above
is used with an
AD<Base>
object,
it is assumed that the same operator is supported by the base type
Base
.