|
Prev | Next |
CPPAD_DISCRETE_FUNCTION(Base, name)
v = name(u)
y = name(x)
AD<Base>
operation sequence
.
The value of a discrete function can depend on the
independent variables
,
but its derivative is identically zero.
For example, suppose that the integer part of
a variable
x is the
index into an array of values.
AD<Base> can be recorded in an operation sequence.
AD<Base>.
const Base &u
It is the value at which the user provided version of name
is to be evaluated.
Base v
It is the return value for the user provided version of name.
const AD<Base> &x
It is the value at which the CppAD provided version of name
is to be evaluated.
AD<Base> v
It is the return value for the CppAD provided version of name.
CPPAD_DISCRETE_FUNCTION(Base, name)
defines the AD<Base> version of name.
This can be with in a namespace (not the CppAD namespace)
but must be outside of any routine.
CppADCreateDiscrete
is defined to be the same as CPPAD_DISCRETE_FUNCTION
but its use is deprecated.