57 void print(
const std::string&
s =
"",
87 return Base::CartesianProduct<DiscreteValues>(
keys);
95 using Names = std::map<Key, std::vector<std::string>>;
void print(const Matrix &A, const string &s, ostream &stream)
const gtsam::Symbol key('X', 0)
An assignment from labels to a discrete value index (size_t)
string markdown(const DiscreteValues &values, const KeyFormatter &keyFormatter, const DiscreteValues::Names &names)
Free version of markdown.
DiscreteValues(const Base &a)
static const KeyFormatter DefaultKeyFormatter
static std::vector< DiscreteValues > CartesianProduct(const DiscreteKeys &keys)
Return a vector of DiscreteValues, one for each possible combination of values.
string html(const DiscreteValues &values, const KeyFormatter &keyFormatter, const DiscreteValues::Names &names)
Free version of html.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
specialized key for discrete variables
std::pair< iterator, bool > insert(const value_type &value)
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
DiscreteValues(std::initializer_list< std::pair< const Key, size_t >> init)
std::uint64_t Key
Integer nonlinear key type.
std::map< Key, std::vector< std::string > > Names
Translation table from values to strings.
DiscreteKeys is a set of keys that can be assembled using the & operator.