helper method for printing DiscreteValues
parent
518b067104
commit
648634f42c
|
@ -145,6 +145,11 @@ string DiscreteValues::html(const KeyFormatter& keyFormatter,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
|
void PrintDiscreteValues(const DiscreteValues& values, const std::string& s,
|
||||||
|
const KeyFormatter& keyFormatter) {
|
||||||
|
values.print(s, keyFormatter);
|
||||||
|
}
|
||||||
|
|
||||||
string markdown(const DiscreteValues& values, const KeyFormatter& keyFormatter,
|
string markdown(const DiscreteValues& values, const KeyFormatter& keyFormatter,
|
||||||
const DiscreteValues::Names& names) {
|
const DiscreteValues::Names& names) {
|
||||||
return values.markdown(keyFormatter, names);
|
return values.markdown(keyFormatter, names);
|
||||||
|
|
|
@ -188,6 +188,11 @@ inline std::vector<DiscreteValues> cartesianProduct(const DiscreteKeys& keys) {
|
||||||
return DiscreteValues::CartesianProduct(keys);
|
return DiscreteValues::CartesianProduct(keys);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Free version of print for wrapper
|
||||||
|
void PrintDiscreteValues(
|
||||||
|
const DiscreteValues& values, const std::string& s = "",
|
||||||
|
const KeyFormatter& keyFormatter = DefaultKeyFormatter);
|
||||||
|
|
||||||
/// Free version of markdown.
|
/// Free version of markdown.
|
||||||
std::string GTSAM_EXPORT
|
std::string GTSAM_EXPORT
|
||||||
markdown(const DiscreteValues& values,
|
markdown(const DiscreteValues& values,
|
||||||
|
|
|
@ -22,6 +22,11 @@ class DiscreteKeys {
|
||||||
// DiscreteValues is added in specializations/discrete.h as a std::map
|
// DiscreteValues is added in specializations/discrete.h as a std::map
|
||||||
std::vector<gtsam::DiscreteValues> cartesianProduct(
|
std::vector<gtsam::DiscreteValues> cartesianProduct(
|
||||||
const gtsam::DiscreteKeys& keys);
|
const gtsam::DiscreteKeys& keys);
|
||||||
|
|
||||||
|
void PrintDiscreteValues(
|
||||||
|
const gtsam::DiscreteValues& values, const std::string& s = "",
|
||||||
|
const gtsam::KeyFormatter& keyFormatter = gtsam::DefaultKeyFormatter);
|
||||||
|
|
||||||
string markdown(
|
string markdown(
|
||||||
const gtsam::DiscreteValues& values,
|
const gtsam::DiscreteValues& values,
|
||||||
const gtsam::KeyFormatter& keyFormatter = gtsam::DefaultKeyFormatter);
|
const gtsam::KeyFormatter& keyFormatter = gtsam::DefaultKeyFormatter);
|
||||||
|
|
Loading…
Reference in New Issue