Namespaces | Macros | Functions | Variables
testNoiseModel.cpp File Reference
#include <gtsam/linear/NoiseModel.h>
#include <gtsam/base/TestableAssertions.h>
#include <CppUnitLite/TestHarness.h>
#include <iostream>
#include <limits>
Include dependency graph for testNoiseModel.cpp:

Go to the source code of this file.

Namespaces

 exampleQR
 

Macros

#define TEST_GAUSSIAN(gaussian)
 

Functions

static const Vector3 kSigmas (kSigma, kSigma, kSigma)
 
int main ()
 
 TEST (NoiseModel, ConstrainedAll)
 
 TEST (NoiseModel, ConstrainedConstructors)
 
 TEST (NoiseModel, ConstrainedMixed)
 
 TEST (NoiseModel, constructors)
 
 TEST (NoiseModel, equals)
 
 TEST (NoiseModel, FullyConstrained)
 
 TEST (NoiseModel, lossFunctionAtZero)
 
 TEST (NoiseModel, MixedQR)
 
 TEST (NoiseModel, MixedQR2)
 
 TEST (NoiseModel, NegLogNormalizationConstant1D)
 
 TEST (NoiseModel, NegLogNormalizationConstant3D)
 
 TEST (NoiseModel, NonDiagonalGaussian)
 
 TEST (NoiseModel, OverdeterminedQR)
 
 TEST (NoiseModel, QR)
 
 TEST (NoiseModel, QRNan)
 
 TEST (NoiseModel, robustFunctionAsymmetricCauchy)
 
 TEST (NoiseModel, robustFunctionAsymmetricTukey)
 
 TEST (NoiseModel, robustFunctionCauchy)
 
 TEST (NoiseModel, robustFunctionDCS)
 
 TEST (NoiseModel, robustFunctionFair)
 
 TEST (NoiseModel, robustFunctionGemanMcClure)
 
 TEST (NoiseModel, robustFunctionHuber)
 
 TEST (NoiseModel, robustFunctionL2WithDeadZone)
 
 TEST (NoiseModel, robustFunctionTukey)
 
 TEST (NoiseModel, robustFunctionWelsch)
 
 TEST (NoiseModel, robustNoiseCustomHuber)
 
 TEST (NoiseModel, robustNoiseDCS)
 
 TEST (NoiseModel, robustNoiseGemanMcClure)
 
 TEST (NoiseModel, robustNoiseHuber)
 
 TEST (NoiseModel, robustNoiseL2WithDeadZone)
 
 TEST (NoiseModel, ScalarOrVector)
 
 TEST (NoiseModel, SmartCovariance)
 
 TEST (NoiseModel, SmartInformation)
 
 TEST (NoiseModel, SmartSqrtInformation)
 
 TEST (NoiseModel, SmartSqrtInformation2)
 
 TEST (NoiseModel, Unit)
 
 TEST (NoiseModel, WhitenInPlace)
 

Variables

Matrix exampleQR::Ab
 
SharedDiagonal exampleQR::diagonal = noiseModel::Diagonal::Sigmas(sigmas)
 
static const Matrix kCovariance = I_3x3 * kVariance
 
static const double kInverseSigma = 1.0 / kSigma
 
static const double kSigma = 2
 
static const double kVariance = kSigma * kSigma
 
static const double prc = 1.0 / kVariance
 
static const Matrix R = I_3x3 * kInverseSigma
 
Matrix exampleQR::Rd
 
Vector exampleQR::sigmas = (Vector(4) << 0.2, 0.2, 0.1, 0.1).finished()
 

Detailed Description

Date
Jan 13, 2010
Author
Richard Roberts
Frank Dellaert
Fan Jiang

Definition in file testNoiseModel.cpp.

Macro Definition Documentation

◆ TEST_GAUSSIAN

