Public Types | Public Member Functions | Protected Attributes | List of all members
gtsam::noiseModel::Base Class Referenceabstract

#include <NoiseModel.h>

Inheritance diagram for gtsam::noiseModel::Base:
Inheritance graph
[legend]

Public Types

typedef std::shared_ptr< Baseshared_ptr
 

Public Member Functions

 Base (size_t dim=1)
 primary constructor More...
 
size_t dim () const
 Dimensionality. More...
 
virtual bool equals (const Base &expected, double tol=1e-9) const =0
 
virtual bool isConstrained () const
 true if a constrained noise model, saves slow/clumsy dynamic casting More...
 
virtual bool isUnit () const
 true if a unit noise model, saves slow/clumsy dynamic casting More...
 
virtual double loss (const double squared_distance) const
 loss function, input is Mahalanobis distance More...
 
virtual double mahalanobisDistance (const Vector &v) const
 Mahalanobis distance. More...
 
virtual void print (const std::string &name="") const =0
 
virtual Vector sigmas () const
 Calculate standard deviations. More...
 
virtual double squaredMahalanobisDistance (const Vector &v) const
 Squared Mahalanobis distance v'*R'*R*v = <R*v,R*v> More...
 
virtual Vector unweightedWhiten (const Vector &v) const
 
virtual Vector unwhiten (const Vector &v) const =0
 Unwhiten an error vector. More...
 
virtual void unwhitenInPlace (Eigen::Block< Vector > &v) const
 
virtual void unwhitenInPlace (Vector &v) const
 
virtual double weight (const Vector &v) const
 
virtual Matrix Whiten (const Matrix &H) const =0
 Whiten a matrix. More...
 
virtual Vector whiten (const Vector &v) const =0
 Whiten an error vector. More...
 
virtual void whitenInPlace (Eigen::Block< Vector > &v) const
 
virtual void whitenInPlace (Vector &v) const
 
virtual void WhitenSystem (Matrix &A, Vector &b) const =0
 
virtual void WhitenSystem (Matrix &A1, Matrix &A2, Matrix &A3, Vector &b) const =0
 
virtual void WhitenSystem (Matrix &A1, Matrix &A2, Vector &b) const =0
 
virtual void WhitenSystem (std::vector< Matrix > &A, Vector &b) const =0
 
virtual ~Base ()
 

Protected Attributes

size_t dim_
 

Detailed Description

noiseModel::Base is the abstract base class for all noise models.

Noise models must implement a 'whiten' function to normalize an error vector, and an 'unwhiten' function to unnormalize an error vector.

Definition at line 57 of file NoiseModel.h.

Member Typedef Documentation

◆ shared_ptr

typedef std::shared_ptr<Base> gtsam::noiseModel::Base::shared_ptr

Definition at line 60 of file NoiseModel.h.

Constructor & Destructor Documentation

◆ Base()

gtsam::noiseModel::Base::Base ( size_t  dim = 1)
inline

primary constructor

Parameters
dimis the dimension of the model

Definition at line 69 of file NoiseModel.h.

◆ ~Base()

virtual gtsam::noiseModel::Base::~Base ( )
inlinevirtual

Definition at line 70 of file NoiseModel.h.

Member Function Documentation

◆ dim()

size_t gtsam::noiseModel::Base::dim ( ) const
inline

Dimensionality.

Definition at line 79 of file NoiseModel.h.

◆ equals()

virtual bool gtsam::noiseModel::Base::equals ( const Base expected,
double  tol = 1e-9 
) const
pure virtual

◆ isConstrained()

virtual bool gtsam::noiseModel::Base::isConstrained ( ) const
inlinevirtual

true if a constrained noise model, saves slow/clumsy dynamic casting

Reimplemented in gtsam::noiseModel::Constrained.

Definition at line 73 of file NoiseModel.h.

◆ isUnit()

virtual bool gtsam::noiseModel::Base::isUnit ( ) const
inlinevirtual

true if a unit noise model, saves slow/clumsy dynamic casting

Reimplemented in gtsam::noiseModel::Unit.

Definition at line 76 of file NoiseModel.h.

◆ loss()

virtual double gtsam::noiseModel::Base::loss ( const double  squared_distance) const
inlinevirtual

loss function, input is Mahalanobis distance

Reimplemented in gtsam::noiseModel::Robust.

