1#ifndef CPPAD_CG_CPPADCG_EIGEN_INCLUDED
2#define CPPAD_CG_CPPADCG_EIGEN_INCLUDED
18# include <cppad/cg.hpp>
19# include <Eigen/Dense>
31template<
typename Base>
32struct NumTraits<
CppAD::cg::CG<Base> > {
50 RequireInitialization = 1 ,
62 return CppAD::numeric_limits<CppAD::cg::CG<Base> >::epsilon();
70 return 100. * CppAD::numeric_limits<CppAD::cg::CG<Base> >::epsilon();
77 return CppAD::numeric_limits<CppAD::cg::CG<Base> >::min();
84 return CppAD::numeric_limits<CppAD::cg::CG<Base> >::max();
91 return CppAD::numeric_limits<CppAD::cg::CG<Base> >::digits10;
101template <
typename Base>
102struct NumTraits<
CppAD::AD<CppAD::cg::CG<Base> > > {
121 RequireInitialization = 1 ,
133 return CppAD::numeric_limits<CppAD::AD<CGBase> >::epsilon();
141 return 100. * CppAD::numeric_limits<CppAD::AD<CGBase> >::epsilon();
148 return CppAD::numeric_limits<CppAD::AD<CGBase> >::min();
155 return CppAD::numeric_limits<CppAD::AD<CGBase> >::max();
162 return CppAD::numeric_limits<CGBase>::digits10;
167#if EIGEN_VERSION_AT_LEAST(3,2,93)
173template<
typename Base,
typename BinOp>
174struct ScalarBinaryOpTraits<
CppAD::AD<CppAD::cg::CG<Base> >, Base, BinOp> {
178template<
typename Base,
typename BinOp>
179struct ScalarBinaryOpTraits<Base,
CppAD::AD<CppAD::cg::CG<Base> >, BinOp> {
183template<
typename Base,
typename BinOp>
184struct ScalarBinaryOpTraits<
CppAD::AD<CppAD::cg::CG<Base> >,
CppAD::cg::CG<Base>, BinOp> {
188template<
typename Base,
typename BinOp>
189struct ScalarBinaryOpTraits<
CppAD::cg::CG<Base>,
CppAD::AD<CppAD::cg::CG<Base> >, BinOp> {
198template<
typename Base,
typename BinOp>
199struct ScalarBinaryOpTraits<
CppAD::cg::CG<Base>, Base, BinOp> {
203template<
typename Base,
typename BinOp>
204struct ScalarBinaryOpTraits<Base,
CppAD::cg::CG<Base>, BinOp> {
static CppAD::AD< CGBase > dummy_precision()
static CppAD::AD< CGBase > highest()
static CppAD::AD< CGBase > epsilon()
static CppAD::AD< CGBase > lowest()
static CppAD::cg::CG< Base > highest()
static CppAD::cg::CG< Base > lowest()
static CppAD::cg::CG< Base > epsilon()
static CppAD::cg::CG< Base > dummy_precision()