gtsam  4.1.0
gtsam::GenericValue< T > Class Template Reference

Detailed Description

template<class T>
class gtsam::GenericValue< T >

Wraps any type T so it can play as a Value.

+ Inheritance diagram for gtsam::GenericValue< T >:

Public Member Functions

 GenericValue (const T &value)
 Construct from value.
const T & value () const
 Return a constant value.
T & value ()
 Return the value.
virtual ~GenericValue ()
bool equals_ (const Value &p, double tol=1e-9) const override
 equals implementing generic Value interface
bool equals (const GenericValue &other, double tol=1e-9) const
 non virtual equals function, uses traits
void print (const std::string &str) const override
 Virtual print function, uses traits.
Valueclone_ () const override
 Create a duplicate object returned as a pointer to the generic Value interface.
void deallocate_ () const override
 Destroy and deallocate this object, only if it was originally allocated using clone_().
boost::shared_ptr< Valueclone () const override
 Clone this value (normal clone on the heap, delete with 'delete' operator)
Valueretract_ (const Vector &delta) const override
 Generic Value interface version of retract.
Vector localCoordinates_ (const Value &value2) const override
 Generic Value interface version of localCoordinates.
GenericValue retract (const Vector &delta) const
 Non-virtual version of retract.
Vector localCoordinates (const GenericValue &value2) const
 Non-virtual version of localCoordinates.
size_t dim () const override
 Return run-time dimensionality.
Valueoperator= (const Value &rhs) override
 Assignment operator.
- Public Member Functions inherited from gtsam::Value
template<typename ValueType >
const ValueType & cast () const
 Cast to known ValueType.
virtual ~Value ()
 Virutal destructor.

Public Types

typedef T type

Protected Member Functions

GenericValue< T > & operator= (const GenericValue< T > &rhs)
 Assignment operator, protected because only the Value or DERIVED assignment operators should be used.

Protected Attributes

 The wrapped value.


class boost::serialization::access
 Serialization function.

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