From 68e987ea620ea7961437966ac5ccdf9681b2eace Mon Sep 17 00:00:00 2001 From: kartik arcot Date: Fri, 20 Jan 2023 18:04:32 -0800 Subject: [PATCH] replace last combine call --- gtsam/discrete/DiscreteValues.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gtsam/discrete/DiscreteValues.cpp b/gtsam/discrete/DiscreteValues.cpp index b0427e91b..e21fb71db 100644 --- a/gtsam/discrete/DiscreteValues.cpp +++ b/gtsam/discrete/DiscreteValues.cpp @@ -17,7 +17,6 @@ #include -#include #include using std::cout; @@ -39,8 +38,10 @@ void DiscreteValues::print(const string& s, /* ************************************************************************ */ bool DiscreteValues::equals(const DiscreteValues& x, double tol) const { if (this->size() != x.size()) return false; - for (const auto values : boost::combine(*this, x)) { - if (values.get<0>() != values.get<1>()) return false; + auto it1 = x.begin(); + auto it2 = this->begin(); + for (; it1 != x.end(); ++it1, ++it2) { + if (it1->first != it2->first || it1->second != it2->second) return false; } return true; }