Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Friends | List of all members
gtsam::GenericValue< T > Class Template Reference

#include <GenericValue.h>

Inheritance diagram for gtsam::GenericValue< T >:
Inheritance graph
[legend]

Public Types

typedef T type
 

Public Member Functions

boost::shared_ptr< Valueclone () const override
 
Valueclone_ () const override
 
void deallocate_ () const override
 
size_t dim () const override
 Return run-time dimensionality. More...
 
bool equals (const GenericValue &other, double tol=1e-9) const
 non virtual equals function, uses traits More...
 
bool equals_ (const Value &p, double tol=1e-9) const override
 equals implementing generic Value interface More...
 
 GenericValue ()
 
 GenericValue (const T &value)
 Construct from value. More...
 
Vector localCoordinates (const GenericValue &value2) const
 Non-virtual version of localCoordinates. More...
 
Vector localCoordinates_ (const Value &value2) const override
 Generic Value interface version of localCoordinates. More...
 
Valueoperator= (const Value &rhs) override
 Assignment operator. More...
 
void print (const std::string &str) const override
 Virtual print function, uses traits. More...
 
GenericValue retract (const Vector &delta) const
 Non-virtual version of retract. More...
 
Valueretract_ (const Vector &delta) const override
 Generic Value interface version of retract. More...
 
const Tvalue () const
 Return a constant value. More...
 
Tvalue ()
 Return the value. More...
 
 ~GenericValue () override
 Destructor. More...
 
- Public Member Functions inherited from gtsam::Value
template<typename ValueType >
const ValueType & cast () const
 
virtual ~Value ()
 

Protected Member Functions

GenericValue< T > & operator= (const GenericValue< T > &rhs)
 

Protected Attributes

T value_
 The wrapped value. More...
 

Private Types

enum  { NeedsToAlign = (sizeof(T) % 16) == 0 }
 

Private Member Functions

template<class ARCHIVE >
void serialize (ARCHIVE &ar, const unsigned int)
 

Friends

class boost::serialization::access
 

Detailed Description

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

Wraps any type T so it can play as a Value

Definition at line 47 of file GenericValue.h.

Member Typedef Documentation

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

Definition at line 51 of file GenericValue.h.

Member Enumeration Documentation

template<class T>
anonymous enum
private
Enumerator
NeedsToAlign 

Definition at line 190 of file GenericValue.h.

Constructor & Destructor Documentation

template<class T>
gtsam::GenericValue< T >::GenericValue ( )
inline

Definition at line 59 of file GenericValue.h.

template<class T>
gtsam::GenericValue< T >::GenericValue ( const T value)
inline

Construct from value.

Definition at line 62 of file GenericValue.h.

template<class T>
gtsam::GenericValue< T >::~GenericValue ( )
inlineoverride

Destructor.

Definition at line 77 of file GenericValue.h.

Member Function Documentation

template<class T>
boost::shared_ptr<Value> gtsam::GenericValue< T >::clone ( ) const
inlineoverridevirtual

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

Implements gtsam::Value.

Definition at line 117 of file GenericValue.h.

template<class T>
Value* gtsam::GenericValue< T >::clone_ ( ) const
inlineoverridevirtual

Create a duplicate object returned as a pointer to the generic Value interface.

Implements gtsam::Value.

Definition at line 102 of file GenericValue.h.

template<class T>
void gtsam::GenericValue< T >::deallocate_ ( ) const
inlineoverridevirtual

Destroy and deallocate this object, only if it was originally allocated using clone_().

Implements gtsam::Value.

Definition at line 110 of file GenericValue.h.

template<class T>
size_t gtsam::GenericValue< T >::dim ( ) const
inlineoverridevirtual

Return run-time dimensionality.

Implements gtsam::Value.

Definition at line 153 of file GenericValue.h.

template<class T>
bool gtsam::GenericValue< T >::equals ( const GenericValue< T > &  other,
double  tol = 1e-9 
) const
inline

non virtual equals function, uses traits

Definition at line 89 of file GenericValue.h.

template<class T>
bool gtsam::GenericValue< T >::equals_ ( const Value p,
double  tol = 1e-9 
) const
inlineoverridevirtual

equals implementing generic Value interface

Implements gtsam::Value.

Definition at line 81 of file GenericValue.h.

template<class T>
Vector gtsam::GenericValue< T >::localCoordinates ( const GenericValue< T > &  value2) const
inline

Non-virtual version of localCoordinates.

Definition at line 148 of file GenericValue.h.

template<class T>
Vector gtsam::GenericValue< T >::localCoordinates_ ( const Value value2) const
inlineoverridevirtual

Generic Value interface version of localCoordinates.

Implements gtsam::Value.

Definition at line 133 of file GenericValue.h.

template<class T>
Value& gtsam::GenericValue< T >::operator= ( const Value rhs)
inlineoverridevirtual

Assignment operator.

Reimplemented from gtsam::Value.

Definition at line 158 of file GenericValue.h.

template<class T>
GenericValue<T>& gtsam::GenericValue< T >::operator= ( const GenericValue< T > &  rhs)
inlineprotected

Assignment operator, protected because only the Value or DERIVED assignment operators should be used.

Definition at line 171 of file GenericValue.h.

template<class T>
void gtsam::GenericValue< T >::print ( const std::string &  str) const
inlineoverridevirtual

Virtual print function, uses traits.

Implements gtsam::Value.

Definition at line 94 of file GenericValue.h.

template<class T>
GenericValue gtsam::GenericValue< T >::retract ( const Vector delta) const
inline

Non-virtual version of retract.

Definition at line 143 of file GenericValue.h.

template<class T>
Value* gtsam::GenericValue< T >::retract_ ( const Vector delta) const
inlineoverridevirtual

Generic Value interface version of retract.

Implements gtsam::Value.

Definition at line 122 of file GenericValue.h.

template<class T>
template<class ARCHIVE >
void gtsam::GenericValue< T >::serialize ( ARCHIVE &  ar,
const unsigned  int 
)
inlineprivate

Definition at line 182 of file GenericValue.h.

template<class T>
const T& gtsam::GenericValue< T >::value ( ) const
inline

Return a constant value.

Definition at line 67 of file GenericValue.h.

template<class T>
T& gtsam::GenericValue< T >::value ( )
inline

Return the value.

Definition at line 72 of file GenericValue.h.

Friends And Related Function Documentation

template<class T>
friend class boost::serialization::access
friend

Serialization function

Definition at line 180 of file GenericValue.h.

Member Data Documentation

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

The wrapped value.

Definition at line 55 of file GenericValue.h.


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


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:58:12