![]() |
Prev | Next |
f.Forward(0, x)
PrintFor(before, var)
PrintFor(pos, before, var, after)
f.Forward(0, x)
assigns the
independent variable
vector
equal to
x
.
It then computes a value for all of the dependent variables in the
operation sequence
corresponding
to
f
.
Putting a PrintFor
in the operation sequence will
cause the value of
var
, corresponding to
x
,
to be printed during zero order forward operations.
f
,
x
, and the purpose
for this operation, are documented in Forward
.
pos
has one of the following prototypes
const AD<Base>& pos
const VecAD<Base>::reference& pos
In this case
the text and
var
will be printed if and only if
pos
is not greater than zero and a finite number.
before
has prototype
const char* before
This text is written to std::cout
before
var
.
var
has one of the following prototypes
const AD<Base>& var
const VecAD<Base>::reference& var
The value of
var
, that corresponds to
x
,
is written to std::cout
during the execution of
f.Forward(0, x)
Note that
var
may be a
variable
or
parameter
.
(A parameters value does not depend on the value of
the independent variable vector
x
.)
after
has prototype
const char* after
This text is written to std::cout
after
var
.
f
is
log(var)
and
var <= 0
,
the corresponding result will be nan
.