Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | 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

std::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 }
 

Detailed Description

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

Wraps any type T so it can play as a Value

Definition at line 44 of file GenericValue.h.

Member Typedef Documentation

◆ type

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

Definition at line 48 of file GenericValue.h.

Member Enumeration Documentation

◆ anonymous enum

template<class T>
anonymous enum
private
Enumerator
NeedsToAlign 

Definition at line 189 of file GenericValue.h.

Constructor & Destructor Documentation

◆ GenericValue() [1/2]

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

Definition at line 56 of file GenericValue.h.

◆ GenericValue() [2/2]

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

Construct from value.

Definition at line 59 of file GenericValue.h.

◆ ~GenericValue()

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

Destructor.

Definition at line 74 of file GenericValue.h.

Member Function Documentation

◆ clone()

template<class T>
std::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 114 of file GenericValue.h.

◆ clone_()

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 99 of file GenericValue.h.

◆ deallocate_()

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 107 of file GenericValue.h.

◆ dim()

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

Return run-time dimensionality.

Implements gtsam::Value.

Definition at line 150 of file GenericValue.h.

◆ equals()

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 86 of file GenericValue.h.

◆ equals_()

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 78 of file GenericValue.h.

◆ localCoordinates()

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

Non-virtual version of localCoordinates.

Definition at line 145 of file GenericValue.h.

◆ localCoordinates_()

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 130 of file GenericValue.h.

◆ operator=() [1/2]

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

Assignment operator.

Reimplemented from gtsam::Value.

Definition at line 155 of file GenericValue.h.

◆ operator=() [2/2]

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 168 of file GenericValue.h.

◆ print()

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 91 of file GenericValue.h.

◆ retract()

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

Non-virtual version of retract.

Definition at line 140 of file GenericValue.h.

◆ retract_()

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 119 of file GenericValue.h.

◆ value() [1/2]

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

Return a constant value.

Definition at line 64 of file GenericValue.h.

◆ value() [2/2]

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

Return the value.

Definition at line 69 of file GenericValue.h.

Member Data Documentation

◆ value_

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

The wrapped value.

Definition at line 52 of file GenericValue.h.


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


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:46:19