mirror of https://github.com/CGAL/cgal
Split up Polynomial_traits_d.cpp in smaller testcases
as VC++ suffers from a combinatorial explosion
This commit is contained in:
parent
fb84aba2ea
commit
5a21045741
|
|
@ -6,3 +6,4 @@ include/CGAL/Polynomial/modular_gcd_utcf_pure_wang.h
|
|||
test/Polynomial/modular_gcd_utcf_pure_wang.cpp
|
||||
include/CGAL/Polynomial/modular_gcd_utcf_with_wang.h
|
||||
test/Polynomial/modular_gcd_utcf_with_wang.cpp
|
||||
test/Polynomial/Polynomial_traits_d.cpp
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
#include <iostream>
|
||||
#include <cassert>
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arithmetic_kernel.h>
|
||||
|
||||
#ifdef CGAL_HAS_DEFAULT_ARITHMETIC_KERNEL
|
||||
|
||||
#include <CGAL/Polynomial.h>
|
||||
#include <CGAL/Polynomial_traits_d.h>
|
||||
|
||||
#include <CGAL/Test/_test_polynomial_traits_d.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
// Set wrong rounding mode to test modular arithmetic
|
||||
CGAL::Protect_FPU_rounding<true> pfr(CGAL_FE_UPWARD);
|
||||
|
||||
typedef CGAL::Arithmetic_kernel AK;
|
||||
CGAL::set_pretty_mode(std::cerr);
|
||||
|
||||
typedef AK::Integer Integer;
|
||||
|
||||
typedef CGAL::Polynomial<Integer> Poly;
|
||||
typedef CGAL::Polynomial_traits_d<Poly> PT;
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "Test for coefficient type Integer" << std::endl;
|
||||
std::cerr << "--------------------------------------" << std::endl;
|
||||
CGAL::Test_Pol::test_multiple_dimensions(PT());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
int main()
|
||||
{
|
||||
std::cout << "No default arithmetic kernel has been found.\nNothing was tested" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
#endif // CGAL_HAS_DEFAULT_ARITHMETIC_KERNEL
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
#include <iostream>
|
||||
#include <cassert>
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arithmetic_kernel.h>
|
||||
|
||||
#ifdef CGAL_HAS_DEFAULT_ARITHMETIC_KERNEL
|
||||
|
||||
#include <CGAL/Polynomial.h>
|
||||
#include <CGAL/Polynomial_traits_d.h>
|
||||
|
||||
#include <CGAL/Test/_test_polynomial_traits_d.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
// Set wrong rounding mode to test modular arithmetic
|
||||
CGAL::Protect_FPU_rounding<true> pfr(CGAL_FE_UPWARD);
|
||||
|
||||
typedef CGAL::Arithmetic_kernel AK;
|
||||
|
||||
CGAL::set_pretty_mode(std::cerr);
|
||||
|
||||
typedef AK::Rational Rational;
|
||||
|
||||
typedef CGAL::Polynomial<Rational> Poly;
|
||||
typedef CGAL::Polynomial_traits_d<Poly> PT;
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "Test for coefficient type Rational" << std::endl;
|
||||
std::cerr << "---------------------------------------" << std::endl;
|
||||
CGAL::Test_Pol::test_multiple_dimensions(PT());
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
|
||||
int main()
|
||||
{
|
||||
std::cout << "No default arithmetic kernel has been found.\nNothing was tested" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif // CGAL_HAS_DEFAULT_ARITHMETIC_KERNEL
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
#include <iostream>
|
||||
#include <cassert>
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arithmetic_kernel.h>
|
||||
|
||||
#ifdef CGAL_HAS_DEFAULT_ARITHMETIC_KERNEL
|
||||
|
||||
#include <CGAL/Sqrt_extension.h>
|
||||
#include <CGAL/Polynomial.h>
|
||||
#include <CGAL/Polynomial_traits_d.h>
|
||||
|
||||
#include <CGAL/Test/_test_polynomial_traits_d.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
// Set wrong rounding mode to test modular arithmetic
|
||||
CGAL::Protect_FPU_rounding<true> pfr(CGAL_FE_UPWARD);
|
||||
|
||||
typedef CGAL::Arithmetic_kernel AK;
|
||||
|
||||
CGAL::set_pretty_mode(std::cerr);
|
||||
|
||||
typedef AK::Integer Integer;
|
||||
typedef AK::Rational Rational;
|
||||
|
||||
|
||||
typedef CGAL::Polynomial< CGAL::Sqrt_extension< Rational, Integer > > Poly;
|
||||
typedef CGAL::Polynomial_traits_d<Poly> PT;
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "Test for coefficient type Sqrt_extension< Rational, Integer >"
|
||||
<< std::endl;
|
||||
std::cerr <<
|
||||
"----------------------------------------------------------------------"
|
||||
<< std::endl;
|
||||
CGAL::Test_Pol::test_multiple_dimensions(PT());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
int main()
|
||||
{
|
||||
std::cout << "No default arithmetic kernel has been found.\nNothing was tested" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
#endif // CGAL_HAS_DEFAULT_ARITHMETIC_KERNEL
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
#include <iostream>
|
||||
#include <cassert>
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arithmetic_kernel.h>
|
||||
|
||||
#ifdef CGAL_HAS_DEFAULT_ARITHMETIC_KERNEL
|
||||
|
||||
#include <CGAL/Sqrt_extension.h>
|
||||
#include <CGAL/Polynomial.h>
|
||||
#include <CGAL/Polynomial_traits_d.h>
|
||||
|
||||
#include <CGAL/Test/_test_polynomial_traits_d.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
// Set wrong rounding mode to test modular arithmetic
|
||||
CGAL::Protect_FPU_rounding<true> pfr(CGAL_FE_UPWARD);
|
||||
|
||||
typedef CGAL::Arithmetic_kernel AK;
|
||||
|
||||
CGAL::set_pretty_mode(std::cerr);
|
||||
|
||||
typedef AK::Rational Rational;
|
||||
|
||||
typedef CGAL::Polynomial< CGAL::Sqrt_extension< Rational, Rational > > Poly;
|
||||
typedef CGAL::Polynomial_traits_d<Poly> PT;
|
||||
std::cerr << std::endl;
|
||||
std::cerr <<
|
||||
"Test for coefficient type Sqrt_extension< Rational, Rational >"
|
||||
<< std::endl;
|
||||
std::cerr <<
|
||||
"----------------------------------------------------------------------"
|
||||
<< std::endl;
|
||||
CGAL::Test_Pol::test_multiple_dimensions(PT());
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
int main()
|
||||
{
|
||||
std::cout << "No default arithmetic kernel has been found.\nNothing was tested" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif // CGAL_HAS_DEFAULT_ARITHMETIC_KERNEL
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
#include <iostream>
|
||||
#include <cassert>
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Arithmetic_kernel.h>
|
||||
|
||||
#ifdef CGAL_HAS_DEFAULT_ARITHMETIC_KERNEL
|
||||
|
||||
//#include <CGAL/FPU.h>
|
||||
#include <CGAL/Polynomial.h>
|
||||
#include <CGAL/Polynomial_traits_d.h>
|
||||
|
||||
#include <CGAL/Test/_test_polynomial_traits_d.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
// Set wrong rounding mode to test modular arithmetic
|
||||
CGAL::Protect_FPU_rounding<true> pfr(CGAL_FE_UPWARD);
|
||||
|
||||
typedef CGAL::Arithmetic_kernel AK;
|
||||
|
||||
CGAL::set_pretty_mode(std::cerr);
|
||||
|
||||
{
|
||||
// Enforce IEEE double precision and to nearest before
|
||||
// using modular arithmetic
|
||||
CGAL::Protect_FPU_rounding<true> pfr(CGAL_FE_TONEAREST);
|
||||
|
||||
typedef CGAL::Polynomial< CGAL::Residue > Poly;
|
||||
typedef CGAL::Polynomial_traits_d<Poly> PT;
|
||||
std::cerr << std::endl;
|
||||
std::cerr <<
|
||||
"Test for coefficient type CGAL::Residue"
|
||||
<< std::endl;
|
||||
std::cerr <<
|
||||
"----------------------------------------------------------------------"
|
||||
<< std::endl;
|
||||
CGAL::Test_Pol::test_multiple_dimensions(PT());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
|
||||
int main()
|
||||
{
|
||||
std::cout << "No default arithmetic kernel has been found.\nNothing was tested" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif // CGAL_HAS_DEFAULT_ARITHMETIC_KERNEL
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ void test_AK_3(){
|
|||
CGAL::set_pretty_mode(std::cerr);
|
||||
|
||||
typedef typename AK::Integer Integer;
|
||||
typedef typename AK::Rational Rational;
|
||||
|
||||
|
||||
|
||||
typedef CGAL::Polynomial< CGAL::Sqrt_extension< Integer, Integer > > Poly;
|
||||
|
|
|
|||
Loading…
Reference in New Issue