mirror of https://github.com/CGAL/cgal
Use Exact_integer; Do not divide a Vector in case of Homogeneous
This commit is contained in:
parent
310ef4c219
commit
703eae4aeb
|
|
@ -10,23 +10,9 @@
|
|||
#include <CGAL/Exact_integer.h>
|
||||
#include <CGAL/Exact_rational.h>
|
||||
|
||||
#if defined( CGAL_USE_LEDA) || defined ( CGAL_USE_GMP )
|
||||
|
||||
typedef CGAL::Exact_integer RT;
|
||||
typedef CGAL::Exact_rational FT;
|
||||
|
||||
#else
|
||||
|
||||
// The following are too slow :
|
||||
// #include <CGAL/MP_Float.h>
|
||||
// #include <CGAL/Quotient.h>
|
||||
// typedef CGAL::MP_Float RT;
|
||||
// typedef CGAL::Quotient<RT> FT;
|
||||
typedef double RT;
|
||||
typedef double FT;
|
||||
|
||||
#endif
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
CGAL_KD_SETDTHREAD(151);
|
||||
|
|
@ -72,8 +58,6 @@ int main(int argc, char* argv[])
|
|||
Vector v21(v13),v22(v13);
|
||||
v21 *= 13;
|
||||
CGAL_TEST(v21 == NT(13)*v22){}
|
||||
v21 /= 13;
|
||||
CGAL_TEST(v21 == v22){}
|
||||
if (IOTEST) CGAL_IO_TEST(v1,v2,CGAL::IO::ASCII);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,22 +5,12 @@
|
|||
#include <CGAL/double.h>
|
||||
#include <CGAL/test_macros.h>
|
||||
|
||||
#ifdef CGAL_USE_LEDA
|
||||
#include <CGAL/leda_integer.h>
|
||||
#include <CGAL/leda_rational.h>
|
||||
typedef leda_integer RT_;
|
||||
typedef leda_rational FT_;
|
||||
#else
|
||||
#ifdef CGAL_USE_GMP
|
||||
#include <CGAL/Gmpz.h>
|
||||
#include <CGAL/Quotient.h>
|
||||
typedef CGAL::Gmpz RT_;
|
||||
typedef CGAL::Quotient<RT_> FT_;
|
||||
#else
|
||||
typedef double RT_;
|
||||
typedef double FT_;
|
||||
#endif
|
||||
#endif
|
||||
#include <CGAL/Exact_integer.h>
|
||||
#include <CGAL/Exact_rational.h>
|
||||
|
||||
typedef CGAL::Exact_integer RT_;
|
||||
typedef CGAL::Exact_rational FT_;
|
||||
|
||||
|
||||
int main()
|
||||
{ CGAL_KD_SETDTHREAD(2);
|
||||
|
|
|
|||
|
|
@ -5,28 +5,11 @@
|
|||
#include <CGAL/test_macros.h>
|
||||
#include <CGAL/use.h>
|
||||
|
||||
#ifdef CGAL_USE_LEDA
|
||||
#include <CGAL/Exact_integer.h>
|
||||
#include <CGAL/Exact_rational.h>
|
||||
|
||||
#include <CGAL/leda_integer.h>
|
||||
#include <CGAL/leda_real.h>
|
||||
typedef leda_integer RT;
|
||||
typedef leda_real FT;
|
||||
|
||||
#elif defined CGAL_USE_GMP
|
||||
|
||||
#include <CGAL/Gmpz.h>
|
||||
#include <CGAL/Gmpq.h>
|
||||
typedef CGAL::Gmpz RT;
|
||||
typedef CGAL::Gmpq FT;
|
||||
|
||||
#else
|
||||
|
||||
#include <CGAL/MP_Float.h>
|
||||
#include <CGAL/Quotient.h>
|
||||
typedef CGAL::MP_Float RT;
|
||||
typedef CGAL::Quotient<RT> FT;
|
||||
|
||||
#endif
|
||||
typedef CGAL::Exact_integer RT;
|
||||
typedef CGAL::Exact_rational FT;
|
||||
|
||||
int main()
|
||||
{ CGAL::IO::set_pretty_mode ( std::cerr );
|
||||
|
|
@ -383,4 +366,3 @@ int main()
|
|||
}
|
||||
CGAL_TEST_END;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue