Namespaces | Functions | Variables
testGaussianMixture.cpp File Reference

Unit tests for GaussianMixture class. More...

#include <gtsam/discrete/DiscreteValues.h>
#include <gtsam/hybrid/GaussianMixture.h>
#include <gtsam/hybrid/GaussianMixtureFactor.h>
#include <gtsam/hybrid/HybridValues.h>
#include <gtsam/inference/Symbol.h>
#include <gtsam/linear/GaussianConditional.h>
#include <vector>
#include <CppUnitLite/TestHarness.h>
Include dependency graph for testGaussianMixture.cpp:

Go to the source code of this file.

Namespaces

 equal_constants
 
 mode_dependent_constants
 

Functions

int main ()
 
static const DiscreteKey mode (modeKey, 2)
 
 TEST (GaussianMixture, Invariants)
 Check that invariants hold. More...
 
 TEST (GaussianMixture, LogProbability)
 Check LogProbability. More...
 
 TEST (GaussianMixture, Error)
 Check error. More...
 
 TEST (GaussianMixture, Likelihood)
 
 TEST (GaussianMixture, ContinuousParents)
 
 TEST (GaussianMixture, Likelihood2)
 

Variables

static const DiscreteValues assignment0 {{M(0), 0}}
 
static const DiscreteValues assignment1 {{M(0), 1}}
 
const double equal_constants::commonSigma = 2.0
 
const std::vector< GaussianConditional::shared_ptr > equal_constants::conditionals
 
const std::vector< GaussianConditional::shared_ptr > mode_dependent_constants::conditionals
 
static const HybridValues hv0 {vv, assignment0}
 
static const HybridValues hv1 {vv, assignment1}
 
const GaussianMixture equal_constants::mixture ({Z(0)}, {X(0)}, {mode}, conditionals)
 
const GaussianMixture mode_dependent_constants::mixture ({Z(0)}, {X(0)}, {mode}, conditionals)
 
static const Key modeKey = M(0)
 
static const VectorValues vv {{Z(0), Vector1(4.9)}, {X(0), Vector1(5.0)}}
 

Detailed Description

Unit tests for GaussianMixture class.

Author
Varun Agrawal
Fan Jiang
Frank Dellaert
Date
December 2021

Definition in file testGaussianMixture.cpp.

Function Documentation

◆ main()

int main ( void  )

Definition at line 223 of file testGaussianMixture.cpp.

◆ mode()

static const DiscreteKey mode ( modeKey  ,
 
)
static

◆ TEST() [1/6]

TEST ( GaussianMixture  ,
Invariants   
)

Check that invariants hold.

Definition at line 61 of file testGaussianMixture.cpp.

◆ TEST() [2/6]

TEST ( GaussianMixture  ,
LogProbability   
)

Check LogProbability.

Definition at line 76 of file testGaussianMixture.cpp.

◆ TEST() [3/6]

TEST ( GaussianMixture  ,
Error   
)

Check error.

Definition at line 98 of file testGaussianMixture.cpp.

◆ TEST() [4/6]

TEST ( GaussianMixture  ,
Likelihood   
)

Check that the likelihood is proportional to the conditional density given the measurements.

Definition at line 121 of file testGaussianMixture.cpp.

◆ TEST() [5/6]

TEST ( GaussianMixture  ,
ContinuousParents   
)

Definition at line 162 of file testGaussianMixture.cpp.

◆ TEST() [6/6]

TEST ( GaussianMixture  ,
Likelihood2   
)

Check that the likelihood is proportional to the conditional density given the measurements.

Definition at line 173 of file testGaussianMixture.cpp.

Variable Documentation

◆ assignment0

const DiscreteValues assignment0 {{M(0), 0}}
static

Definition at line 43 of file testGaussianMixture.cpp.

◆ assignment1

const DiscreteValues assignment1 {{M(0), 1}}
static

Definition at line 43 of file testGaussianMixture.cpp.

◆ hv0

const HybridValues hv0 {vv, assignment0}
static

Definition at line 44 of file testGaussianMixture.cpp.

◆ hv1

const HybridValues hv1 {vv, assignment1}
static

Definition at line 45 of file testGaussianMixture.cpp.

◆ modeKey

const Key modeKey = M(0)
static

Definition at line 40 of file testGaussianMixture.cpp.

◆ vv

const VectorValues vv {{Z(0), Vector1(4.9)}, {X(0), Vector1(5.0)}}
static

Definition at line 42 of file testGaussianMixture.cpp.



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