Go to the documentation of this file.
52 using std::map<L, size_t>::operator=;
61 void print(
const std::string&
s =
"Assignment: ",
62 const std::function<std::string(
L)>& labelFormatter =
64 std::cout <<
s <<
": ";
65 for (
const typename Assignment::value_type& keyValue : *
this) {
66 std::cout <<
"(" << labelFormatter(keyValue.first) <<
", "
67 << keyValue.second <<
")";
69 std::cout << std::endl;
73 return (*
this ==
other);
88 template <
typename Derived = Assignment<L>>
90 const std::vector<std::pair<L, size_t>>&
keys) {
91 std::vector<Derived> allPossValues;
97 allPossValues.push_back(
values);
99 for (
j = 0;
j <
keys.size();
j++) {
106 if (
j ==
keys.size())
break;
108 return allPossValues;
Array< double, 1, 3 > e(1./3., 0.5, 2.)
void print(const std::string &s="Assignment: ", const std::function< std::string(L)> &labelFormatter=&DefaultFormatter) const
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
bool equals(const Assignment &other, double tol=1e-9) const
static std::string DefaultFormatter(const L &x)
Default method used by labelFormatter or valueFormatter when printing.
static std::stringstream ss
static std::vector< Derived > CartesianProduct(const std::vector< std::pair< L, size_t >> &keys)
Get Cartesian product consisting all possible configurations.
const gtsam::Symbol key('X', 0)
std::pair< Key, size_t > DiscreteKey
Assignment(std::initializer_list< std::pair< const L, size_t >> init)
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:01:52