From c88b2a59022ec9d41b81ea0c5f5e66b4fcbe92bb Mon Sep 17 00:00:00 2001 From: dellaert Date: Wed, 15 Oct 2014 00:34:28 +0200 Subject: [PATCH] Fixed bizarre link erro as well as off-by-1 bug --- gtsam_unstable/nonlinear/ExpressionFactor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtsam_unstable/nonlinear/ExpressionFactor.h b/gtsam_unstable/nonlinear/ExpressionFactor.h index 42d9ad598..bc0edbbb5 100644 --- a/gtsam_unstable/nonlinear/ExpressionFactor.h +++ b/gtsam_unstable/nonlinear/ExpressionFactor.h @@ -85,8 +85,8 @@ public: // Get dimensions of Jacobian matrices std::vector dims = expression_.dimensions(); - size_t m = std::accumulate(dims.rend(),dims.rbegin(),0); - Matrix matrix(T::dimension,m); + size_t m1 = std::accumulate(dims.begin(),dims.end(),1); + Matrix matrix = Matrix::Identity(T::dimension,m1); // Construct block matrix, is of right size but un-initialized VerticalBlockMatrix Ab(dims, matrix, true);