kill testChiSquaredInverse
parent
98444aba3e
commit
e0b8c5292a
|
@ -22,10 +22,8 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <gtsam/3rdparty/cephes/cephes.h>
|
#include <gtsam/3rdparty/cephes/cephes.h>
|
||||||
#include <gtsam/dllexport.h>
|
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -34,10 +32,6 @@ namespace internal {
|
||||||
* The quantile function of the Chi-squared distribution is the quantile of
|
* The quantile function of the Chi-squared distribution is the quantile of
|
||||||
* the specific (inverse) incomplete Gamma distribution.
|
* 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 dofs Degrees of freedom
|
||||||
* @param alpha Quantile value
|
* @param alpha Quantile value
|
||||||
* @return double
|
* @return double
|
||||||
|
@ -47,5 +41,4 @@ double chi_squared_quantile(const double dofs, const double alpha) {
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
|
||||||
} // namespace gtsam
|
} // namespace gtsam
|
||||||
|
|
|
@ -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);
|
|
||||||
}
|
|
||||||
/* ************************************************************************* */
|
|
Loading…
Reference in New Issue