24 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION 25 #include <boost/serialization/nvp.hpp> 51 c_(key.c_), j_(key.j_) {
66 operator Key()
const {
return key(); }
69 void print(
const std::string&
s =
"")
const;
75 unsigned char chr()
const {
85 operator std::string()
const;
88 std::string
string()
const {
return std::string(*
this); }
92 return c_ < comp.
c_ || (comp.
c_ == c_ && j_ < comp.
j_);
97 return comp.
c_ == c_ && comp.
j_ == j_;
102 return comp == (
Key)(*
this);
107 return comp.
c_ != c_ || comp.
j_ != j_;
112 return comp != (
Key)(*
this);
120 static std::function<bool(Key)> ChrTest(
unsigned char c);
123 GTSAM_EXPORT
friend std::ostream &
operator<<(std::ostream &,
const Symbol &);
127 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION 129 friend class boost::serialization::access;
130 template<
class ARCHIVE>
131 void serialize(ARCHIVE & ar,
const unsigned int ) {
132 ar & BOOST_SERIALIZATION_NVP(c_);
133 ar & BOOST_SERIALIZATION_NVP(j_);
147 namespace symbol_shorthand {
179 const unsigned char c_;
183 constexpr
unsigned char chr()
const {
return c_; }
void print(const Matrix &A, const string &s, ostream &stream)
const gtsam::Symbol key('X', 0)
std::ostream & operator<<(std::ostream &os, const Dih6 &m)
Concept check for values that can be used in unit tests.
std::string serialize(const T &input)
serializes to a string
JacobiRotation< float > G
Symbol operator()(const std::uint64_t j) const
Rot2 R(Rot2::fromAngle(0.1))
Symbol(unsigned char c, std::uint64_t j)
bool operator==(Key comp) const
bool operator==(const Symbol &comp) const
bool operator<(const Symbol &comp) const
std::string string() const
Return string representation of the key.
unsigned __int64 uint64_t
constexpr SymbolGenerator(const unsigned char c)
Key symbol(unsigned char c, std::uint64_t j)
JacobiRotation< float > J
constexpr unsigned char chr() const
std::uint64_t index() const
bool operator!=(Key comp) const
unsigned char chr() const
Symbol(const Symbol &key)
unsigned char symbolChr(Key key)
bool operator!=(const Symbol &comp) const
std::uint64_t Key
Integer nonlinear key type.
std::uint64_t symbolIndex(Key key)