8 #include <cppad/cppad.hpp> 9 #include <cppad/example/cppad_eigen.hpp> 20 inline static Scalar
sin(
const Scalar& x) {
return CppAD::sin(x); }
21 inline static Scalar
cos(
const Scalar& x) {
return CppAD::cos(x); }
22 inline static Scalar
tan(
const Scalar& x) {
return CppAD::tan(x); }
23 inline static Scalar
sinh(
const Scalar& x) {
return CppAD::sinh(x); }
24 inline static Scalar
cosh(
const Scalar& x) {
return CppAD::cosh(x); }
25 inline static Scalar
tanh(
const Scalar& x) {
return CppAD::tanh(x); }
26 inline static Scalar
exp(
const Scalar& x) {
return CppAD::exp(x); }
27 inline static Scalar
fabs(
const Scalar& x) {
return CppAD::fabs(x); }
28 inline static Scalar
sqrt(
const Scalar& x) {
return CppAD::sqrt(x); }
31 inline static Eigen::Matrix<Scalar, Dims, 1>
solve(
const Eigen::Matrix<Scalar, Dims, Dims>& A,
32 const Eigen::Matrix<Scalar, Dims, 1>& b)
34 return A.inverse() * b;
static Scalar sinh(const Scalar &x)
Definition: CppADDoubleTrait.h:23
CppAD::AD< double > Scalar
Definition: CppADDoubleTrait.h:18
static Scalar tanh(const Scalar &x)
Definition: CppADDoubleTrait.h:25
static Scalar tan(const Scalar &x)
Definition: CppADDoubleTrait.h:22
static Scalar fabs(const Scalar &x)
Definition: CppADDoubleTrait.h:27
static Eigen::Matrix< Scalar, Dims, 1 > solve(const Eigen::Matrix< Scalar, Dims, Dims > &A, const Eigen::Matrix< Scalar, Dims, 1 > &b)
Solves a linear system of equations using Eigen's inverse functionality.
Definition: CppADDoubleTrait.h:31
static Scalar cosh(const Scalar &x)
Definition: CppADDoubleTrait.h:24
static Scalar sin(const Scalar &x)
Definition: CppADDoubleTrait.h:20
Trait defining basic math functions for CppAD Auto-Diff types.
Definition: CppADDoubleTrait.h:16
static Scalar cos(const Scalar &x)
Definition: CppADDoubleTrait.h:21
static Scalar exp(const Scalar &x)
Definition: CppADDoubleTrait.h:26
static Scalar sqrt(const Scalar &x)
Definition: CppADDoubleTrait.h:28