checking if print is the problem
parent
205eb18f47
commit
4f74735328
|
@ -70,18 +70,19 @@ HybridGaussianProductFactor& HybridGaussianProductFactor::operator+=(
|
||||||
/* *******************************************************************************/
|
/* *******************************************************************************/
|
||||||
void HybridGaussianProductFactor::print(const std::string& s,
|
void HybridGaussianProductFactor::print(const std::string& s,
|
||||||
const KeyFormatter& formatter) const {
|
const KeyFormatter& formatter) const {
|
||||||
KeySet keys;
|
// KeySet keys;
|
||||||
auto printer = [&](const Y& y) {
|
// auto printer = [&](const Y& y) {
|
||||||
if (keys.empty()) keys = y.first.keys();
|
// if (keys.empty()) keys = y.first.keys();
|
||||||
return "Graph of size " + std::to_string(y.first.size()) +
|
// return "Graph of size " + std::to_string(y.first.size()) +
|
||||||
", scalar sum: " + std::to_string(y.second);
|
// ", scalar sum: " + std::to_string(y.second);
|
||||||
};
|
// };
|
||||||
Base::print(s, formatter, printer);
|
// Base::print(s, formatter, printer);
|
||||||
if (!keys.empty()) {
|
// if (!keys.empty()) {
|
||||||
std::cout << s << " Keys:";
|
// std::cout << s << " Keys:";
|
||||||
for (auto&& key : keys) std::cout << " " << formatter(key);
|
// for (auto&& key : keys) std::cout << " " << formatter(key);
|
||||||
std::cout << "." << std::endl;
|
// std::cout << "." << std::endl;
|
||||||
}
|
// }
|
||||||
|
std::cout << "HybridGaussianProductFactor" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* *******************************************************************************/
|
/* *******************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue