- 3.0.2 core module.
ct::core::Derivatives< IN_DIM, OUT_DIM, SCALAR > Class Template Referenceabstract

General interface class for a Derivatives. More...

#include <Derivatives.h>

Public Types

typedef Eigen::Matrix< double, IN_DIM, 1 > IN_TYPE
 function input vector type More...
 
typedef Eigen::Matrix< double, OUT_DIM, 1 > OUT_TYPE
 function output vector type More...
 
typedef Eigen::Matrix< double, OUT_DIM, IN_DIM > JAC_TYPE
 
typedef Eigen::Matrix< double, IN_DIM, IN_DIM > HES_TYPE
 

Public Member Functions

 Derivatives ()
 
virtual ~Derivatives ()
 default destructor More...
 
virtual Derivatives< IN_DIM, OUT_DIM, SCALAR > * clone () const =0
 deep copy for derived classes More...
 
virtual OUT_TYPE forwardZero (const Eigen::VectorXd &x)
 Evaluates the method itself. More...
 
virtual JAC_TYPE jacobian (const Eigen::VectorXd &x)
 Evaluates the jacobian with respect to the input. More...
 
virtual void sparseJacobian (const Eigen::VectorXd &x, Eigen::VectorXd &jac, Eigen::VectorXi &iRow, Eigen::VectorXi &jCol)
 Returns the evaluated jacobian in sparse format. More...
 
virtual Eigen::VectorXd sparseJacobianValues (const Eigen::VectorXd &x)
 Returns the non zero values of the jacobian. More...
 
virtual HES_TYPE hessian (const Eigen::VectorXd &x, const Eigen::VectorXd &lambda)
 Evaluates the hessian (2nd order derivatives with respect to input) of the method. In case of a vector valued function, the method returns the weighted sum of the hessians with weights w. More...
 
virtual void sparseHessian (const Eigen::VectorXd &x, const Eigen::VectorXd &lambda, Eigen::VectorXd &hes, Eigen::VectorXi &iRow, Eigen::VectorXi &jCol)
 Returns the weighted sum of hessian of the problem in sparse format. More...
 
virtual Eigen::VectorXd sparseHessianValues (const Eigen::VectorXd &x, const Eigen::VectorXd &lambda)
 Returns the non zero elements of the hessian of the problem. More...
 

Detailed Description

template<int IN_DIM, int OUT_DIM, typename SCALAR = double>
class ct::core::Derivatives< IN_DIM, OUT_DIM, SCALAR >

General interface class for a Derivatives.

Interface for a general Derivatives of a vector-valued function. Can be used either with fixed size or dynamic size data types

Template Parameters
IN_DIMinput dimension of function (use Eigen::Dynamic (-1) for dynamic size)
OUT_DIMoutput dimension of function (use Eigen::Dynamic (-1) for dynamic size)
SCALARscalar data type

Member Typedef Documentation

◆ IN_TYPE

template<int IN_DIM, int OUT_DIM, typename SCALAR = double>
typedef Eigen::Matrix<double, IN_DIM, 1> ct::core::Derivatives< IN_DIM, OUT_DIM, SCALAR >::IN_TYPE

function input vector type

◆ OUT_TYPE

template<int IN_DIM, int OUT_DIM, typename SCALAR = double>
typedef Eigen::Matrix<double, OUT_DIM, 1> ct::core::Derivatives< IN_DIM, OUT_DIM, SCALAR >::OUT_TYPE

function output vector type

◆ JAC_TYPE

template<int IN_DIM, int OUT_DIM, typename SCALAR = double>
typedef Eigen::Matrix<double, OUT_DIM, IN_DIM> ct::core::Derivatives< IN_DIM, OUT_DIM, SCALAR >::JAC_TYPE

◆ HES_TYPE

template<int IN_DIM, int OUT_DIM, typename SCALAR = double>
typedef Eigen::Matrix<double, IN_DIM, IN_DIM> ct::core::Derivatives< IN_DIM, OUT_DIM, SCALAR >::HES_TYPE

Constructor & Destructor Documentation

◆ Derivatives()

template<int IN_DIM, int OUT_DIM, typename SCALAR = double>
ct::core::Derivatives< IN_DIM, OUT_DIM, SCALAR >::Derivatives ( )
inline

◆ ~Derivatives()

template<int IN_DIM, int OUT_DIM, typename SCALAR = double>
virtual ct::core::Derivatives< IN_DIM, OUT_DIM, SCALAR >::~Derivatives ( )
inlinevirtual

