Go to the documentation of this file.
35 if (asSymbol.
chr() > 0) {
36 return (
string) asSymbol;
39 return std::to_string(
key);
45 cout <<
s << keyFormatter(
key);
51 if (asLabeledSymbol.
chr() > 0 && asLabeledSymbol.
label() > 0)
52 return (
string) asLabeledSymbol;
55 if (asLabeledSymbol.
chr() > 0) {
56 return (
string) asSymbol;
59 return std::to_string(
key);
64 template<
class CONTAINER>
69 cout <<
"(none)" << endl;
72 cout << keyFormatter(
key) <<
" ";
95 void *&key_formatter::property(ios_base &
s) {
96 static int kUniqueIndex = ios_base::xalloc();
97 return s.pword(kUniqueIndex);
103 property(
s) = (
void *)(&
f);
115 key_formatter::set_property(
os,
m.formatter_);
126 os << (*formatter)(streamedKey.
key_);
unsigned char chr() const
Retrieve key character.
void PrintKeyVector(const KeyVector &keys, const string &s, const KeyFormatter &keyFormatter)
Utility function to print sets of keys with optional prefix.
const KeyFormatter & formatter
ofstream os("timeSchurFactors.csv")
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
unsigned char chr() const
string _multirobotKeyFormatter(Key key)
void PrintKey(Key key, const string &s, const KeyFormatter &keyFormatter)
Utility function to print one key with optional prefix.
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
ostream & operator<<(ostream &os, const StreamedKey &streamedKey)
unsigned char label() const
Retrieve label character.
const gtsam::Symbol key('X', 0)
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
To use the key_formatter on Keys, they must be wrapped in a StreamedKey.
string _defaultKeyFormatter(Key key)
void Print(const CONTAINER &keys, const string &s, const KeyFormatter &keyFormatter)
std::uint64_t Key
Integer nonlinear key type.
void PrintKeySet(const KeySet &keys, const string &s, const KeyFormatter &keyFormatter)
Utility function to print sets of keys with optional prefix.
void PrintKeyList(const KeyList &keys, const string &s, const KeyFormatter &keyFormatter)
Utility function to print sets of keys with optional prefix.
gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:11:51