gtsam
4.0.0
gtsam
|
Wraps any type T so it can play as a Value.
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 () |
Destructor. | |
virtual bool | equals_ (const Value &p, double tol=1e-9) const |
equals implementing generic Value interface | |
bool | equals (const GenericValue &other, double tol=1e-9) const |
non virtual equals function, uses traits | |
virtual void | print (const std::string &str) const |
Virtual print function, uses traits. | |
virtual Value * | clone_ () const |
Create a duplicate object returned as a pointer to the generic Value interface. More... | |
virtual void | deallocate_ () const |
Destroy and deallocate this object, only if it was originally allocated using clone_(). | |
virtual boost::shared_ptr< Value > | clone () const |
Clone this value (normal clone on the heap, delete with 'delete' operator) | |
virtual Value * | retract_ (const Vector &delta) const |
Generic Value interface version of retract. | |
virtual Vector | localCoordinates_ (const Value &value2) const |
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. | |
virtual size_t | dim () const |
Return run-time dimensionality. | |
virtual Value & | operator= (const Value &rhs) |
Assignment operator. | |
![]() | |
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. More... | |
Protected Attributes | |
T | value_ |
The wrapped value. | |
Friends | |
class | boost::serialization::access |
Serialization function. | |
|
inlinevirtual |
Create a duplicate object returned as a pointer to the generic Value interface.
For the sake of performance, this function use singleton pool allocator instead of the normal heap allocator. The result must be deleted with Value::deallocate_, not with the 'delete' operator.
Implements gtsam::Value.
|
inlineprotected |
Assignment operator, protected because only the Value or DERIVED assignment operators should be used.