#define TEST_GAUSSIAN (   gaussian)
Value:
EQUALITY(info, gaussian->information());\
EQUALITY(cov, gaussian->covariance());\
EXPECT(assert_equal(white, gaussian->whiten(e)));\
EXPECT(assert_equal(e, gaussian->unwhiten(white)));\
EXPECT_DOUBLES_EQUAL(251.0, gaussian->squaredMahalanobisDistance(e), 1e-9);\
EXPECT_DOUBLES_EQUAL(0.5 * 251.0, gaussian->loss(251.0), 1e-9);\
Matrix A = R.inverse(); Vector b = e;\
gaussian->WhitenSystem(A, b);\
EXPECT(assert_equal(I, A));\
EXPECT(assert_equal(white, b));

Definition at line 772 of file testNoiseModel.cpp.

Function Documentation

◆ kSigmas()

static const Vector3 kSigmas ( kSigma  ,
kSigma  ,
kSigma   
)
static

◆ main()

int main ( )

Definition at line 888 of file testNoiseModel.cpp.

◆ TEST() [1/37]

TEST ( NoiseModel  ,
ConstrainedAll   
)

Definition at line 189 of file testNoiseModel.cpp.

◆ TEST() [2/37]

TEST ( NoiseModel  ,
ConstrainedConstructors   
)
  • ************************************************************************* *‍/

Definition at line 146 of file testNoiseModel.cpp.

◆ TEST() [3/37]

TEST ( NoiseModel  ,
ConstrainedMixed   
)

Definition at line 174 of file testNoiseModel.cpp.

◆ TEST() [4/37]

TEST ( NoiseModel  ,
constructors   
)

Definition at line 40 of file testNoiseModel.cpp.

◆ TEST() [5/37]

TEST ( NoiseModel  ,
equals   
)

Definition at line 109 of file testNoiseModel.cpp.

◆ TEST() [6/37]

TEST ( NoiseModel  ,
FullyConstrained   
)

Definition at line 356 of file testNoiseModel.cpp.

◆ TEST() [7/37]

TEST ( NoiseModel  ,
lossFunctionAtZero   
)

Definition at line 735 of file testNoiseModel.cpp.

◆ TEST() [8/37]

TEST ( NoiseModel  ,
MixedQR   
)

Definition at line 284 of file testNoiseModel.cpp.

◆ TEST() [9/37]

TEST ( NoiseModel  ,
MixedQR2   
)

Definition at line 317 of file testNoiseModel.cpp.

◆ TEST() [10/37]

TEST ( NoiseModel  ,
NegLogNormalizationConstant1D   
)

Definition at line 810 of file testNoiseModel.cpp.

◆ TEST() [11/37]

TEST ( NoiseModel  ,
NegLogNormalizationConstant3D   
)

Definition at line 847 of file testNoiseModel.cpp.

◆ TEST() [12/37]

TEST ( NoiseModel  ,
NonDiagonalGaussian   
)

Definition at line 784 of file testNoiseModel.cpp.

◆ TEST() [13/37]

TEST ( NoiseModel  ,
OverdeterminedQR   
)

Definition at line 252 of file testNoiseModel.cpp.

◆ TEST() [14/37]

TEST ( NoiseModel  ,
QR   
)

Definition at line 225 of file testNoiseModel.cpp.

◆ TEST() [15/37]

TEST ( NoiseModel  ,
QRNan   
)

Definition at line 379 of file testNoiseModel.cpp.

◆ TEST() [16/37]

TEST ( NoiseModel  ,
robustFunctionAsymmetricCauchy   
)

Definition at line 508 of file testNoiseModel.cpp.

◆ TEST() [17/37]

TEST ( NoiseModel  ,
robustFunctionAsymmetricTukey   
)

Definition at line 571 of file testNoiseModel.cpp.

◆ TEST() [18/37]

TEST ( NoiseModel  ,
robustFunctionCauchy   
)

Definition at line 492 of file testNoiseModel.cpp.

◆ TEST() [19/37]

TEST ( NoiseModel  ,
robustFunctionDCS   
)

Definition at line 587 of file testNoiseModel.cpp.

◆ TEST() [20/37]

TEST ( NoiseModel  ,
robustFunctionFair   
)

Definition at line 460 of file testNoiseModel.cpp.

◆ TEST() [21/37]

TEST ( NoiseModel  ,
robustFunctionGemanMcClure   
)