default destructor

Member Function Documentation

◆ clone()

template<int IN_DIM, int OUT_DIM, typename SCALAR = double>
virtual Derivatives<IN_DIM, OUT_DIM, SCALAR>* ct::core::Derivatives< IN_DIM, OUT_DIM, SCALAR >::clone ( ) const
pure virtual

◆ forwardZero()

template<int IN_DIM, int OUT_DIM, typename SCALAR = double>
virtual OUT_TYPE ct::core::Derivatives< IN_DIM, OUT_DIM, SCALAR >::forwardZero ( const Eigen::VectorXd &  x)
inlinevirtual

Evaluates the method itself.

Parameters
[in]xThe point of evaluation
Returns
The evalution of the method

Reimplemented in ct::core::DerivativesNumDiff< IN_DIM, OUT_DIM >, and ct::core::generated::TestForwardZero.

◆ jacobian()

template<int IN_DIM, int OUT_DIM, typename SCALAR = double>
virtual JAC_TYPE ct::core::Derivatives< IN_DIM, OUT_DIM, SCALAR >::jacobian ( const Eigen::VectorXd &  x)
inlinevirtual

Evaluates the jacobian with respect to the input.

Parameters
[in]xThe point of evaluation
Returns
The evaluated jacobian

Reimplemented in ct::core::DerivativesNumDiff< IN_DIM, OUT_DIM >, and ct::core::generated::TestJacobian.

◆ sparseJacobian()

template<int IN_DIM, int OUT_DIM, typename SCALAR = double>
virtual void ct::core::Derivatives< IN_DIM, OUT_DIM, SCALAR >::sparseJacobian ( const Eigen::VectorXd &  x,
Eigen::VectorXd &  jac,
Eigen::VectorXi &  iRow,
Eigen::VectorXi &  jCol 
)
inlinevirtual

Returns the evaluated jacobian in sparse format.

Parameters
[in]xThe point of evaluation
[out]jacThe non zero values of the jacobian
[out]iRowThe row indices of the non zero values
[out]jColThe column indices of the non zero values

◆ sparseJacobianValues()

template<int IN_DIM, int OUT_DIM, typename SCALAR = double>
virtual Eigen::VectorXd ct::core::Derivatives< IN_DIM, OUT_DIM, SCALAR >::sparseJacobianValues ( const Eigen::VectorXd &  x)
inlinevirtual

Returns the non zero values of the jacobian.

Parameters
[in]xThe point of evaluation
Returns
The non zeros values of the jacobian

◆ hessian()

template<int IN_DIM, int OUT_DIM, typename SCALAR = double>
virtual HES_TYPE ct::core::Derivatives< IN_DIM, OUT_DIM, SCALAR >::hessian ( const Eigen::VectorXd &  x,
const Eigen::VectorXd &  lambda 
)
inlinevirtual

Evaluates the hessian (2nd order derivatives with respect to input) of the method. In case of a vector valued function, the method returns the weighted sum of the hessians with weights w.

Parameters
[in]xThe point of evaluation
[in]lambdaThe weights of the sum
Returns
The evaluated hessian

Reimplemented in ct::core::generated::TestHessian.

◆ sparseHessian()

template<int IN_DIM, int OUT_DIM, typename SCALAR = double>
virtual void ct::core::Derivatives< IN_DIM, OUT_DIM, SCALAR >::sparseHessian ( const Eigen::VectorXd &  x,
const Eigen::VectorXd &  lambda,
Eigen::VectorXd &  hes,
Eigen::VectorXi &  iRow,
Eigen::VectorXi &  jCol 
)
inlinevirtual

Returns the weighted sum of hessian of the problem in sparse format.

Parameters
[in]xThe point of evaluation
[in]lambdaThe weights of the sum of the hessian
hesThe non zero values of the hessian
iRowThe row indices of the non zero values
jColThe column indices of the non zero values

◆ sparseHessianValues()

template<int IN_DIM, int OUT_DIM, typename SCALAR = double>
virtual Eigen::VectorXd ct::core::Derivatives< IN_DIM, OUT_DIM, SCALAR >::sparseHessianValues ( const Eigen::VectorXd &  x,
const Eigen::VectorXd &  lambda 
)
inlinevirtual

Returns the non zero elements of the hessian of the problem.

Parameters
[in]xThe point of evaluation
[in]lambdaThe weights of the sum of the hessian
Returns
{ description_of_the_return_value }

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