From 08b87be4b51e5a485c283a5ff8ee9fedb1cb25f8 Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Mon, 9 Apr 2012 13:21:14 +0000 Subject: [PATCH] Fixed parenthesis typos --- gtsam/base/FastSet.h | 2 +- gtsam/linear/NoiseModel.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gtsam/base/FastSet.h b/gtsam/base/FastSet.h index 05fb879a1..6abd7efb8 100644 --- a/gtsam/base/FastSet.h +++ b/gtsam/base/FastSet.h @@ -105,7 +105,7 @@ struct FastSetTestableHelper { typename Set::const_iterator it2 = set2.begin(); while (it1 != set1.end()) { if (it2 == set2.end() || - fabs((double)(*it1) - (double)(*it2) > tol)) + fabs((double)(*it1) - (double)(*it2)) > tol) return false; ++it1; ++it2; diff --git a/gtsam/linear/NoiseModel.cpp b/gtsam/linear/NoiseModel.cpp index fd93d39fc..b6472061f 100644 --- a/gtsam/linear/NoiseModel.cpp +++ b/gtsam/linear/NoiseModel.cpp @@ -59,7 +59,7 @@ Gaussian::shared_ptr Gaussian::Covariance(const Matrix& covariance, bool smart) size_t i,j; for (i = 0; i < m; i++) for (j = 0; j < n; j++) - if (i != j && fabs(covariance(i, j) > 1e-9)) goto full; + if (i != j && fabs(covariance(i, j)) > 1e-9) goto full; Vector variances(n); for (j = 0; j < n; j++) variances(j) = covariance(j,j); return Diagonal::Variances(variances,true);