GTSAM  4.0.2
C++ library for smoothing and mapping (SAM)
Public Types | Public Member Functions | Protected Attributes | List of all members
gtsam::TransformBtwRobotsUnaryFactorEM< VALUE > Class Template Reference

#include <TransformBtwRobotsUnaryFactorEM.h>

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

Public Types

typedef VALUE T
 
typedef std::shared_ptr< TransformBtwRobotsUnaryFactorEMshared_ptr
 
typedef KeyVector::iterator iterator
 Iterator over keys.
 
typedef KeyVector::const_iterator const_iterator
 Const iterator over keys.
 

Public Member Functions

 TransformBtwRobotsUnaryFactorEM ()
 
 TransformBtwRobotsUnaryFactorEM (Key key, const VALUE &measured, Key keyA, Key keyB, const Values &valA, const Values &valB, 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, const bool start_with_M_step=false)
 
NonlinearFactor::shared_ptr clone () const override
 
void print (const std::string &s, const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
 
bool equals (const NonlinearFactor &f, double tol=1e-9) const override
 
void setValAValB (const Values &valA, const Values &valB)
 
double error (const Values &x) const override
 
std::shared_ptr< GaussianFactorlinearize (const Values &x) const override
 
Vector whitenedError (const Values &x, OptionalMatrixVecType H=nullptr) const
 
Vector whitenedError (const Values &x, std::vector< Matrix > &H) const
 
Vector calcIndicatorProb (const Values &x) const
 
Vector calcIndicatorProb (const Values &x, const Vector &err) const
 
Vector unwhitenedError (const Values &x) const
 
SharedGaussian get_model_inlier () const
 
SharedGaussian get_model_outlier () const
 
Matrix get_model_inlier_cov () const
 
Matrix get_model_outlier_cov () const
 
void updateNoiseModels (const Values &values, const Marginals &marginals)
 
void updateNoiseModels (const Values &values, const NonlinearFactorGraph &graph)
 
void updateNoiseModels_givenCovs (const Values &values, const Matrix &cov1, const Matrix &cov2, const Matrix &cov12)
 
size_t dim () const override
 
Testable
bool equals (const This &other, double tol=1e-9) const
 check equality
 
virtual void printKeys (const std::string &s="Factor", const KeyFormatter &formatter=DefaultKeyFormatter) const
 print only keys
 
Standard Interface
double error (const HybridValues &c) const override
 
virtual bool active (const Values &) 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
 
Standard Interface
bool empty () const
 Whether the factor is empty (involves zero variables).
 
Key front () const
 First key.
 
Key back () const
 Last key.
 
const_iterator find (Key key) const
 find
 
const KeyVectorkeys () const
 Access the factor's involved variable keys.
 
const_iterator begin () const
 
const_iterator end () const
 
size_t size () const
 
Advanced Interface
KeyVectorkeys ()
 
iterator begin ()
 
iterator end ()
 

Static Protected Member Functions

Standard Constructors
template<typename CONTAINER >
static Factor FromKeys (const CONTAINER &keys)
 
template<typename ITERATOR >
static Factor FromIterators (ITERATOR first, ITERATOR last)
 

Protected Attributes

KeyVector keys_
 The keys involved in this factor.
 

Detailed Description

template<class VALUE>
class gtsam::TransformBtwRobotsUnaryFactorEM< VALUE >

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

Template Parameters
VALUEthe Value type

Member Typedef Documentation

◆ shared_ptr

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

concept check by type

Constructor & Destructor Documentation

◆ TransformBtwRobotsUnaryFactorEM() [1/2]

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

default constructor - only use for serialization

◆ TransformBtwRobotsUnaryFactorEM() [2/2]

template<class VALUE >
gtsam::TransformBtwRobotsUnaryFactorEM< VALUE >::TransformBtwRobotsUnaryFactorEM ( Key  key,
const VALUE &  measured,
Key  keyA,
Key  keyB,
const Values valA,
const Values valB,
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,
const bool  start_with_M_step = false 
)
inline

Constructor

Member Function Documentation

◆ active()

virtual bool gtsam::NonlinearFactor::active ( const Values ) const
inlinevirtualinherited

Checks whether a factor should be used based on a set of values. This is primarily used to implement inequality constraints that require a variable active set. For all others, the default implementation returning true solves this problem.

In an inequality/bounding constraint, this active() returns true when the constraint is NOT fulfilled.

Returns
true if the constraint is active

Reimplemented in gtsam::BoundingConstraint2< VALUE1, VALUE2 >, gtsam::AntiFactor, and gtsam::BoundingConstraint1< VALUE >.

◆ begin() [1/2]

const_iterator gtsam::Factor::begin ( ) const
inlineinherited

Iterator at beginning of involved variable keys

◆ begin() [2/2]

iterator gtsam::Factor::begin ( )
inlineinherited

Iterator at beginning of involved variable keys

◆ clone()

template<class VALUE >
NonlinearFactor::shared_ptr gtsam::TransformBtwRobotsUnaryFactorEM< VALUE >::clone ( ) const
inlineoverridevirtual

Clone

Reimplemented from gtsam::NonlinearFactor.

◆ dim()

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

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

Implements gtsam::NonlinearFactor.

◆ end() [1/2]

const_iterator gtsam::Factor::end ( ) const
inlineinherited

Iterator at end of involved variable keys

◆ end() [2/2]

iterator gtsam::Factor::end ( )
inlineinherited

Iterator at end of involved variable keys

◆ equals()

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

equals

Reimplemented from gtsam::NonlinearFactor.

◆ error()

double gtsam::NonlinearFactor::error ( const HybridValues c) const
overridevirtualinherited

All factor types need to implement an error function. In factor graphs, this is the negative log-likelihood.

Reimplemented from gtsam::Factor.

◆ FromIterators()

template<typename ITERATOR >
static Factor gtsam::Factor::FromIterators ( ITERATOR  first,
ITERATOR  last 
)
inlinestaticprotectedinherited

Construct factor from iterator keys. This is called internally from derived factor static factor methods, as a workaround for not being able to call the protected constructors above.

◆ FromKeys()

template<typename CONTAINER >
static Factor gtsam::Factor::FromKeys ( const CONTAINER &  keys)
inlinestaticprotectedinherited

Construct factor from container of keys. This is called internally from derived factor static factor methods, as a workaround for not being able to call the protected constructors above.

◆ keys()

KeyVector& gtsam::Factor::keys ( )
inlineinherited
Returns
keys involved in this factor

◆ linearize()

template<class VALUE >
std::shared_ptr<GaussianFactor> gtsam::TransformBtwRobotsUnaryFactorEM< 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.

◆ print()

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

implement functions needed for Testable print

Reimplemented from gtsam::NonlinearFactor.

◆ rekey() [1/2]

virtual shared_ptr gtsam::NonlinearFactor::rekey ( const std::map< Key, Key > &  rekey_mapping) const
virtualinherited

Creates a shared_ptr clone of the factor with different keys using a map from old->new keys

Reimplemented in gtsam::LinearContainerFactor.

◆ rekey() [2/2]

virtual shared_ptr gtsam::NonlinearFactor::rekey ( const KeyVector new_keys) const
virtualinherited

Clones a factor and fully replaces its keys

Parameters
new_keysis the full replacement set of keys

Reimplemented in gtsam::LinearContainerFactor.

◆ sendable()

virtual bool gtsam::NonlinearFactor::sendable ( ) const
inlinevirtualinherited

Should the factor be evaluated in the same thread as the caller This is to enable factors that has shared states (like the Python GIL lock)

Reimplemented in gtsam::CustomFactor.

◆ setValAValB()

template<class VALUE >
void gtsam::TransformBtwRobotsUnaryFactorEM< VALUE >::setValAValB ( const Values valA,
const Values valB 
)
inline

implement functions needed to derive from Factor

◆ size()

size_t gtsam::Factor::size ( ) const
inlineinherited
Returns
the number of variables involved in this factor

◆ whitenedError()

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

A function overload to accept a vector<matrix> instead of a pointer to the said type.


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