|
Prev | Next |
include <cppad/base_require.hpp>
Base
so that the type
AD<Base>
can be used.
Base
is
float,
double,
std::complex<float>,
std::complex<double>,
or
AD<Other>
,
these requirements are provided by including the file
cppad/cppad.hpp.
cppad/base_require.hpp/,
then provide the specifications below,
and then include the file cppad/cppad.hpp.
Base
must support all the operations for a
NumericType
.
Base
must support the syntax
i = CppAD::Integer(x)
which converts
x
to an int.
The argument
x
has prototype
const Base& x
and the return value
i
has prototype
int i
Base
version of the Integer function
can be defined by
namespace CppAD {
inline int Integer(const Base& x)
{ return static_cast<int>(x); }
}
For example, see
float
,
double
, and
complex
.
Base CppAD::epsilon<Base>()
must return machine epsilon for the type
Base
.
For example, see
float
,
float
, and
float
,
Base
defines the isnan function,
you may also have to provide a definition in the CppAD namespace
(to avoid a function ambiguity).
For example,
complex isnan
.
| base_cond_exp | Base Type Requirements for Conditional Expressions |
| base_identical | Base Type Requirements for Identically Equal Comparisons |
| base_ordered | Base Type Requirements for Ordered Comparisons |
| base_std_math | Base Type Requirements for Standard Math Functions |
| base_float.hpp | Enable use of AD<Base> where Base is float |
| base_double.hpp | Enable use of AD<Base> where Base is double |
| base_complex.hpp | Enable use of AD<Base> where Base is std::complex<double> |
| base_adolc.hpp | Enable use of AD<Base> where Base is Adolc's adouble Type |