Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
gtsam::BetweenFactorEM< VALUE > Class Template Reference

#include <BetweenFactorEM.h>

Inheritance diagram for gtsam::BetweenFactorEM< VALUE >:
Inheritance graph
[legend]

Public Types

typedef std::shared_ptr< BetweenFactorEMshared_ptr
 
typedef VALUE T
 
- Public Types inherited from gtsam::NonlinearFactor
typedef std::shared_ptr< Thisshared_ptr
 
- Public Types inherited from gtsam::Factor
typedef KeyVector::const_iterator const_iterator
 Const iterator over keys. More...
 
typedef KeyVector::iterator iterator
 Iterator over keys. More...
 

Public Member Functions

 BetweenFactorEM ()
 
 BetweenFactorEM (Key key1, Key key2, const VALUE &measured, const SharedGaussian &model_inlier, const SharedGaussian &model_outlier, const double prior_inlier, const double prior_outlier, const bool flag_bump_up_near_zero_probs=false)
 
Vector calcIndicatorProb (const Values &x) const
 
size_t dim () const override
 
bool equals (const NonlinearFactor &f, double tol=1e-9) const override
 
double error (const Values &x) const override
 
bool get_flag_bump_up_near_zero_probs () const
 
SharedGaussian get_model_inlier () const
 
Matrix get_model_inlier_cov () const
 
SharedGaussian get_model_outlier () const
 
Matrix get_model_outlier_cov () const
 
std::shared_ptr< GaussianFactorlinearize (const Values &x) const override
 
const VALUE & measured () const
 
