Loading...
Searching...
No Matches
gtsam::noiseModel::Base Class Referenceabstract

## 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.

Inheritance diagram for gtsam::noiseModel::Base:

## Public Member Functions

| Base (size_t dim=1)
| primary constructor
virtual bool | isConstrained () const
| true if a constrained noise model, saves slow/clumsy dynamic casting
virtual bool | isUnit () const
| true if a unit noise model, saves slow/clumsy dynamic casting
size_t | dim () const
| Dimensionality.
virtual void | print (const std::string &name="") const =0
virtual bool | equals (const Base &expected, double tol=1e-9) const =0
virtual Vector | sigmas () const
| Calculate standard deviations.
virtual Vector | whiten (const Vector &v) const =0
| Whiten an error vector.
virtual Matrix | Whiten (const Matrix &H) const =0
| Whiten a matrix.
virtual Vector | unwhiten (const Vector &v) const =0
| Unwhiten an error vector.
virtual double | squaredMahalanobisDistance (const Vector &v) const
| Squared Mahalanobis distance v'*R'*R*v = <R*v,R*v>.
virtual double | mahalanobisDistance (const Vector &v) const
| Mahalanobis distance.
virtual double | loss (const double squared_distance) const
| loss function, input is Mahalanobis distance
virtual void | WhitenSystem (std::vector< Matrix > &A, Vector &b) const =0
virtual void | WhitenSystem (Matrix &A, Vector &b) const =0
virtual void | WhitenSystem (Matrix &A1, Matrix &A2, Vector &b) const =0
virtual void | WhitenSystem (Matrix &A1, Matrix &A2, Matrix &A3, Vector &b) const =0
virtual void | whitenInPlace (Vector &v) const
| in-place whiten, override if can be done more efficiently
virtual void | unwhitenInPlace (Vector &v) const
| in-place unwhiten, override if can be done more efficiently
virtual void | whitenInPlace (Eigen::Block< Vector > &v) const
| in-place whiten, override if can be done more efficiently
virtual void | unwhitenInPlace (Eigen::Block< Vector > &v) const
| in-place unwhiten, override if can be done more efficiently
virtual Vector | unweightedWhiten (const Vector &v) const
| Useful function for robust noise models to get the unweighted but whitened error.
virtual double | weight (const Vector &v) const
| get the weight from the effective loss function on residual vector v

## Public Types

typedef boost::shared_ptr< Base > | shared_ptr

## Protected Attributes

size_t | dim_

## Friends

class | boost::serialization::access
| Serialization function.

## Constructor & Destructor Documentation

## Base()

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

inline

primary constructor

Parameters

  dim | is the dimension of the model

## Member Function Documentation

## isConstrained()

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

inline virtual

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

Reimplemented in gtsam::noiseModel::Constrained.

## isUnit()

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

inline virtual

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

Reimplemented in gtsam::noiseModel::Unit.

## loss()

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

inline virtual

loss function, input is Mahalanobis distance

Reimplemented in gtsam::noiseModel::Robust.

## sigmas()

Vector gtsam::noiseModel::Base::sigmas | ( |  | ) | const

virtual

Calculate standard deviations.

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

## squaredMahalanobisDistance()

double gtsam::noiseModel::Base::squaredMahalanobisDistance | ( | const Vector & | v | ) | const

virtual

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

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

## unweightedWhiten()

virtual Vector gtsam::noiseModel::Base::unweightedWhiten | ( | const Vector & | v | ) | const

inline virtual

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

Reimplemented in gtsam::noiseModel::Robust.

## unwhiten()

virtual Vector gtsam::noiseModel::Base::unwhiten | ( | const Vector & | v | ) | const

pure virtual

Unwhiten an error vector.

Implemented in gtsam::noiseModel::Diagonal, gtsam::noiseModel::Gaussian, gtsam::noiseModel::Isotropic, gtsam::noiseModel::Robust, and gtsam::noiseModel::Unit.

## unwhitenInPlace() [1/2]

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

inline virtual

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

Reimplemented in gtsam::noiseModel::Unit.

## unwhitenInPlace() [2/2]

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

inline virtual

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

Reimplemented in gtsam::noiseModel::Unit.

## weight()

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

inline virtual

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

Reimplemented in gtsam::noiseModel::Robust.

## Whiten()

virtual Matrix gtsam::noiseModel::Base::Whiten | ( | const Matrix & | H | ) | const

pure virtual

Whiten a matrix.

Implemented in gtsam::noiseModel::Constrained, gtsam::noiseModel::Diagonal, gtsam::noiseModel::Gaussian, gtsam::noiseModel::Isotropic, gtsam::noiseModel::Robust, and gtsam::noiseModel::Unit.

## whiten()

virtual Vector gtsam::noiseModel::Base::whiten | ( | const Vector & | v | ) | const

pure virtual

Whiten an error vector.

Implemented in gtsam::noiseModel::Constrained, gtsam::noiseModel::Diagonal, gtsam::noiseModel::Gaussian, gtsam::noiseModel::Isotropic, gtsam::noiseModel::Robust, and gtsam::noiseModel::Unit.

## whitenInPlace() [1/2]

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

inline virtual

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

Reimplemented in gtsam::noiseModel::Unit.

## whitenInPlace() [2/2]

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

inline virtual

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

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

## WhitenSystem()

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

pure virtual

Implemented in gtsam::noiseModel::Gaussian.

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

- /build/gtsam-RkN8wG/gtsam-4.2.2+dfsg/gtsam/linear/NoiseModel.h
- /build/gtsam-RkN8wG/gtsam-4.2.2+dfsg/gtsam/linear/NoiseModel.cpp