gtsam
Loading...
Searching...
No Matches
gtsam::UnaryMeasurement< T > Class Template Reference

Detailed Description

template<class T>
class gtsam::UnaryMeasurement< T >

Unary measurement represents a measurement on a single key in a graph.

Inheritance diagram for gtsam::UnaryMeasurement< T >:

Public Member Functions

 UnaryMeasurement (Key key, const T &measured, const SharedNoiseModel &model=nullptr)
 Constructs a unary measurement with a key, value, and noise model.
Standard Interface
Key key () 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 UnaryMeasurement &expected, double tol=1e-9) const
Public Member Functions inherited from gtsam::Factor
virtual ~Factor ()=default
 Default destructor.
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
 Iterator at beginning of involved variable keys.
const_iterator end () const
 Iterator at end of involved variable keys.
virtual double error (const HybridValues &hybridValues) const
 All factor types need to implement an error function.
size_t size () const
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
KeyVectorkeys ()
iterator begin ()
 Iterator at beginning of involved variable keys.
iterator end ()
 Iterator at end of involved variable keys.

Public Types

using shared_ptr = std::shared_ptr<UnaryMeasurement>
Public Types inherited from gtsam::Factor
typedef KeyVector::iterator iterator
 Iterator over keys.
typedef KeyVector::const_iterator const_iterator
 Const iterator over keys.

Additional Inherited Members

 Factor ()
 Default constructor for I/O.
template<typename CONTAINER>
 Factor (const CONTAINER &keys)
 Construct factor from container of keys.
template<typename ITERATOR>
 Factor (ITERATOR first, ITERATOR last)
 Construct factor from iterator keys.
template<typename CONTAINER>
static Factor FromKeys (const CONTAINER &keys)
 Construct factor from container of keys.
template<typename ITERATOR>
static Factor FromIterators (ITERATOR first, ITERATOR last)
 Construct factor from iterator keys.
Protected Attributes inherited from gtsam::Factor
KeyVector keys_
 The keys involved in this factor.

Constructor & Destructor Documentation

◆ UnaryMeasurement()

template<class T>
gtsam::UnaryMeasurement< T >::UnaryMeasurement ( Key key,
const T & measured,
const SharedNoiseModel & model = nullptr )
inline

Constructs a unary measurement with a key, value, and noise model.

Parameters
keyThe key of the measurement.
measuredThe measurement value.
modelThe noise model (optional).

Member Function Documentation

◆ print()

template<class T>
void gtsam::UnaryMeasurement< T >::print ( const std::string & s,
const KeyFormatter & formatter = DefaultKeyFormatter ) const
inlineoverridevirtual

print

Reimplemented from gtsam::Factor.


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