wrap Symbol class and methods
parent
6c85850147
commit
f91f7facb4
|
@ -1936,6 +1936,21 @@ class KalmanFilter {
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
|
|
||||||
#include <gtsam/inference/Symbol.h>
|
#include <gtsam/inference/Symbol.h>
|
||||||
|
|
||||||
|
class Symbol {
|
||||||
|
Symbol();
|
||||||
|
Symbol(char c, uint64_t j);
|
||||||
|
Symbol(size_t key);
|
||||||
|
|
||||||
|
size_t key() const;
|
||||||
|
void print(const string& s) const;
|
||||||
|
bool equals(const gtsam::Symbol& expected, double tol) const;
|
||||||
|
|
||||||
|
char chr() const;
|
||||||
|
uint64_t index() const;
|
||||||
|
string string() const;
|
||||||
|
};
|
||||||
|
|
||||||
size_t symbol(char chr, size_t index);
|
size_t symbol(char chr, size_t index);
|
||||||
char symbolChr(size_t key);
|
char symbolChr(size_t key);
|
||||||
size_t symbolIndex(size_t key);
|
size_t symbolIndex(size_t key);
|
||||||
|
|
|
@ -80,6 +80,9 @@ public:
|
||||||
/** Create a string from the key */
|
/** Create a string from the key */
|
||||||
operator std::string() const;
|
operator std::string() const;
|
||||||
|
|
||||||
|
/// Return string representation of the key
|
||||||
|
std::string string() const { return std::string(*this); };
|
||||||
|
|
||||||
/** Comparison for use in maps */
|
/** Comparison for use in maps */
|
||||||
bool operator<(const Symbol& comp) const {
|
bool operator<(const Symbol& comp) const {
|
||||||
return c_ < comp.c_ || (comp.c_ == c_ && j_ < comp.j_);
|
return c_ < comp.c_ || (comp.c_ == c_ && j_ < comp.j_);
|
||||||
|
|
Loading…
Reference in New Issue