Go to the documentation of this file.
29 : c_(0), label_(0), j_(0) {}
33 : c_(
key.c_), label_(
key.label_), j_(
key.j_) {}
37 : c_(
c), label_(label), j_(
j) {}
42 const size_t chrBits =
sizeof(
unsigned char) * 8;
43 const size_t lblBits =
sizeof(
unsigned char) * 8;
56 const size_t chrBits =
sizeof(
unsigned char) * 8;
57 const size_t lblBits =
sizeof(
unsigned char) * 8;
63 throw std::invalid_argument(
"Symbol index is too large");
70 std::cout <<
s <<
": " << (std::string) (*
this) << std::endl;
74 LabeledSymbol::operator std::string()
const {
76 snprintf(
buffer, 100,
"%c%c%llu", c_, label_,
77 static_cast<unsigned long long>(j_));
78 return std::string(
buffer);
113 auto equals = [](
unsigned char s,
unsigned char c) {
return s ==
c; };
122 auto equals = [](
unsigned char s,
unsigned char c) {
return s ==
c; };
131 auto logical_and = [](
bool is_type,
bool is_label) {
return is_type == is_label; };
132 auto equals = [](
unsigned char s,
unsigned char c) {
return s ==
c; };
133 return std::bind(logical_and,
136 std::bind(
make, std::placeholders::_1)),
140 std::bind(
make, std::placeholders::_1)),
unsigned char chr() const
Retrieve key character.
std::ostream & operator<<(std::ostream &os, const Dih6 &m)
void print(const std::string &s="") const
Prints the LabeledSymbol with an optional prefix string.
static const Key indexMask
static const size_t indexBits
ofstream os("timeSchurFactors.csv")
static std::function< bool(Key)> TypeTest(unsigned char c)
Checks only the type.
Key key() const
return the integer version
static std::function< bool(Key)> LabelTest(unsigned char label)
Checks only the robot ID (label_)
Key symbol(unsigned char c, std::uint64_t j)
bool operator==(const LabeledSymbol &comp) const
static const size_t chrBits
bool operator<(const LabeledSymbol &comp) const
unsigned char label() const
Retrieve label character.
const gtsam::Symbol key('X', 0)
To use the key_formatter on Keys, they must be wrapped in a StreamedKey.
bool operator!=(const LabeledSymbol &comp) const
LabeledSymbol()
Default constructor.
static std::function< bool(Key)> TypeLabelTest(unsigned char c, unsigned char label)
Checks both type and the robot ID.
static const size_t keyBits
unsigned __int64 uint64_t
std::uint64_t Key
Integer nonlinear key type.
static LabeledSymbol make(gtsam::Key key)
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:39