void print (const std::string &s, const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
 
void set_flag_bump_up_near_zero_probs (bool flag)
 
Vector unwhitenedError (const Values &x) const
 
void updateNoiseModels (const Values &values, const NonlinearFactorGraph &graph)
 
void updateNoiseModels_givenCovs (const Values &values, const Matrix &cov1, const Matrix &cov2, const Matrix &cov12)
 
Vector whitenedError (const Values &x, OptionalMatrixVecType H=nullptr) const
 
Vector whitenedError (const Values &x, std::vector< Matrix > &H) const
 
 ~BetweenFactorEM () override
 
- Public Member Functions inherited from gtsam::NonlinearFactor
 NonlinearFactor ()
 
template<typename CONTAINER >
 NonlinearFactor (const CONTAINER &keys)
 
double error (const HybridValues &c) const override
 
virtual bool active (const Values &) const
 
virtual shared_ptr clone () const
 
virtual shared_ptr rekey (const std::map< Key, Key > &rekey_mapping) const
 
virtual shared_ptr rekey (const KeyVector &new_keys) const
 
virtual bool sendable () const
 
- Public Member Functions inherited from gtsam::Factor
virtual ~Factor ()=default
 Default destructor. More...
 
bool empty () const
 Whether the factor is empty (involves zero variables). More...
 
Key front () const
 First key. More...
 
Key back () const
 Last key. More...
 
const_iterator find (Key key) const
 find More...
 
const KeyVectorkeys () const
 Access the factor's involved variable keys. More...
 
const_iterator begin () const
 
const_iterator end () const
 
size_t size () const
 
virtual void printKeys (const std::string &s="Factor", const KeyFormatter &formatter=DefaultKeyFormatter) const
 print only keys More...
 
bool equals (const This &other, double tol=1e-9) const
 check equality More...
 
KeyVectorkeys ()
 
iterator begin ()
 
iterator end ()
 

Private Types

typedef NonlinearFactor Base
 
typedef BetweenFactorEM< VALUE > This
 

Private Attributes

bool flag_bump_up_near_zero_probs_
 
Key key1_
 
Key key2_
 
VALUE measured_
 
SharedGaussian model_inlier_
 
SharedGaussian model_outlier_
 
double prior_inlier_
 
double prior_outlier_
 

Additional Inherited Members

- Protected Types inherited from gtsam::NonlinearFactor
typedef Factor Base
 
typedef NonlinearFactor This
 
- Protected Member Functions inherited from gtsam::Factor
 Factor ()
 
template<typename CONTAINER >
 Factor (const CONTAINER &keys)
 
template<typename ITERATOR >
 Factor (ITERATOR first, ITERATOR last)
 
- Static Protected Member Functions inherited from gtsam::Factor
template<typename CONTAINER >
static Factor FromKeys (const CONTAINER &keys)
 
template<typename ITERATOR >
static Factor FromIterators (ITERATOR first, ITERATOR last)
 
- Protected Attributes inherited from gtsam::Factor
KeyVector keys_
 The keys involved in this factor. More...
 

Detailed Description

template<class VALUE>
class gtsam::BetweenFactorEM< VALUE >

A class for a measurement predicted by "between(config[key1],config[key2])"

Template Parameters
VALUEthe Value type

Definition at line 34 of file BetweenFactorEM.h.

Member Typedef Documentation

◆ Base

template<class VALUE>
typedef NonlinearFactor gtsam::BetweenFactorEM< VALUE >::Base
private

Definition at line 43 of file BetweenFactorEM.h.

◆ shared_ptr

template<class VALUE>
typedef std::shared_ptr<BetweenFactorEM> gtsam::BetweenFactorEM< VALUE >::shared_ptr

concept check by type

Definition at line 65 of file BetweenFactorEM.h.

◆ T

template<class VALUE>
typedef VALUE gtsam::BetweenFactorEM< VALUE >::T

Definition at line 38 of file BetweenFactorEM.h.

◆ This

template<class VALUE>
typedef BetweenFactorEM<VALUE> gtsam::BetweenFactorEM< VALUE >::This
private

Definition at line 42 of file BetweenFactorEM.h.

Constructor & Destructor Documentation

◆ BetweenFactorEM() [1/2]

template<class VALUE>
gtsam::BetweenFactorEM< VALUE >::BetweenFactorEM ( )
inline

default constructor - only use for serialization

Definition at line 68 of file BetweenFactorEM.h.

◆ BetweenFactorEM() [2/2]

template<class VALUE>
gtsam::BetweenFactorEM< VALUE >::BetweenFactorEM ( Key  key1,
Key  key2,
const VALUE &  measured,
const SharedGaussian model_inlier,
const SharedGaussian model_outlier,
const double  prior_inlier,
const double  prior_outlier,
const bool  flag_bump_up_near_zero_probs = false 
)
inline

Constructor

Definition at line 72 of file BetweenFactorEM.h.

◆ ~BetweenFactorEM()

template<class VALUE>
gtsam::BetweenFactorEM< VALUE >::~BetweenFactorEM ( )
inlineoverride

Definition at line 82 of file BetweenFactorEM.h.

Member Function Documentation

◆ calcIndicatorProb()

template<class VALUE>
Vector gtsam::BetweenFactorEM< VALUE >::calcIndicatorProb ( const Values x) const
inline

Definition at line 238 of file BetweenFactorEM.h.

◆ dim()

template<class VALUE>
size_t gtsam::BetweenFactorEM< VALUE >::dim ( ) const
inlineoverridevirtual

get the dimension of the factor (number of rows on linearization)

Implements gtsam::NonlinearFactor.

Definition at line 412 of file BetweenFactorEM.h.

◆ equals()

template<class VALUE>
bool gtsam::BetweenFactorEM< VALUE >::equals ( const NonlinearFactor f,
double  tol = 1e-9 
) const
inlineoverridevirtual

equals

Reimplemented from gtsam::NonlinearFactor.

Definition at line 101 of file BetweenFactorEM.h.

◆ error()

template<class VALUE>
double gtsam::BetweenFactorEM< VALUE >::error ( const Values x) const
inlineoverridevirtual

implement functions needed to derive from Factor

Reimplemented from gtsam::NonlinearFactor.

Definition at line 118 of file BetweenFactorEM.h.

◆ get_flag_bump_up_near_zero_probs()

template<class VALUE>
bool gtsam::BetweenFactorEM< VALUE >::get_flag_bump_up_near_zero_probs ( ) const
inline

Definition at line 312 of file BetweenFactorEM.h.

◆ get_model_inlier()

template<class VALUE>
SharedGaussian gtsam::BetweenFactorEM< VALUE >::get_model_inlier ( ) const
inline

Definition at line 317 of file BetweenFactorEM.h.

◆ get_model_inlier_cov()

template<class VALUE>
Matrix gtsam::BetweenFactorEM< VALUE >::get_model_inlier_cov ( ) const
inline

Definition at line 327 of file BetweenFactorEM.h.

◆ get_model_outlier()

template<class VALUE>
SharedGaussian gtsam::BetweenFactorEM< VALUE >::get_model_outlier ( ) const
inline

Definition at line 322 of file BetweenFactorEM.h.

◆ get_model_outlier_cov()

template<class VALUE>
Matrix gtsam::BetweenFactorEM< VALUE >::get_model_outlier_cov ( ) const
inline

Definition at line 332 of file BetweenFactorEM.h.

◆ linearize()

template<class VALUE>
std::shared_ptr<GaussianFactor> gtsam::BetweenFactorEM< VALUE >::linearize ( const Values x) const
inlineoverridevirtual

Linearize a non-linearFactorN to get a GaussianFactor, $ Ax-b \approx h(x+\delta x)-z = h(x) + A \delta x - z $ Hence $ b = z - h(x) = - \mathtt{error\_vector}(x) $

Implements gtsam::NonlinearFactor.

Definition at line 129 of file BetweenFactorEM.h.

◆ measured()

template<class VALUE>
const VALUE& gtsam::BetweenFactorEM< VALUE >::measured ( ) const
inline

return the measured

Definition at line 408 of file BetweenFactorEM.h.

◆ print()

template<class VALUE>
void gtsam::BetweenFactorEM< VALUE >::print ( const std::string &  s,
const KeyFormatter keyFormatter = DefaultKeyFormatter 
) const
inlineoverridevirtual

implement functions needed for Testable print

Reimplemented from gtsam::NonlinearFactor.

Definition at line 88 of file BetweenFactorEM.h.

◆ set_flag_bump_up_near_zero_probs()

template<class VALUE>
void gtsam::BetweenFactorEM< VALUE >::set_flag_bump_up_near_zero_probs ( bool  flag)
inline

Definition at line 307 of file BetweenFactorEM.h.

◆ unwhitenedError()

template<class VALUE>
Vector gtsam::BetweenFactorEM< VALUE >::unwhitenedError ( const Values x) const
inline

Definition at line 294 of file BetweenFactorEM.h.

◆ updateNoiseModels()

template<class VALUE>
void gtsam::BetweenFactorEM< VALUE >::updateNoiseModels ( const Values values,
const NonlinearFactorGraph graph 
)
inline

Definition at line 337 of file BetweenFactorEM.h.

◆ updateNoiseModels_givenCovs()

template<class VALUE>
void gtsam::BetweenFactorEM< VALUE >::updateNoiseModels_givenCovs ( const Values values,
const Matrix cov1,
const Matrix cov2,
const Matrix cov12 
)
inline

Definition at line 362 of file BetweenFactorEM.h.

◆ whitenedError() [1/2]

template<class VALUE>
Vector gtsam::BetweenFactorEM< VALUE >::whitenedError ( const Values x,
OptionalMatrixVecType  H = nullptr 
) const
inline

Definition at line 147 of file BetweenFactorEM.h.

◆ whitenedError() [2/2]

template<class VALUE>
Vector gtsam::BetweenFactorEM< VALUE >::whitenedError ( const Values x,
std::vector< Matrix > &  H 
) const
inline

Definition at line 233 of file BetweenFactorEM.h.

Member Data Documentation

◆ flag_bump_up_near_zero_probs_

template<class VALUE>
bool gtsam::BetweenFactorEM< VALUE >::flag_bump_up_near_zero_probs_
private

Definition at line 56 of file BetweenFactorEM.h.

◆ key1_

template<class VALUE>
Key gtsam::BetweenFactorEM< VALUE >::key1_
private

Definition at line 45 of file BetweenFactorEM.h.

◆ key2_

template<class VALUE>
Key gtsam::BetweenFactorEM< VALUE >::key2_
private

Definition at line 46 of file BetweenFactorEM.h.

◆ measured_

template<class VALUE>
VALUE gtsam::BetweenFactorEM< VALUE >::measured_
private

Definition at line 48 of file BetweenFactorEM.h.

◆ model_inlier_

template<class VALUE>
SharedGaussian gtsam::BetweenFactorEM< VALUE >::model_inlier_
private

The measurement

Definition at line 50 of file BetweenFactorEM.h.

◆ model_outlier_

template<class VALUE>
SharedGaussian gtsam::BetweenFactorEM< VALUE >::model_outlier_
private

Definition at line 51 of file BetweenFactorEM.h.

◆ prior_inlier_

template<class VALUE>
double gtsam::BetweenFactorEM< VALUE >::prior_inlier_
private

Definition at line 53 of file BetweenFactorEM.h.

◆ prior_outlier_

template<class VALUE>
double gtsam::BetweenFactorEM< VALUE >::prior_outlier_
private

Definition at line 54 of file BetweenFactorEM.h.


The documentation for this class was generated from the following file:


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:46:15