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, constructors)
 
 TEST (NoiseModel, Unit)
 
 TEST (NoiseModel, equals)
 
 TEST (NoiseModel, ConstrainedConstructors)
 
 TEST (NoiseModel, ConstrainedMixed)
 
 TEST (NoiseModel, ConstrainedAll)
 
 TEST (NoiseModel, QR)
 
 TEST (NoiseModel, OverdeterminedQR)
 
 TEST (NoiseModel, MixedQR)
 
 TEST (NoiseModel, MixedQR2)
 
 TEST (NoiseModel, FullyConstrained)
 
 TEST (NoiseModel, QRNan)
 
 TEST (NoiseModel, SmartSqrtInformation)
 
 TEST (NoiseModel, SmartSqrtInformation2)
 
 TEST (NoiseModel, SmartInformation)
 
 TEST (NoiseModel, SmartCovariance)
 
 TEST (NoiseModel, ScalarOrVector)
 
 TEST (NoiseModel, WhitenInPlace)
 
 TEST (NoiseModel, robustFunctionFair)
 
 TEST (NoiseModel, robustFunctionHuber)
 
 TEST (NoiseModel, robustFunctionCauchy)
 
 TEST (NoiseModel, robustFunctionGemanMcClure)
 
 TEST (NoiseModel, robustFunctionWelsch)
 
 TEST (NoiseModel, robustFunctionTukey)
 
 TEST (NoiseModel, robustFunctionDCS)
 
 TEST (NoiseModel, robustFunctionL2WithDeadZone)
 
 TEST (NoiseModel, robustNoiseHuber)
 
 TEST (NoiseModel, robustNoiseGemanMcClure)
 
 TEST (NoiseModel, robustNoiseDCS)
 
 TEST (NoiseModel, robustNoiseL2WithDeadZone)
 
 TEST (NoiseModel, lossFunctionAtZero)
 
 TEST (NoiseModel, NonDiagonalGaussian)
 

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

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

Definition at line 704 of file testNoiseModel.cpp.

Function Documentation

◆ kSigmas()

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

◆ main()

int main ( void  )

Definition at line 743 of file testNoiseModel.cpp.

◆ TEST() [1/32]

TEST ( NoiseModel  ,
constructors   
)

Definition at line 39 of file testNoiseModel.cpp.

◆ TEST() [2/32]

TEST ( NoiseModel  ,
Unit   
)

Definition at line 100 of file testNoiseModel.cpp.

◆ TEST() [3/32]

TEST ( NoiseModel  ,
equals   
)

Definition at line 108 of file testNoiseModel.cpp.

◆ TEST() [4/32]

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

Definition at line 145 of file testNoiseModel.cpp.

◆ TEST() [5/32]

TEST ( NoiseModel  ,
ConstrainedMixed   
)

Definition at line 173 of file testNoiseModel.cpp.

◆ TEST() [6/32]

TEST ( NoiseModel  ,
ConstrainedAll   
)

Definition at line 188 of file testNoiseModel.cpp.

◆ TEST() [7/32]

TEST ( NoiseModel  ,
QR   
)

Definition at line 224 of file testNoiseModel.cpp.

◆ TEST() [8/32]

TEST ( NoiseModel  ,
OverdeterminedQR   
)

Definition at line 251 of file testNoiseModel.cpp.

◆ TEST() [9/32]

TEST ( NoiseModel  ,
MixedQR   
)

Definition at line 283 of file testNoiseModel.cpp.

◆ TEST() [10/32]

TEST ( NoiseModel  ,
MixedQR2   
)

Definition at line 316 of file testNoiseModel.cpp.

◆ TEST() [11/32]

TEST ( NoiseModel  ,
FullyConstrained   
)

Definition at line 355 of file testNoiseModel.cpp.

◆ TEST() [12/32]

TEST ( NoiseModel  ,
QRNan   
)

Definition at line 378 of file testNoiseModel.cpp.

◆ TEST() [13/32]

TEST ( NoiseModel  ,
SmartSqrtInformation   
)

