- 3.0.2 core module.
|
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... | |
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
IN_DIM | input dimension of function (use Eigen::Dynamic (-1) for dynamic size) |
OUT_DIM | output dimension of function (use Eigen::Dynamic (-1) for dynamic size) |
SCALAR | scalar data type |
typedef Eigen::Matrix<double, IN_DIM, 1> ct::core::Derivatives< IN_DIM, OUT_DIM, SCALAR >::IN_TYPE |
function input vector type
typedef Eigen::Matrix<double, OUT_DIM, 1> ct::core::Derivatives< IN_DIM, OUT_DIM, SCALAR >::OUT_TYPE |
function output vector type
typedef Eigen::Matrix<double, OUT_DIM, IN_DIM> ct::core::Derivatives< IN_DIM, OUT_DIM, SCALAR >::JAC_TYPE |
typedef Eigen::Matrix<double, IN_DIM, IN_DIM> ct::core::Derivatives< IN_DIM, OUT_DIM, SCALAR >::HES_TYPE |
|
inline |
|
inlinevirtual |
default destructor
|
pure virtual |
deep copy for derived classes
Implemented in ct::core::DerivativesNumDiff< IN_DIM, OUT_DIM >, ct::core::generated::TestForwardZero, ct::core::generated::TestHessian, and ct::core::generated::TestJacobian.
Referenced by ct::core::Derivatives< 3, 2, double >::~Derivatives().
|
inlinevirtual |
Evaluates the method itself.
[in] | x | The point of evaluation |
Reimplemented in ct::core::DerivativesNumDiff< IN_DIM, OUT_DIM >, and ct::core::generated::TestForwardZero.
|
inlinevirtual |
Evaluates the jacobian with respect to the input.
[in] | x | The point of evaluation |
Reimplemented in ct::core::DerivativesNumDiff< IN_DIM, OUT_DIM >, and ct::core::generated::TestJacobian.
|
inlinevirtual |
Returns the evaluated jacobian in sparse format.
[in] | x | The point of evaluation |
[out] | jac | The non zero values of the jacobian |
[out] | iRow | The row indices of the non zero values |
[out] | jCol | The column indices of the non zero values |
|
inlinevirtual |
Returns the non zero values of the jacobian.
[in] | x | The point of evaluation |
|
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.
[in] | x | The point of evaluation |
[in] | lambda | The weights of the sum |
Reimplemented in ct::core::generated::TestHessian.
|
inlinevirtual |
Returns the weighted sum of hessian of the problem in sparse format.
[in] | x | The point of evaluation |
[in] | lambda | The weights of the sum of the hessian |
hes | The non zero values of the hessian | |
iRow | The row indices of the non zero values | |
jCol | The column indices of the non zero values |
|
inlinevirtual |
Returns the non zero elements of the hessian of the problem.
[in] | x | The point of evaluation |
[in] | lambda | The weights of the sum of the hessian |