Definition at line 524 of file testNoiseModel.cpp.

◆ TEST() [22/37]

TEST ( NoiseModel  ,
robustFunctionHuber   
)

Definition at line 476 of file testNoiseModel.cpp.

◆ TEST() [23/37]

TEST ( NoiseModel  ,
robustFunctionL2WithDeadZone   
)

Definition at line 599 of file testNoiseModel.cpp.

◆ TEST() [24/37]

TEST ( NoiseModel  ,
robustFunctionTukey   
)

Definition at line 555 of file testNoiseModel.cpp.

◆ TEST() [25/37]

TEST ( NoiseModel  ,
robustFunctionWelsch   
)

Definition at line 539 of file testNoiseModel.cpp.

◆ TEST() [26/37]

TEST ( NoiseModel  ,
robustNoiseCustomHuber   
)

Definition at line 707 of file testNoiseModel.cpp.

◆ TEST() [27/37]

TEST ( NoiseModel  ,
robustNoiseDCS   
)

Definition at line 668 of file testNoiseModel.cpp.

◆ TEST() [28/37]

TEST ( NoiseModel  ,
robustNoiseGemanMcClure   
)

Definition at line 640 of file testNoiseModel.cpp.

◆ TEST() [29/37]

TEST ( NoiseModel  ,
robustNoiseHuber   
)

Definition at line 620 of file testNoiseModel.cpp.

◆ TEST() [30/37]

TEST ( NoiseModel  ,
robustNoiseL2WithDeadZone   
)

Definition at line 691 of file testNoiseModel.cpp.

◆ TEST() [31/37]

TEST ( NoiseModel  ,
ScalarOrVector   
)

Definition at line 431 of file testNoiseModel.cpp.

◆ TEST() [32/37]

TEST ( NoiseModel  ,
SmartCovariance   
)

Definition at line 422 of file testNoiseModel.cpp.

◆ TEST() [33/37]

TEST ( NoiseModel  ,
SmartInformation   
)

Definition at line 411 of file testNoiseModel.cpp.

◆ TEST() [34/37]

TEST ( NoiseModel  ,
SmartSqrtInformation   
)

Definition at line 393 of file testNoiseModel.cpp.

◆ TEST() [35/37]

TEST ( NoiseModel  ,
SmartSqrtInformation2   
)

Definition at line 402 of file testNoiseModel.cpp.

◆ TEST() [36/37]

TEST ( NoiseModel  ,
Unit   
)

Definition at line 101 of file testNoiseModel.cpp.

◆ TEST() [37/37]

TEST ( NoiseModel  ,
WhitenInPlace   
)

Definition at line 440 of file testNoiseModel.cpp.

Variable Documentation

◆ kCovariance

const Matrix kCovariance = I_3x3 * kVariance
static

Definition at line 36 of file testNoiseModel.cpp.

◆ kInverseSigma

const double kInverseSigma = 1.0 / kSigma
static

Definition at line 33 of file testNoiseModel.cpp.

◆ kSigma

const double kSigma = 2
static

Definition at line 33 of file testNoiseModel.cpp.

◆ kVariance

const double kVariance = kSigma * kSigma
static

Definition at line 34 of file testNoiseModel.cpp.

◆ prc

const double prc = 1.0 / kVariance
static

Definition at line 34 of file testNoiseModel.cpp.

◆ R

const Matrix R = I_3x3 * kInverseSigma
static

Definition at line 35 of file testNoiseModel.cpp.

e
Array< double, 1, 3 > e(1./3., 0.5, 2.)
b
Scalar * b
Definition: benchVecAdd.cpp:17
gtsam::Vector
Eigen::VectorXd Vector
Definition: Vector.h:38
EQUALITY
#define EQUALITY(expected, actual)
Definition: Test.h:127
A
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
Definition: bench_gemm.cpp:48
I
#define I
Definition: main.h:112
R
static const Matrix R
Definition: testNoiseModel.cpp:35
info
else if n * info
Definition: 3rdparty/Eigen/lapack/cholesky.cpp:18
gtsam::assert_equal
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
Definition: Matrix.cpp:40


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