Definition at line 106 of file NoiseModel.h.

◆ mahalanobisDistance()

virtual double gtsam::noiseModel::Base::mahalanobisDistance ( const Vector v) const
inlinevirtual

Mahalanobis distance.

Definition at line 101 of file NoiseModel.h.

◆ print()

virtual void gtsam::noiseModel::Base::print ( const std::string &  name = "") const
pure virtual

◆ sigmas()

Vector Base::sigmas ( ) const
virtual

Calculate standard deviations.

Reimplemented in gtsam::noiseModel::Diagonal, and gtsam::noiseModel::Gaussian.

Definition at line 71 of file NoiseModel.cpp.

◆ squaredMahalanobisDistance()

double Base::squaredMahalanobisDistance ( const Vector v) const
virtual

Squared Mahalanobis distance v'*R'*R*v = <R*v,R*v>

Reimplemented in gtsam::noiseModel::Robust, gtsam::noiseModel::Unit, gtsam::noiseModel::Isotropic, and gtsam::noiseModel::Constrained.

Definition at line 76 of file NoiseModel.cpp.

◆ unweightedWhiten()

virtual Vector gtsam::noiseModel::Base::unweightedWhiten ( const Vector v) const
inlinevirtual

Useful function for robust noise models to get the unweighted but whitened error

Reimplemented in gtsam::noiseModel::Robust.

Definition at line 136 of file NoiseModel.h.

◆ unwhiten()

virtual Vector gtsam::noiseModel::Base::unwhiten ( const Vector v) const
pure virtual

◆ unwhitenInPlace() [1/2]

virtual void gtsam::noiseModel::Base::unwhitenInPlace ( Eigen::Block< Vector > &  v) const
inlinevirtual

in-place unwhiten, override if can be done more efficiently

Reimplemented in gtsam::noiseModel::Unit.

Definition at line 131 of file NoiseModel.h.

◆ unwhitenInPlace() [2/2]

virtual void gtsam::noiseModel::Base::unwhitenInPlace ( Vector v) const
inlinevirtual

in-place unwhiten, override if can be done more efficiently

Reimplemented in gtsam::noiseModel::Unit.

Definition at line 121 of file NoiseModel.h.

◆ weight()

virtual double gtsam::noiseModel::Base::weight ( const Vector v) const
inlinevirtual

get the weight from the effective loss function on residual vector v

Reimplemented in gtsam::noiseModel::Robust.

Definition at line 141 of file NoiseModel.h.

◆ Whiten()

virtual Matrix gtsam::noiseModel::Base::Whiten ( const Matrix H) const
pure virtual

◆ whiten()

virtual Vector gtsam::noiseModel::Base::whiten ( const Vector v) const
pure virtual

◆ whitenInPlace() [1/2]

virtual void gtsam::noiseModel::Base::whitenInPlace ( Eigen::Block< Vector > &  v) const
inlinevirtual

in-place whiten, override if can be done more efficiently

Reimplemented in gtsam::noiseModel::Unit.

Definition at line 126 of file NoiseModel.h.

◆ whitenInPlace() [2/2]

virtual void gtsam::noiseModel::Base::whitenInPlace ( Vector v) const
inlinevirtual

in-place whiten, override if can be done more efficiently

Reimplemented in gtsam::noiseModel::Isotropic, and gtsam::noiseModel::Unit.

Definition at line 116 of file NoiseModel.h.

◆ WhitenSystem() [1/4]

virtual void gtsam::noiseModel::Base::WhitenSystem ( Matrix A,
Vector b 
) const
pure virtual

◆ WhitenSystem() [2/4]

virtual void gtsam::noiseModel::Base::WhitenSystem ( Matrix A1,
Matrix A2,
Matrix A3,
Vector b 
) const
pure virtual

◆ WhitenSystem() [3/4]

virtual void gtsam::noiseModel::Base::WhitenSystem ( Matrix A1,
Matrix A2,
Vector b 
) const
pure virtual

◆ WhitenSystem() [4/4]

virtual void gtsam::noiseModel::Base::WhitenSystem ( std::vector< Matrix > &  A,
Vector b 
) const
pure virtual

Member Data Documentation

◆ dim_

size_t gtsam::noiseModel::Base::dim_
protected

Definition at line 64 of file NoiseModel.h.


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


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:16:40