Struct DynamicFunctor#

Inheritance Relationships#

Base Type#

Struct Documentation#

struct DynamicFunctor : public Karana::Math::Functor<double, Eigen::Dynamic, Eigen::Dynamic>#

Functor for dynamic Eigen matrices with user-supplied cost and Jacobian functions.

Public Types

using Base = Functor<double, Eigen::Dynamic, Eigen::Dynamic>#

Alias to the base functor.

Public Functions

inline DynamicFunctor(int dim1, int dim2, cost_fn f, jac_fn j)#

Constructor for DynamicFunctor.

Parameters:
  • dim1 – Number of inputs.

  • dim2 – Number of outputs.

  • f – Cost function.

  • jJacobian function.

inline int operator()(const Vec &x, Vec &fvec) const#

Evaluate the cost function.

Parameters:
  • x – Input vector.

  • fvec – Output vector.

Returns:

Status code (0 for success).

inline int df(const Vec &x, Base::JacobianType &fjac) const#

Evaluate the Jacobian.

Parameters:
  • x – Input vector.

  • fjac – Output Jacobian matrix.

Returns:

Status code (0 for success).

Public Members

cost_fn _f#

The cost function.

jac_fn _j#

The Jacobian function.