Gaussian implements the mathematical model |R*x|^2 = |y|^2 with R'*R=inv(Sigma) where y = whiten(x) = R*x x = unwhiten(x) = inv(R)*y as indeed |y|^2 = y'*y = x'*R'*R*x Various derived classes are available that are more efficient.
The named constructors return a shared_ptr because, when the smart flag is true, the underlying object might be a derived class such as Diagonal.
|
|
| Gaussian (size_t dim=1, const std::optional< Matrix > &sqrt_information={}) |
| | constructor takes square root information matrix
|
| void | print (const std::string &name) const override |
|
bool | equals (const Base &expected, double tol=1e-9) const override |
| Vector | sigmas () const override |
| | Calculate standard deviations.
|
| Vector | whiten (const Vector &v) const override |
| | Whiten an error vector.
|
| Vector | unwhiten (const Vector &v) const override |
| | Unwhiten an error vector.
|
| void | unwhitenInPlace (Vector &v) const override |
| | in-place unwhiten, override if can be done more efficiently
|
| void | unwhitenInPlace (Eigen::Block< Vector > &v) const override |
| | in-place unwhiten, override if can be done more efficiently
|
| Matrix | Whiten (const Matrix &H) const override |
| | Multiply a derivative with R (derivative of whiten) Equivalent to whitening each column of the input matrix.
|
|
virtual void | WhitenInPlace (Matrix &H) const |
| | In-place version.
|
|
virtual void | WhitenInPlace (Eigen::Block< Matrix > H) const |
| | In-place version.
|
| void | WhitenSystem (std::vector< Matrix > &A, Vector &b) const override |
| | Whiten a system, in place as well.
|
| 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 |
| | 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).
|
|
virtual Matrix | R () const |
| | Return R itself, but note that Whiten(H) is cheaper than R*H.
|
|
virtual Matrix | information () const |
| | Compute information matrix.
|
|
virtual Matrix | covariance () const |
| | Compute covariance matrix.
|
|
double | logDeterminant () const |
| | Compute the log of |Σ|.
|
| double | negLogConstant () const |
| | Compute the negative log of the normalization constant for a Gaussian noise model k = 1/\sqrt(|2πΣ|).
|
| | 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 bool | equals (const Base &expected, double tol=1e-9) const =0 |
| 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 squared Mahalanobis distance.
|
| virtual double | loss (const Vector &v) const |
| | Evaluate the loss of an unwhitened residual v.
|
| virtual void | whitenInPlace (Vector &v) const |
| | in-place whiten, 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 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
|