From 9b70fcdcfd4523cc752009c6b9dc63576ac2e3a2 Mon Sep 17 00:00:00 2001 From: Brice Rebsamen Date: Wed, 22 May 2019 11:37:49 -0700 Subject: [PATCH] fix issue 16 --- gtsam/nonlinear/factorTesting.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtsam/nonlinear/factorTesting.h b/gtsam/nonlinear/factorTesting.h index c0eccbd08..74ef87737 100644 --- a/gtsam/nonlinear/factorTesting.h +++ b/gtsam/nonlinear/factorTesting.h @@ -46,9 +46,9 @@ JacobianFactor linearizeNumerically(const NoiseModelFactor& factor, // Loop over all variables const double one_over_2delta = 1.0 / (2.0 * delta); - VectorValues dX = values.zeroVectors(); for(Key key: factor) { // Compute central differences using the values struct. + VectorValues dX = values.zeroVectors(); const size_t cols = dX.dim(key); Matrix J = Matrix::Zero(rows, cols); for (size_t col = 0; col < cols; ++col) {