Definition at line 392 of file testNoiseModel.cpp.

◆ TEST() [14/32]

TEST ( NoiseModel  ,
SmartSqrtInformation2   
)

Definition at line 401 of file testNoiseModel.cpp.

◆ TEST() [15/32]

TEST ( NoiseModel  ,
SmartInformation   
)

Definition at line 410 of file testNoiseModel.cpp.

◆ TEST() [16/32]

TEST ( NoiseModel  ,
SmartCovariance   
)

Definition at line 421 of file testNoiseModel.cpp.

◆ TEST() [17/32]

TEST ( NoiseModel  ,
ScalarOrVector   
)

Definition at line 430 of file testNoiseModel.cpp.

◆ TEST() [18/32]

TEST ( NoiseModel  ,
WhitenInPlace   
)

Definition at line 439 of file testNoiseModel.cpp.

◆ TEST() [19/32]

TEST ( NoiseModel  ,
robustFunctionFair   
)

Definition at line 459 of file testNoiseModel.cpp.

◆ TEST() [20/32]

TEST ( NoiseModel  ,
robustFunctionHuber   
)

Definition at line 475 of file testNoiseModel.cpp.

◆ TEST() [21/32]

TEST ( NoiseModel  ,
robustFunctionCauchy   
)

Definition at line 491 of file testNoiseModel.cpp.

◆ TEST() [22/32]

TEST ( NoiseModel  ,
robustFunctionGemanMcClure   
)

Definition at line 507 of file testNoiseModel.cpp.

◆ TEST() [23/32]

TEST ( NoiseModel  ,
robustFunctionWelsch   
)

Definition at line 522 of file testNoiseModel.cpp.

◆ TEST() [24/32]

TEST ( NoiseModel  ,
robustFunctionTukey   
)

Definition at line 538 of file testNoiseModel.cpp.

◆ TEST() [25/32]

TEST ( NoiseModel  ,
robustFunctionDCS   
)

Definition at line 554 of file testNoiseModel.cpp.

◆ TEST() [26/32]

TEST ( NoiseModel  ,
robustFunctionL2WithDeadZone   
)

Definition at line 566 of file testNoiseModel.cpp.

◆ TEST() [27/32]

TEST ( NoiseModel  ,
robustNoiseHuber   
)

Definition at line 587 of file testNoiseModel.cpp.

◆ TEST() [28/32]

TEST ( NoiseModel  ,
robustNoiseGemanMcClure   
)

Definition at line 607 of file testNoiseModel.cpp.

◆ TEST() [29/32]

TEST ( NoiseModel  ,
robustNoiseDCS   
)

Definition at line 635 of file testNoiseModel.cpp.

◆ TEST() [30/32]

TEST ( NoiseModel  ,
robustNoiseL2WithDeadZone   
)

Definition at line 658 of file testNoiseModel.cpp.

◆ TEST() [31/32]

TEST ( NoiseModel  ,
lossFunctionAtZero   
)

Definition at line 673 of file testNoiseModel.cpp.

◆ TEST() [32/32]

TEST ( NoiseModel  ,
NonDiagonalGaussian   
)

Definition at line 716 of file testNoiseModel.cpp.

Variable Documentation

◆ kCovariance

const Matrix kCovariance = I_3x3 * kVariance
static

Definition at line 35 of file testNoiseModel.cpp.

◆ kInverseSigma

const double kInverseSigma = 1.0 / kSigma
static

Definition at line 32 of file testNoiseModel.cpp.

◆ kSigma

const double kSigma = 2
static

Definition at line 32 of file testNoiseModel.cpp.

◆ kVariance

const double kVariance = kSigma * kSigma
static

Definition at line 33 of file testNoiseModel.cpp.

◆ prc

const double prc = 1.0 / kVariance
static

Definition at line 33 of file testNoiseModel.cpp.

◆ R

const Matrix R = I_3x3 * kInverseSigma
static

Definition at line 34 of file testNoiseModel.cpp.



gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:40:56