kill testChiSquaredInverse

release/4.3a0
Varun Agrawal 2023-12-28 14:05:39 -05:00
parent 98444aba3e
commit e0b8c5292a
2 changed files with 0 additions and 44 deletions

View File

@ -22,10 +22,8 @@
#pragma once
#include <gtsam/3rdparty/cephes/cephes.h>
#include <gtsam/dllexport.h>
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

View File

@ -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 <CppUnitLite/TestHarness.h>
#include <gtsam/base/Testable.h>
#include <gtsam/nonlinear/internal/ChiSquaredInverse.h>
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);
}
/* ************************************************************************* */