Eigen::AdolcForwardJacobian< Functor > Class Template Reference
+ Inheritance diagram for Eigen::AdolcForwardJacobian< Functor >:

Public Types

typedef Matrix< ActiveScalar, InputType::SizeAtCompileTime, 1 > ActiveInput
 
typedef Matrix< ActiveScalar, ValueType::SizeAtCompileTime, 1 > ActiveValue
 
typedef Functor::InputType InputType
 
typedef Functor::JacobianType JacobianType
 
typedef Functor::ValueType ValueType
 

Public Member Functions

 AdolcForwardJacobian ()
 
 AdolcForwardJacobian (const Functor &f)
 
template<typename T0 >
 AdolcForwardJacobian (const T0 &a0)
 
template<typename T0 , typename T1 >
 AdolcForwardJacobian (const T0 &a0, const T1 &a1)
 
template<typename T0 , typename T1 , typename T2 >
 AdolcForwardJacobian (const T0 &a0, const T1 &a1, const T1 &a2)
 
void operator() (const InputType &x, ValueType *v, JacobianType *_jac) const
 

Private Types

typedef adtl::adouble ActiveScalar
 

Detailed Description

template<typename Functor>
class Eigen::AdolcForwardJacobian< Functor >

Definition at line 101 of file AdolcForward.

Member Typedef Documentation

◆ ActiveInput

template<typename Functor >
typedef Matrix<ActiveScalar, InputType::SizeAtCompileTime, 1> Eigen::AdolcForwardJacobian< Functor >::ActiveInput

Definition at line 121 of file AdolcForward.

◆ ActiveScalar

template<typename Functor >
typedef adtl::adouble Eigen::AdolcForwardJacobian< Functor >::ActiveScalar
private

Definition at line 103 of file AdolcForward.

◆ ActiveValue

template<typename Functor >
typedef Matrix<ActiveScalar, ValueType::SizeAtCompileTime, 1> Eigen::AdolcForwardJacobian< Functor >::ActiveValue

Definition at line 122 of file AdolcForward.

◆ InputType

template<typename Functor >
typedef Functor::InputType Eigen::AdolcForwardJacobian< Functor >::InputType

Definition at line 117 of file AdolcForward.

◆ JacobianType

template<typename Functor >
typedef Functor::JacobianType Eigen::AdolcForwardJacobian< Functor >::JacobianType

Definition at line 119 of file AdolcForward.

◆ ValueType

template<typename Functor >
typedef Functor::ValueType Eigen::AdolcForwardJacobian< Functor >::ValueType

Definition at line 118 of file AdolcForward.

Constructor & Destructor Documentation

◆ AdolcForwardJacobian() [1/5]

template<typename Functor >
Eigen::AdolcForwardJacobian< Functor >::AdolcForwardJacobian ( )
inline

Definition at line 106 of file AdolcForward.

106 : Functor() {}

◆ AdolcForwardJacobian() [2/5]

template<typename Functor >
Eigen::AdolcForwardJacobian< Functor >::AdolcForwardJacobian ( const Functor f)
inline

Definition at line 107 of file AdolcForward.

107 : Functor(f) {}

◆ AdolcForwardJacobian() [3/5]

template<typename Functor >
template<typename T0 >
Eigen::AdolcForwardJacobian< Functor >::AdolcForwardJacobian ( const T0 &  a0)
inline

Definition at line 111 of file AdolcForward.

111 : Functor(a0) {}

◆ AdolcForwardJacobian() [4/5]

template<typename Functor >
template<typename T0 , typename T1 >
Eigen::AdolcForwardJacobian< Functor >::AdolcForwardJacobian ( const T0 &  a0,
const T1 &  a1 
)
inline

Definition at line 113 of file AdolcForward.

113 : Functor(a0, a1) {}

◆ AdolcForwardJacobian() [5/5]

template<typename Functor >
template<typename T0 , typename T1 , typename T2 >
Eigen::AdolcForwardJacobian< Functor >::AdolcForwardJacobian ( const T0 &  a0,
const T1 &  a1,
const T1 &  a2 
)
inline

Definition at line 115 of file AdolcForward.

115 : Functor(a0, a1, a2) {}

Member Function Documentation

◆ operator()()

template<typename Functor >
void Eigen::AdolcForwardJacobian< Functor >::operator() ( const InputType x,
ValueType v,
JacobianType _jac 
) const
inline

Definition at line 124 of file AdolcForward.

125  {
126  eigen_assert(v!=0);
127  if (!_jac)
128  {
129  Functor::operator()(x, v);
130  return;
131  }
132 
133  JacobianType& jac = *_jac;
134 
135  ActiveInput ax = x.template cast<ActiveScalar>();
136  ActiveValue av(jac.rows());
137 
138  for (int j=0; j<jac.cols(); j++)
139  for (int i=0; i<jac.cols(); i++)
140  ax[i].setADValue(j, i==j ? 1 : 0);
141 
142  Functor::operator()(ax, &av);
143 
144  for (int i=0; i<jac.rows(); i++)
145  {
146  (*v)[i] = av[i].getValue();
147  for (int j=0; j<jac.cols(); j++)
148  jac.coeffRef(i,j) = av[i].getADValue(j);
149  }
150  }
int i
#define eigen_assert(x)
Matrix< ActiveScalar, InputType::SizeAtCompileTime, 1 > ActiveInput
Definition: AdolcForward:121
Matrix< ActiveScalar, ValueType::SizeAtCompileTime, 1 > ActiveValue
Definition: AdolcForward:122
Functor::JacobianType JacobianType
Definition: AdolcForward:119
std::ptrdiff_t j

The documentation for this class was generated from the following file: