Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
gtsam::LabeledSymbol Class Reference

#include <LabeledSymbol.h>

Public Member Functions

unsigned char chr () const
 
bool equals (const LabeledSymbol &expected, double tol=0.0) const
 
size_t index () const
 
gtsam::Key key () const
 
unsigned char label () const
 
 LabeledSymbol ()
 
 LabeledSymbol (const LabeledSymbol &key)
 
 LabeledSymbol (unsigned char c, unsigned char label, std::uint64_t j)
 
 LabeledSymbol (gtsam::Key key)
 
LabeledSymbol lower () const
 
LabeledSymbol newChr (unsigned char c) const
 
LabeledSymbol newLabel (unsigned char label) const
 
 operator gtsam::Key () const
 
 operator std::string () const
 
bool operator!= (const LabeledSymbol &comp) const
 
bool operator!= (gtsam::Key comp) const
 
bool operator< (const LabeledSymbol &comp) const
 
bool operator== (const LabeledSymbol &comp) const
 
bool operator== (gtsam::Key comp) const
 
void print (const std::string &s="") const
 
LabeledSymbol upper () const
 

Static Public Member Functions

static boost::function< bool(gtsam::Key)> LabelTest (unsigned char label)
 
static boost::function< bool(gtsam::Key)> TypeLabelTest (unsigned char c, unsigned char label)
 
static boost::function< bool(gtsam::Key)> TypeTest (unsigned char c)
 

Protected Attributes

unsigned char c_
 
std::uint64_t j_
 
unsigned char label_
 

Private Member Functions

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

Friends

class boost::serialization::access
 
GTSAM_EXPORT std::ostream & operator<< (std::ostream &, const LabeledSymbol &)
 Output stream operator that can be used with key_formatter (see Key.h). More...
 

Detailed Description

Customized version of gtsam::Symbol for multi-robot use.

This variation of Symbol stores two char values in addition to an integer key, which is useful for encoding a group for a variable. This was originally designed for multi-robot systems, which allows expressing "Pose 7 from robot B" as "xB7".

Definition at line 35 of file LabeledSymbol.h.

Constructor & Destructor Documentation

gtsam::LabeledSymbol::LabeledSymbol ( )

Default constructor

Definition at line 32 of file LabeledSymbol.cpp.

gtsam::LabeledSymbol::LabeledSymbol ( const LabeledSymbol key)

Copy constructor

Definition at line 36 of file LabeledSymbol.cpp.

gtsam::LabeledSymbol::LabeledSymbol ( unsigned char  c,
unsigned char  label,
std::uint64_t  j 
)

Constructor

Definition at line 40 of file LabeledSymbol.cpp.

gtsam::LabeledSymbol::LabeledSymbol ( gtsam::Key  key)

Constructor that decodes an integer gtsam::Key

Definition at line 44 of file LabeledSymbol.cpp.

Member Function Documentation

unsigned char gtsam::LabeledSymbol::chr ( ) const
inline

Retrieve key character

Definition at line 70 of file LabeledSymbol.h.

bool gtsam::LabeledSymbol::equals ( const LabeledSymbol expected,
double  tol = 0.0 
) const
inline

Definition at line 59 of file LabeledSymbol.h.

size_t gtsam::LabeledSymbol::index ( ) const
inline

Retrieve key index

Definition at line 73 of file LabeledSymbol.h.

gtsam::Key gtsam::LabeledSymbol::key ( ) const
inline

return the integer version

Definition at line 64 of file LabeledSymbol.h.

unsigned char gtsam::LabeledSymbol::label ( ) const
inline

Retrieve label character

Definition at line 67 of file LabeledSymbol.h.

boost::function< bool(gtsam::Key)> gtsam::LabeledSymbol::LabelTest ( unsigned char  label)
static

Definition at line 116 of file LabeledSymbol.cpp.

LabeledSymbol gtsam::LabeledSymbol::lower ( ) const
inline

Definition at line 102 of file LabeledSymbol.h.

LabeledSymbol gtsam::LabeledSymbol::newChr ( unsigned char  c) const
inline

Definition at line 105 of file LabeledSymbol.h.

LabeledSymbol gtsam::LabeledSymbol::newLabel ( unsigned char  label) const
inline

Definition at line 108 of file LabeledSymbol.h.

gtsam::LabeledSymbol::operator gtsam::Key ( ) const

Cast to integer

Definition at line 58 of file LabeledSymbol.cpp.

gtsam::LabeledSymbol::operator std::string ( ) const

Create a string from the key

Definition at line 78 of file LabeledSymbol.cpp.

bool gtsam::LabeledSymbol::operator!= ( const LabeledSymbol comp) const

Definition at line 95 of file LabeledSymbol.cpp.

Definition at line 105 of file LabeledSymbol.cpp.

bool gtsam::LabeledSymbol::operator< ( const LabeledSymbol comp) const

Comparison for use in maps

Definition at line 83 of file LabeledSymbol.cpp.

bool gtsam::LabeledSymbol::operator== ( const LabeledSymbol comp) const

Definition at line 90 of file LabeledSymbol.cpp.

bool gtsam::LabeledSymbol::operator== ( gtsam::Key  comp) const

Definition at line 100 of file LabeledSymbol.cpp.

void gtsam::LabeledSymbol::print ( const std::string &  s = "") const

Definition at line 73 of file LabeledSymbol.cpp.

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

Definition at line 118 of file LabeledSymbol.h.

boost::function< bool(gtsam::Key)> gtsam::LabeledSymbol::TypeLabelTest ( unsigned char  c,
unsigned char  label 
)
static

Definition at line 120 of file LabeledSymbol.cpp.

boost::function< bool(gtsam::Key)> gtsam::LabeledSymbol::TypeTest ( unsigned char  c)
static

Return a filter function that returns true when evaluated on a gtsam::Key whose character (when converted to a LabeledSymbol) matches c. Use this with the Values::filter() function to retrieve all key-value pairs with the requested character.

Definition at line 112 of file LabeledSymbol.cpp.

LabeledSymbol gtsam::LabeledSymbol::upper ( ) const
inline

Definition at line 101 of file LabeledSymbol.h.

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Serialization function

Definition at line 116 of file LabeledSymbol.h.

GTSAM_EXPORT std::ostream& operator<< ( std::ostream &  os,
const LabeledSymbol symbol 
)
friend

Output stream operator that can be used with key_formatter (see Key.h).

Definition at line 126 of file LabeledSymbol.cpp.

Member Data Documentation

unsigned char gtsam::LabeledSymbol::c_
protected

Definition at line 37 of file LabeledSymbol.h.

std::uint64_t gtsam::LabeledSymbol::j_
protected

Definition at line 38 of file LabeledSymbol.h.

unsigned char gtsam::LabeledSymbol::label_
protected

Definition at line 37 of file LabeledSymbol.h.


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


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