gtsam
Loading...
Searching...
No Matches
gtsam::Value Class Referenceabstract

Detailed Description

This is the base class for any type to be stored in Values.

Note: As of GTSAM 4.0, Value types should no longer derive from Value or DerivedValue. Use type traits instead. See https://bitbucket.org/gtborg/gtsam/wiki/Migrating%20from%20GTSAM%203.X%20to%20GTSAM%204.0#markdown-header-custom-value-types for current usage and migration details.

Inheritance diagram for gtsam::Value:

Public Member Functions

 Value (const Value &other)=default
virtual Value * clone_ () const =0
 Clone this value in a special memory pool, must be deleted with Value::deallocate_, not with the 'delete' operator.
virtual void deallocate_ () const =0
 Deallocate a raw pointer of this value.
virtual std::shared_ptr< Value > clone () const =0
 Clone this value (normal clone on the heap, delete with 'delete' operator).
virtual bool equals_ (const Value &other, double tol=1e-9) const =0
 Compare this Value with another for equality.
virtual void print (const std::string &str="") const =0
 Print this value, for debugging and unit tests.
virtual size_t dim () const =0
 Return the dimensionality of the tangent space of this value.
virtual Value * retract_ (const Vector &delta) const =0
 Increment the value, by mapping from the vector delta in the tangent space of the current value back to the manifold to produce a new, incremented value.
virtual Vector localCoordinates_ (const Value &value) const =0
 Compute the coordinates in the tangent space of this value that retract() would map to value.
virtual Value & operator= (const Value &)
 Assignment operator.
template<typename ValueType>
const ValueType & cast () const
 Cast to known ValueType.
virtual ~Value ()
 Virutal destructor.

Member Function Documentation

◆ clone()

virtual std::shared_ptr< Value > gtsam::Value::clone ( ) const
pure virtual

Clone this value (normal clone on the heap, delete with 'delete' operator).

Implemented in gtsam::GenericValue< T >.

◆ clone_()

virtual Value * gtsam::Value::clone_ ( ) const
pure virtual

Clone this value in a special memory pool, must be deleted with Value::deallocate_, not with the 'delete' operator.

Implemented in gtsam::GenericValue< T >.

◆ deallocate_()

virtual void gtsam::Value::deallocate_ ( ) const
pure virtual

Deallocate a raw pointer of this value.

Implemented in gtsam::GenericValue< T >.

◆ dim()

virtual size_t gtsam::Value::dim ( ) const
pure virtual

Return the dimensionality of the tangent space of this value.

This is the dimensionality of delta passed into retract() and of the vector returned by localCoordinates().

Returns
The dimensionality of the tangent space

Implemented in gtsam::GenericValue< T >.

◆ equals_()

virtual bool gtsam::Value::equals_ ( const Value & other,
double tol = 1e-9 ) const
pure virtual

Compare this Value with another for equality.

Implemented in gtsam::GenericValue< T >.

◆ localCoordinates_()

virtual Vector gtsam::Value::localCoordinates_ ( const Value & value) const
pure virtual

Compute the coordinates in the tangent space of this value that retract() would map to value.

Parameters
valueThe value whose coordinates should be determined in the tangent space of the value on which this function is called.
Returns
The coordinates of value in the tangent space of this.

Implemented in gtsam::GenericValue< T >.

◆ operator=()

virtual Value & gtsam::Value::operator= ( const Value & )
inlinevirtual

Assignment operator.

Reimplemented in gtsam::GenericValue< T >.

◆ print()

virtual void gtsam::Value::print ( const std::string & str = "") const
pure virtual

Print this value, for debugging and unit tests.

Implemented in gtsam::GenericValue< T >.

◆ retract_()

virtual Value * gtsam::Value::retract_ ( const Vector & delta) const
pure virtual

Increment the value, by mapping from the vector delta in the tangent space of the current value back to the manifold to produce a new, incremented value.

Parameters
deltaThe delta vector in the tangent space of this value, by which to increment this value.

Implemented in gtsam::GenericValue< T >.


The documentation for this class was generated from the following files:
  • /tmp/gtsam-4.3.0-doxygen.rsXPUS/source/gtsam/base/Value.h
  • /tmp/gtsam-4.3.0-doxygen.rsXPUS/source/gtsam/base/GenericValue.h