26 #include <gtsam/dllexport.h> 38 GTSAM_EXPORT std::string _defaultKeyFormatter(
Key key);
43 static const KeyFormatter DefaultKeyFormatter = &_defaultKeyFormatter;
46 GTSAM_EXPORT std::string _multirobotKeyFormatter(
gtsam::Key key);
55 &_multirobotKeyFormatter;
61 GTSAM_EXPORT
friend std::ostream &operator<<(std::ostream &,
const StreamedKey &);
75 GTSAM_EXPORT
friend std::ostream &operator<<(std::ostream &,
const key_formatter &);
76 GTSAM_EXPORT
friend std::ostream &operator<<(std::ostream &,
const StreamedKey &);
80 static void *&property(std::ios_base &s);
81 static void set_property(std::ios_base &s,
const KeyFormatter &f);
95 Key key,
const std::string &s =
"",
100 const KeyList &keys,
const std::string &s =
"",
101 const KeyFormatter &keyFormatter = DefaultKeyFormatter);
105 const KeyVector &keys,
const std::string &s =
"",
106 const KeyFormatter &keyFormatter = DefaultKeyFormatter);
110 const KeySet &keys,
const std::string &s =
"",
111 const KeyFormatter &keyFormatter = DefaultKeyFormatter);
114 template<
typename T>
struct traits;
118 static void Print(
const Key& val,
const std::string& str =
"") {
121 static bool Equals(
const Key& val1,
const Key& val2,
double tol = 1e-8) {
GTSAM_EXPORT void PrintKeyVector(const KeyVector &keys, const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter)
Utility function to print sets of keys with optional prefix.
Typedefs for easier changing of types.
A thin wrapper around std::list that uses boost's fast_pool_allocator.
Concept check for values that can be used in unit tests.
GTSAM_EXPORT void PrintKey(Key key, const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter)
Utility function to print one key with optional prefix.
std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > FastVector
Definition: FastVector.h:34
GTSAM_EXPORT void PrintKeyList(const KeyList &keys, const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter)
Utility function to print sets of keys with optional prefix.
To use the key_formatter on Keys, they must be wrapped in a StreamedKey.
Definition: Key.h:58
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition: Key.h:35
Definition: FastList.h:43
A thin wrapper around std::vector that uses a custom allocator.
Definition: chartTesting.h:28
A thin wrapper around std::map that uses boost's fast_pool_allocator.
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
Definition: Key.h:86
A thin wrapper around std::set that uses boost's fast_pool_allocator.
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:102
GTSAM_EXPORT void PrintKeySet(const KeySet &keys, const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter)
Utility function to print sets of keys with optional prefix.