diff --git a/gtsam/nonlinear/internal/ChiSquaredInverse.h b/gtsam/nonlinear/internal/ChiSquaredInverse.h index e0284c313..dbf83f92b 100644 --- a/gtsam/nonlinear/internal/ChiSquaredInverse.h +++ b/gtsam/nonlinear/internal/ChiSquaredInverse.h @@ -22,10 +22,8 @@ #pragma once #include -#include namespace gtsam { - namespace internal { /** @@ -34,10 +32,6 @@ namespace internal { * The quantile function of the Chi-squared distribution is the quantile of * the specific (inverse) incomplete Gamma distribution. * - * We have a dedicated function so we can unit test any issues easily while also - * allowing it to be updated in the future without any backwards-compatibility - * issues. - * * @param dofs Degrees of freedom * @param alpha Quantile value * @return double @@ -47,5 +41,4 @@ double chi_squared_quantile(const double dofs, const double alpha) { } } // namespace internal - } // namespace gtsam diff --git a/gtsam/nonlinear/tests/testChiSquaredInverse.cpp b/gtsam/nonlinear/tests/testChiSquaredInverse.cpp deleted file mode 100644 index b9ff64fdb..000000000 --- a/gtsam/nonlinear/tests/testChiSquaredInverse.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* ---------------------------------------------------------------------------- - - * GTSAM Copyright 2010, Georgia Tech Research Corporation, - * Atlanta, Georgia 30332-0415 - * All Rights Reserved - * Authors: Frank Dellaert, et al. (see THANKS for the full author list) - - * See LICENSE for the license information - - * -------------------------------------------------------------------------- */ - -/* - * @file testChiSquaredInverse.cpp - * @date July 10, 2023 - * @author Varun Agrawal - * @brief Tests for Chi-squared distribution. - */ - -#include -#include -#include - -using namespace gtsam; - -/* ************************************************************************* */ -TEST(ChiSquaredInverse, ChiSqInv) { - double barcSq = internal::chi_squared_quantile(2, 0.99); - EXPECT_DOUBLES_EQUAL(9.21034, barcSq, 1e-5); -} - -/* ************************************************************************* */ -int main() { - srand(time(nullptr)); - TestResult tr; - return TestRegistry::runAllTests(tr); -} -/* ************************************************************************* */