gtsam
Loading...
Searching...
No Matches
gtsam::Basis< DERIVED >::VectorDerivativeFunctor Class Reference

Detailed Description

template<typename DERIVED>
class gtsam::Basis< DERIVED >::VectorDerivativeFunctor

VectorDerivativeFunctor at a given x, applied to a parameter Matrix.

This functor is used to evaluate the derivatives of a parameterized function at a given scalar value x. When given a specific M*N parameters, returns an M-vector the M corresponding function derivatives at x, possibly with Jacobians wrpt the parameters.

Inheritance diagram for gtsam::Basis< DERIVED >::VectorDerivativeFunctor:

Public Member Functions

 VectorDerivativeFunctor ()
 For serialization.
 VectorDerivativeFunctor (size_t M, size_t N, double x)
 Default Constructor.
 VectorDerivativeFunctor (size_t M, size_t N, double x, double a, double b)
 Constructor, with optional interval [a,b].
Vector apply (const Matrix &P, OptionalJacobian< -1, -1 > H={}) const
Vector operator() (const Matrix &P, OptionalJacobian< -1, -1 > H={}) const
 c++ sugar

Protected Types

using Jacobian = Eigen::Matrix<double, -1, -1>

Protected Member Functions

void calculateJacobian ()
 Calculate the M*(M*N) Jacobian of this functor with respect to the M*N parameter matrix P.
Protected Member Functions inherited from gtsam::Basis< DERIVED >::DerivativeFunctorBase
 DerivativeFunctorBase ()
 For serialization.
 DerivativeFunctorBase (size_t N, double x)
 DerivativeFunctorBase (size_t N, double x, double a, double b)
void print (const std::string &s="") const

Protected Attributes

Jacobian H_
size_t M_
Protected Attributes inherited from gtsam::Basis< DERIVED >::DerivativeFunctorBase
Weights weights_

Member Function Documentation

◆ calculateJacobian()

template<typename DERIVED>
void gtsam::Basis< DERIVED >::VectorDerivativeFunctor::calculateJacobian ( )
inlineprotected

Calculate the M*(M*N) Jacobian of this functor with respect to the M*N parameter matrix P.

We flatten assuming column-major order, e.g., if N=3 and M=2, we have H =[ w(0) 0 w(1) 0 w(2) 0 0 w(0) 0 w(1) 0 w(2) ] i.e., the Kronecker product of weights_ with the MxM identity matrix.


The documentation for this class was generated from the following file:
  • /tmp/gtsam-4.3.0-doxygen.rsXPUS/source/gtsam/basis/Basis.h