Prev | Next |
f.check_for_nan(b)
b = f.check_for_nan()
get_check_for_nan(vec, file)
NDEBUG
is not defined, and
the result of a forward
or reverse
calculation contains a nan
,
CppAD can halt with an error message.
b
is an argument,
f
has prototype
ADFun<Base> f
(see
ADFun<Base>
constructor
).
For the syntax where
b
is the result,
f
has prototype
const ADFun<Base> f
bool b
If
b
is true (false),
future calls to
f.Forward
will (will not) check for nan
.
f
is true.
The value of this setting is not affected by calling
Dependent
for this function object.
nan
are written to a temporary binary file.
This is so that you can run the original source code with those values
to see what is causing the nan
.
vector_size = vector_size
followed the newline character
'\n'
.
The value of
vector_size
is the number of elements
in the independent vector.
file_name = file_name
followed the newline character
'\n'
.
The value of
file_name
is the name of the temporary file
that contains the dependent variable values.
index = index
followed by the newline character '\n'
.
The value of
index
is the lowest dependent variable index
that has the value nan
.
nan
.
CppAD::vector<Base>& vec
It size must be equal to the corresponding value of
vector_size
in the corresponding error message.
The input value of its elements does not matter.
Upon return, it will contain the values for the independent variables,
in the corresponding call to Independent
,
that resulted in the nan
.
(Note that the call to Independent
uses an vector with elements
of type
AD<Base>
and
vec
has elements of type
Base
.)
const std::string& file
It must be the value of
file_name
in the corresponding error message.