From 7e1a683e34c853593f9bdacd1f10d799938f458d Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Fri, 13 Oct 2023 15:36:45 -0400 Subject: [PATCH] Revert "imrpove bounds checks in Chebyshev2" This reverts commit 2a386f8631e38de120d67138e6f2bfeb56d0f644. --- gtsam/basis/Chebyshev2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtsam/basis/Chebyshev2.cpp b/gtsam/basis/Chebyshev2.cpp index 63fca64cc..44876b6e9 100644 --- a/gtsam/basis/Chebyshev2.cpp +++ b/gtsam/basis/Chebyshev2.cpp @@ -32,7 +32,7 @@ Weights Chebyshev2::CalculateWeights(size_t N, double x, double a, double b) { const double dj = x - Point(N, j, a, b); // only thing that depends on [a,b] - if (std::abs(dj) < 1e-12) { + if (std::abs(dj) < 1e-10) { // exceptional case: x coincides with a Chebyshev point weights.setZero(); weights(j) = 1; @@ -73,7 +73,7 @@ Weights Chebyshev2::DerivativeWeights(size_t N, double x, double a, double b) { for (size_t j = 0; j < N; j++) { const double dj = x - Point(N, j, a, b); // only thing that depends on [a,b] - if (std::abs(dj) < 1e-12) { + if (std::abs(dj) < 1e-10) { // exceptional case: x coincides with a Chebyshev point weightDerivatives.setZero(); // compute the jth row of the differentiation matrix for this point