40 using Assignment::Assignment;
49 DiscreteValues(std::initializer_list<std::pair<const Key, size_t>> init)
57 void print(
const std::string& s =
"",
58 const KeyFormatter& keyFormatter = DefaultKeyFormatter)
const;
68 std::pair<iterator, bool> insert(
const value_type& value ){
69 return Base::insert(value);
87 return Base::CartesianProduct<DiscreteValues>(keys);
95 using Names = std::map<Key, std::vector<std::string>>;
98 static std::string Translate(
const Names& names,
Key key,
size_t index);
108 const Names& names = {})
const;
118 const Names& names = {})
const;
An assignment from labels to a discrete value index (size_t)
specialized key for discrete variables
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
string html(const DiscreteValues &values, const KeyFormatter &keyFormatter, const DiscreteValues::Names &names)
Free version of html.
Definition: DiscreteValues.cpp:134
string markdown(const DiscreteValues &values, const KeyFormatter &keyFormatter, const DiscreteValues::Names &names)
Free version of markdown.
Definition: DiscreteValues.cpp:129
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition: Matrix.cpp:156
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:100
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
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition: concepts.h:30
Template to create a binary predicate.
Definition: Testable.h:111
A helper that implements the traits interface for GTSAM types.
Definition: Testable.h:151
An assignment from labels to value index (size_t).
Definition: Assignment.h:37
DiscreteKeys is a set of keys that can be assembled using the & operator.
Definition: DiscreteKey.h:39
A map from keys to values.
Definition: DiscreteValues.h:34
std::map< Key, std::vector< std::string > > Names
Translation table from values to strings.
Definition: DiscreteValues.h:95
static std::vector< DiscreteValues > CartesianProduct(const DiscreteKeys &keys)
Return a vector of DiscreteValues, one for each possible combination of values.
Definition: DiscreteValues.h:85
The Factor::error simply extracts the.