From 593edd1e5cb53deb2f30635a3e21536e56eb7051 Mon Sep 17 00:00:00 2001 From: dellaert Date: Fri, 31 Oct 2014 16:29:15 +0100 Subject: [PATCH] Fixed asserts --- gtsam_unstable/nonlinear/Expression-inl.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gtsam_unstable/nonlinear/Expression-inl.h b/gtsam_unstable/nonlinear/Expression-inl.h index 4a91c03da..9327d0803 100644 --- a/gtsam_unstable/nonlinear/Expression-inl.h +++ b/gtsam_unstable/nonlinear/Expression-inl.h @@ -81,9 +81,9 @@ template void handleLeafCase(const Eigen::Matrix& dTdA, JacobianMap& jacobians, Key key) { JacobianMap::iterator it = std::find_if(jacobians.begin(), jacobians.end(), - boost::bind(&JacobianPair::first, _1)==key); - assert(it~= jacobians.end()); - it->second.block(0, 0) += dTdA; // block makes HUGE difference + boost::bind(&JacobianPair::first, _1) == key); + assert(it!=jacobians.end()); + it->second.block < ROWS, COLS > (0, 0) += dTdA; // block makes HUGE difference } /// Handle Leaf Case for Dynamic Matrix type (slower) template<> @@ -91,8 +91,8 @@ void handleLeafCase( const Eigen::Matrix& dTdA, JacobianMap& jacobians, Key key) { JacobianMap::iterator it = std::find_if(jacobians.begin(), jacobians.end(), - boost::bind(&JacobianPair::first, _1)==key); - assert(it~= jacobians.end()); + boost::bind(&JacobianPair::first, _1) == key); + assert(it!=jacobians.end()); it->second += dTdA; }