#include <Symbol.h>
Public Member Functions | |
unsigned char | chr () const |
bool | equals (const Symbol &expected, double tol=0.0) const |
Check equality. More... | |
std::uint64_t | index () const |
Key | key () const |
operator Key () const | |
operator std::string () const | |
bool | operator!= (const Symbol &comp) const |
bool | operator!= (Key comp) const |
bool | operator< (const Symbol &comp) const |
bool | operator== (const Symbol &comp) const |
bool | operator== (Key comp) const |
void | print (const std::string &s="") const |
Print. More... | |
std::string | string () const |
Return string representation of the key. More... | |
Symbol () | |
Symbol (const Symbol &key) | |
Symbol (unsigned char c, std::uint64_t j) | |
Symbol (Key key) | |
Static Public Member Functions | |
static boost::function< bool(Key)> | ChrTest (unsigned char c) |
Protected Attributes | |
unsigned char | c_ |
std::uint64_t | j_ |
Private Member Functions | |
template<class ARCHIVE > | |
void | serialize (ARCHIVE &ar, const unsigned int) |
Friends | |
class | boost::serialization::access |
GTSAM_EXPORT friend std::ostream & | operator<< (std::ostream &, const Symbol &) |
Output stream operator that can be used with key_formatter (see Key.h). More... | |
Character and index key used to refer to variables. Will simply cast to a Key, i.e., a large integer. Keys are used to retrieve values from Values, specify what variables factors depend on, etc.
Definition at line 34 of file inference/Symbol.h.
|
inline |
Default constructor
Definition at line 42 of file inference/Symbol.h.
|
inline |
Copy constructor
Definition at line 47 of file inference/Symbol.h.
|
inline |
Constructor
Definition at line 52 of file inference/Symbol.h.
gtsam::Symbol::Symbol | ( | Key | key | ) |
Constructor that decodes an integer Key
Definition at line 36 of file Symbol.cpp.
|
inline |
Retrieve key character
Definition at line 72 of file inference/Symbol.h.
|
static |
Return a filter function that returns true when evaluated on a Key whose character (when converted to a Symbol) matches c
. Use this with the Values::filter() function to retrieve all key-value pairs with the requested character.
Definition at line 65 of file Symbol.cpp.
bool gtsam::Symbol::equals | ( | const Symbol & | expected, |
double | tol = 0.0 |
||
) | const |
Check equality.
Definition at line 55 of file Symbol.cpp.
|
inline |
Retrieve key index
Definition at line 77 of file inference/Symbol.h.
Key gtsam::Symbol::key | ( | ) | const |
return Key (integer) representation
Definition at line 41 of file Symbol.cpp.
|
inline |
Cast to integer
Definition at line 63 of file inference/Symbol.h.
gtsam::Symbol::operator std::string | ( | ) | const |
Create a string from the key
Definition at line 59 of file Symbol.cpp.
|
inline |
Comparison for use in maps
Definition at line 103 of file inference/Symbol.h.
|
inline |
Comparison for use in maps
Definition at line 108 of file inference/Symbol.h.
|
inline |
Comparison for use in maps
Definition at line 88 of file inference/Symbol.h.
|
inline |
Comparison for use in maps
Definition at line 93 of file inference/Symbol.h.
|
inline |
Comparison for use in maps
Definition at line 98 of file inference/Symbol.h.
void gtsam::Symbol::print | ( | const std::string & | s = "" | ) | const |
Print.
Definition at line 51 of file Symbol.cpp.
|
inlineprivate |
Definition at line 127 of file inference/Symbol.h.
|
inline |
Return string representation of the key.
Definition at line 85 of file inference/Symbol.h.
|
friend |
Serialization function
Definition at line 125 of file inference/Symbol.h.
|
friend |
Output stream operator that can be used with key_formatter (see Key.h).
Definition at line 69 of file Symbol.cpp.
|
protected |
Definition at line 36 of file inference/Symbol.h.
|
protected |
Definition at line 37 of file inference/Symbol.h.