gtsam 4.1.1
gtsam
gtsam::Basis< DERIVED >::VectorEvaluationFunctor< M > Class Template Reference

Detailed Description

template<typename DERIVED>
template<int M>
class gtsam::Basis< DERIVED >::VectorEvaluationFunctor< M >

VectorEvaluationFunctor at a given x, applied to ParameterMatrix<M>.

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

+ Inheritance diagram for gtsam::Basis< DERIVED >::VectorEvaluationFunctor< M >:

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW VectorEvaluationFunctor ()
 For serialization.
 
 VectorEvaluationFunctor (size_t N, double x)
 Default Constructor.
 
 VectorEvaluationFunctor (size_t N, double x, double a, double b)
 Constructor, with interval [a,b].
 
VectorM apply (const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > H=boost::none) const
 M-dimensional evaluation.
 
VectorM operator() (const ParameterMatrix< M > &P, OptionalJacobian< -1, -1 > H=boost::none) const
 c++ sugar
 

Protected Types

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

Protected Member Functions

void calculateJacobian ()
 Calculate the M*(M*N) Jacobian of this functor with respect to the M*N parameter matrix P. More...
 
- Protected Member Functions inherited from gtsam::Basis< DERIVED >::EvaluationFunctor
 EvaluationFunctor ()
 For serialization.
 
 EvaluationFunctor (size_t N, double x)
 Constructor with interval [a,b].
 
 EvaluationFunctor (size_t N, double x, double a, double b)
 Constructor with interval [a,b].
 
double apply (const typename DERIVED::Parameters &p, OptionalJacobian<-1, -1 > H=boost::none) const
 Regular 1D evaluation.
 
double operator() (const typename DERIVED::Parameters &p, OptionalJacobian<-1, -1 > H=boost::none) const
 c++ sugar
 
void print (const std::string &s="") const
 

Protected Attributes

Jacobian H_
 
- Protected Attributes inherited from gtsam::Basis< DERIVED >::EvaluationFunctor
Weights weights_
 

Member Function Documentation

◆ calculateJacobian()

template<typename DERIVED >
template<int M>
void gtsam::Basis< DERIVED >::VectorEvaluationFunctor< M >::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: