![]() |
Prev | Next |
void f2cad::Independent(n, x)
void f2cad::Dependent(m, y)
double f2cad::Partial<doublereal>(i, j)
double f2cad::Value(z)
double f2cad::Sign(x, y)
doublereal
is the C++ type that corresponds
to Fortran single and double precision.
This type is mapped to an AD type that depends on the library being used:
Library | typedef |
libf2c_adolc.a |
typedef adouble doublereal
|
libf2c_cppad.a |
typedef CppAD::<double> doublereal
|
libf2c_fadbad.a |
typedef F<double> doublereal
|
integer
is the C++ type that corresponds
to Fortran integers.
doublereal
type has a tape state and
the initial tape state is Empty.
n
has prototype
integer n
It specifies the dimension of the domain
space for the function being defined.
The argument
x
has prototype
doublereal *x
It is a vector of length
n
that contains the independent variables
(and values) for this function recording.
The value of the elements of
x
are not affected by calling this routine.
(The elements are not const
in the prototype
because the AD information connected to them may be affected.)
m
has prototype
integer m
It specifies the dimension of the range
space for the function being defined.
The argument
y
has prototype
doublereal *x
It is a vector of length
m
that contains the dependent variables (and values)
for this function recording.
The value of the elements of
y
are not affected by calling this routine.
(The elements are not const
in the prototype
because the AD information connected to them may be affected.)
i
has prototype
integer i
It must be greater than or equal zero
and less than the dimension of the range space for the function.
The argument
j
has prototype
integer j
It must be greater than or equal zero
and less than the dimension of the domain space for the function.
The return value from Partial
is the partial derivative of the i-th dependent variable
with respect to the j-th dependent variable
(i-th function value with respect to j-th function argument).
z
has prototype
const doublereal &z
This function returns
the value corresponding to the doublereal
object
z
.
x
and
y
have prototypes
doublereal* x
doublereal* y
This function returns
\[
\left\{ \begin{array}{ll}
+ |x| & \R{if} \; y \geq 0
\\
- |x| & \R{otherwise}
\end{array} \right.
\]
AdolcLink | f2cad Common Interface for Adolc |
CppADLink | f2cad Common Interface for CppAD |
FadbadLink | f2cad Common Interface for Fadbad |