GTSAM  4.0.2
C++ library for smoothing and mapping (SAM)
Public Types | Public Member Functions | Protected Attributes | List of all members
gtsam::BinaryMeasurement< T > Class Template Reference
Inheritance diagram for gtsam::BinaryMeasurement< T >:
Inheritance graph
[legend]
Collaboration diagram for gtsam::BinaryMeasurement< T >:
Collaboration graph
[legend]

Public Types

using shared_ptr = typename std::shared_ptr< BinaryMeasurement >
 
typedef KeyVector::iterator iterator
 Iterator over keys.
 
typedef KeyVector::const_iterator const_iterator
 Const iterator over keys.
 

Public Member Functions

 BinaryMeasurement (Key key1, Key key2, const T &measured, const SharedNoiseModel &model=nullptr)
 
Standard Interface
Key key1 () const
 
Key key2 () const
 
const T & measured () const
 
const SharedNoiseModelnoiseModel () const
 
Testable
void print (const std::string &s, const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
 print
 
bool equals (const BinaryMeasurement &expected, double tol=1e-9) 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
 
virtual double error (const HybridValues &c) const
 
size_t size () const
 
Advanced Interface
KeyVectorkeys ()
 
iterator begin ()
 
iterator end ()
 
Testable
virtual void printKeys (const std::string &s="Factor", const KeyFormatter &formatter=DefaultKeyFormatter) const
 print only keys
 
bool equals (const This &other, double tol=1e-9) const
 check equality
 

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.
 

Member Function Documentation

◆ 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

◆ 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

◆ error()

virtual double gtsam::Factor::error ( const HybridValues c) const
virtualinherited

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

Reimplemented in gtsam::DecisionTreeFactor, gtsam::GaussianMixture, gtsam::HybridConditional, gtsam::MixtureFactor, gtsam::GaussianMixtureFactor, gtsam::SymbolicFactor, gtsam::NonlinearFactor, gtsam::DiscreteFactor, and gtsam::GaussianFactor.

◆ 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

◆ size()

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

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