GTSAM
4.0.2
C++ library for smoothing and mapping (SAM)
|
#include <NoiseModel.h>
Public Types | |
typedef std::shared_ptr< Unit > | shared_ptr |
Public Member Functions | |
Unit (size_t dim=1) | |
bool | isUnit () const override |
true if a unit noise model, saves slow/clumsy dynamic casting | |
void | print (const std::string &name) const override |
double | squaredMahalanobisDistance (const Vector &v) const override |
Squared Mahalanobis distance v'*R'*R*v = <R*v,R*v> | |
Vector | whiten (const Vector &v) const override |
Whiten an error vector. | |
Vector | unwhiten (const Vector &v) const override |
Unwhiten an error vector. | |
Matrix | Whiten (const Matrix &H) const override |
void | WhitenInPlace (Matrix &) const override |
void | WhitenInPlace (Eigen::Block< Matrix >) const override |
void | whitenInPlace (Vector &) const override |
void | unwhitenInPlace (Vector &) const override |
void | whitenInPlace (Eigen::Block< Vector > &) const override |
void | unwhitenInPlace (Eigen::Block< Vector > &) const override |
double | sigma () const |
double | sigma (size_t i) const |
Vector | sigmas () const override |
Calculate standard deviations. | |
const Vector & | invsigmas () const |
double | invsigma (size_t i) const |
const Vector & | precisions () const |
double | precision (size_t i) const |
Matrix | R () const override |
bool | equals (const Base &expected, double tol=1e-9) const override |
void | WhitenSystem (std::vector< Matrix > &A, Vector &b) const override |
void | WhitenSystem (Matrix &A, Vector &b) const override |
void | WhitenSystem (Matrix &A1, Matrix &A2, Vector &b) const override |
void | WhitenSystem (Matrix &A1, Matrix &A2, Matrix &A3, Vector &b) const override |
virtual std::shared_ptr< Diagonal > | QR (Matrix &Ab) const |
virtual Matrix | information () const |
Compute information matrix. | |
virtual Matrix | covariance () const |
Compute covariance matrix. | |
virtual bool | isConstrained () const |
true if a constrained noise model, saves slow/clumsy dynamic casting | |
size_t | dim () const |
Dimensionality. | |
virtual double | mahalanobisDistance (const Vector &v) const |
Mahalanobis distance. | |
virtual double | loss (const double squared_distance) const |
loss function, input is Mahalanobis distance | |
virtual Vector | unweightedWhiten (const Vector &v) const |
virtual double | weight (const Vector &v) const |
Static Public Member Functions | |
static shared_ptr | Create (size_t dim) |
static shared_ptr | Sigma (size_t dim, double sigma, bool smart=true) |
static shared_ptr | Variance (size_t dim, double variance, bool smart=true) |
static shared_ptr | Precision (size_t dim, double precision, bool smart=true) |
static shared_ptr | Sigmas (const Vector &sigmas, bool smart=true) |
static shared_ptr | Variances (const Vector &variances, bool smart=true) |
static shared_ptr | Precisions (const Vector &precisions, bool smart=true) |
static shared_ptr | SqrtInformation (const Matrix &R, bool smart=true) |
static shared_ptr | Information (const Matrix &M, bool smart=true) |
static shared_ptr | Covariance (const Matrix &covariance, bool smart=true) |
Protected Attributes | |
double | sigma_ |
double | invsigma_ |
Vector | sigmas_ |
Vector | invsigmas_ |
Vector | precisions_ |
std::optional< Matrix > | sqrt_information_ |
size_t | dim_ |
Unit: i.i.d. unit-variance noise on all m dimensions.
|
inline |
constructor for serialization
|
staticinherited |
A Gaussian noise model created by specifying a covariance matrix.
covariance | The square covariance Matrix |
smart | check if can be simplified to derived class |
|
inlinestatic |
Create a unit covariance noise model
|
staticinherited |
A Gaussian noise model created by specifying an information matrix.
M | The information matrix |
smart | check if can be simplified to derived class |
|
inlineinherited |
Return sqrt precisions
|
inlinestaticinherited |
An isotropic noise model created by specifying a precision
|
staticinherited |
A diagonal noise model created by specifying a Vector of precisions, i.e. i.e. the diagonal of the information matrix, i.e., weights
|
inlineinherited |
Return precisions
|
virtualinherited |
Apply appropriately weighted QR factorization to the system [A b] Q' * [A b] = [R d] Dimensions: (r*m) * m*(n+1) = r*(n+1), where r = min(m,n). This routine performs an in-place factorization on Ab. Below-diagonal elements are set to zero by this routine.
Ab | is the m*(n+1) augmented system matrix [A b] |
Reimplemented in gtsam::noiseModel::Constrained.
|
inlineoverridevirtualinherited |
Return R itself, but note that Whiten(H) is cheaper than R*H
Reimplemented from gtsam::noiseModel::Gaussian.
|
inlineinherited |
Return standard deviations (sqrt of diagonal)
|
staticinherited |
An isotropic noise model created by specifying a standard devation sigma
|
inlineinherited |
Return standard deviation
|
staticinherited |
A diagonal noise model created by specifying a Vector of sigmas, i.e. standard deviations, the diagonal of the square root covariance matrix.
|
staticinherited |
A Gaussian noise model created by specifying a square root information matrix.
R | The (upper-triangular) square root information matrix |
smart | check if can be simplified to derived class |
|
inlinevirtualinherited |
Useful function for robust noise models to get the unweighted but whitened error
Reimplemented in gtsam::noiseModel::Robust.
|
inlineoverridevirtual |
in-place unwhiten, override if can be done more efficiently
Reimplemented from gtsam::noiseModel::Base.
|
inlineoverridevirtual |
in-place unwhiten, override if can be done more efficiently
Reimplemented from gtsam::noiseModel::Base.
|
staticinherited |
An isotropic noise model created by specifying a variance = sigma^2.
dim | The dimension of this noise model |
variance | The variance of this noise model |
smart | check if can be simplified to derived class |
|
staticinherited |
A diagonal noise model created by specifying a Vector of variances, i.e. i.e. the diagonal of the covariance matrix.
variances | A vector containing the variances of this noise model |
smart | check if can be simplified to derived class |
|
inlinevirtualinherited |
get the weight from the effective loss function on residual vector v
Reimplemented in gtsam::noiseModel::Robust.
|
inlineoverridevirtual |
Multiply a derivative with R (derivative of whiten) Equivalent to whitening each column of the input matrix.
Reimplemented from gtsam::noiseModel::Isotropic.
|
inlineoverridevirtual |
In-place version
Reimplemented from gtsam::noiseModel::Isotropic.
|
inlineoverridevirtual |
In-place version
Reimplemented from gtsam::noiseModel::Isotropic.
|
inlineoverridevirtual |
in-place whiten, override if can be done more efficiently
Reimplemented from gtsam::noiseModel::Isotropic.
|
inlineoverridevirtual |
in-place whiten, override if can be done more efficiently
Reimplemented from gtsam::noiseModel::Base.
|
overridevirtualinherited |
Whiten a system, in place as well
Implements gtsam::noiseModel::Base.
|
protectedinherited |
Standard deviations (sigmas), their inverse and inverse square (weights/precisions) These are all computed at construction: the idea is to use one shared model where computation is done only once, the common use case in many problems.
|
protectedinherited |
Matrix square root of information matrix (R)