ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
polynomial_test.cc File Reference
#include "util/testing.h"
#include "base/polynomial.h"
Include dependency graph for polynomial_test.cc:

Go to the source code of this file.

Macros

#define TEST_NAME   "base/polynomial"
 
#define CHECK_EQUAL_RESULT(find_func1, coeffs1, find_func2, coeffs2)
 

Functions

 BOOST_AUTO_TEST_CASE (TestEvaluatePolynomial)
 
 BOOST_AUTO_TEST_CASE (TestFindLinearPolynomialRoots)
 
 BOOST_AUTO_TEST_CASE (TestFindQuadraticPolynomialRootsReal)
 
 BOOST_AUTO_TEST_CASE (TestFindQuadraticPolynomialRootsComplex)
 
 BOOST_AUTO_TEST_CASE (TestFindPolynomialRootsDurandKerner)
 
 BOOST_AUTO_TEST_CASE (TestFindPolynomialRootsDurandKernerLinearQuadratic)
 
 BOOST_AUTO_TEST_CASE (TestFindPolynomialRootsCompanionMatrix)
 
 BOOST_AUTO_TEST_CASE (TestFindPolynomialRootsCompanionMatrixLinearQuadratic)
 
 BOOST_AUTO_TEST_CASE (TestFindPolynomialRootsCompanionMatrixZeroSolution)
 

Macro Definition Documentation

◆ CHECK_EQUAL_RESULT

#define CHECK_EQUAL_RESULT (   find_func1,
  coeffs1,
  find_func2,
  coeffs2 
)
Value:
{ \
Eigen::VectorXd real1; \
Eigen::VectorXd imag1; \
const bool success1 = find_func1(coeffs1, &real1, &imag1); \
Eigen::VectorXd real2; \
Eigen::VectorXd imag2; \
const bool success2 = find_func2(coeffs2, &real2, &imag2); \
BOOST_CHECK_EQUAL(success1, success2); \
if (success1) { \
BOOST_CHECK_EQUAL(real1, real2); \
BOOST_CHECK_EQUAL(imag1, imag2); \
} \
}

Definition at line 39 of file polynomial_test.cc.

◆ TEST_NAME

#define TEST_NAME   "base/polynomial"

Definition at line 32 of file polynomial_test.cc.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/9]

BOOST_AUTO_TEST_CASE ( TestEvaluatePolynomial  )

Definition at line 54 of file polynomial_test.cc.

References e, and colmap::EvaluatePolynomial().

◆ BOOST_AUTO_TEST_CASE() [2/9]

BOOST_AUTO_TEST_CASE ( TestFindLinearPolynomialRoots  )

◆ BOOST_AUTO_TEST_CASE() [3/9]

BOOST_AUTO_TEST_CASE ( TestFindPolynomialRootsCompanionMatrix  )

Definition at line 142 of file polynomial_test.cc.

References coeffs(), e, and colmap::FindPolynomialRootsCompanionMatrix().

◆ BOOST_AUTO_TEST_CASE() [4/9]

BOOST_AUTO_TEST_CASE ( TestFindPolynomialRootsCompanionMatrixLinearQuadratic  )

◆ BOOST_AUTO_TEST_CASE() [5/9]

BOOST_AUTO_TEST_CASE ( TestFindPolynomialRootsCompanionMatrixZeroSolution  )

Definition at line 171 of file polynomial_test.cc.

References coeffs(), e, and colmap::FindPolynomialRootsCompanionMatrix().

◆ BOOST_AUTO_TEST_CASE() [6/9]

BOOST_AUTO_TEST_CASE ( TestFindPolynomialRootsDurandKerner  )

Definition at line 114 of file polynomial_test.cc.

References coeffs(), e, and colmap::FindPolynomialRootsDurandKerner().

◆ BOOST_AUTO_TEST_CASE() [7/9]

BOOST_AUTO_TEST_CASE ( TestFindPolynomialRootsDurandKernerLinearQuadratic  )

◆ BOOST_AUTO_TEST_CASE() [8/9]

BOOST_AUTO_TEST_CASE ( TestFindQuadraticPolynomialRootsComplex  )

◆ BOOST_AUTO_TEST_CASE() [9/9]

BOOST_AUTO_TEST_CASE ( TestFindQuadraticPolynomialRootsReal  )