Rename Exact_type_selector to Exact_field_selector.

This commit is contained in:
Marc Glisse 2012-12-24 12:20:13 +01:00
parent bf4bdda1e3
commit 571f370e28
8 changed files with 20 additions and 20 deletions

View File

@ -75,7 +75,7 @@ class Lazy_alpha_nt_2{
//NT & kernels //NT & kernels
typedef CGAL::Interval_nt<mode> NT_approx; typedef CGAL::Interval_nt<mode> NT_approx;
//Gmpq or Quotient<MP_float> //Gmpq or Quotient<MP_float>
typedef Exact_type_selector<double>::Type NT_exact; typedef Exact_field_selector<double>::Type NT_exact;
typedef CGAL::Simple_cartesian<NT_approx> Kernel_approx; typedef CGAL::Simple_cartesian<NT_approx> Kernel_approx;
typedef CGAL::Simple_cartesian<NT_exact> Kernel_exact; typedef CGAL::Simple_cartesian<NT_exact> Kernel_exact;
typedef typename Kernel_traits<typename Input_traits::Point_2>::Kernel Kernel_input; typedef typename Kernel_traits<typename Input_traits::Point_2>::Kernel Kernel_input;

View File

@ -74,7 +74,7 @@ class Lazy_alpha_nt_3{
//NT & kernels //NT & kernels
typedef CGAL::Interval_nt<mode> NT_approx; typedef CGAL::Interval_nt<mode> NT_approx;
//Gmpq or Quotient<MP_float> //Gmpq or Quotient<MP_float>
typedef Exact_type_selector<double>::Type NT_exact; typedef Exact_field_selector<double>::Type NT_exact;
typedef CGAL::Simple_cartesian<NT_approx> Kernel_approx; typedef CGAL::Simple_cartesian<NT_approx> Kernel_approx;
typedef CGAL::Simple_cartesian<NT_exact> Kernel_exact; typedef CGAL::Simple_cartesian<NT_exact> Kernel_exact;
//Helper class for weighted and non-weighted case //Helper class for weighted and non-weighted case

View File

@ -123,7 +123,7 @@ public:
//and in case of failure, exact arithmetic is used. //and in case of failure, exact arithmetic is used.
template <class Kernel> template <class Kernel>
class Is_on_positive_side_of_plane_3<Convex_hull_traits_3<Kernel>,Tag_true>{ class Is_on_positive_side_of_plane_3<Convex_hull_traits_3<Kernel>,Tag_true>{
typedef Simple_cartesian<CGAL::internal::Exact_type_selector<double>::Type> PK; typedef Simple_cartesian<CGAL::internal::Exact_field_selector<double>::Type> PK;
typedef Simple_cartesian<Interval_nt_advanced > CK; typedef Simple_cartesian<Interval_nt_advanced > CK;
typedef Convex_hull_traits_3<Kernel> Traits; typedef Convex_hull_traits_3<Kernel> Traits;
typedef typename Traits::Point_3 Point_3; typedef typename Traits::Point_3 Point_3;

View File

@ -54,7 +54,7 @@ template < typename CK >
struct Filtered_kernel_base struct Filtered_kernel_base
: public CK : public CK
{ {
typedef typename internal::Exact_type_selector<typename CK::RT>::Type Exact_nt; typedef typename internal::Exact_field_selector<typename CK::RT>::Type Exact_nt;
typedef Simple_cartesian<Exact_nt> Exact_kernel; typedef Simple_cartesian<Exact_nt> Exact_kernel;
typedef Simple_cartesian<Interval_nt_advanced> Approximate_kernel; typedef Simple_cartesian<Interval_nt_advanced> Approximate_kernel;
typedef Cartesian_converter<CK, Exact_kernel> C2E; typedef Cartesian_converter<CK, Exact_kernel> C2E;

View File

@ -37,8 +37,8 @@
namespace CGAL { namespace CGAL {
// Epeck_ft is either Gmpq of Quotient<MP_float> // Epeck_ft is either Gmpq or Quotient<MP_float>
typedef internal::Exact_type_selector<double>::Type Epeck_ft; typedef internal::Exact_field_selector<double>::Type Epeck_ft;
// The following are redefined kernels instead of simple typedefs in order to shorten // The following are redefined kernels instead of simple typedefs in order to shorten
// template name length (for error messages, mangling...). // template name length (for error messages, mangling...).

View File

@ -58,7 +58,7 @@ namespace CGAL { namespace internal {
// The default template chooses Gmpq or Quotient<MP_Float>. // The default template chooses Gmpq or Quotient<MP_Float>.
// It should support the built-in types. // It should support the built-in types.
template < typename > template < typename >
struct Exact_type_selector struct Exact_field_selector
#ifdef CGAL_USE_GMP #ifdef CGAL_USE_GMP
{ typedef Gmpq Type; }; { typedef Gmpq Type; };
#else #else
@ -66,56 +66,56 @@ struct Exact_type_selector
#endif #endif
template <> template <>
struct Exact_type_selector<MP_Float> struct Exact_field_selector<MP_Float>
{ typedef Quotient<MP_Float> Type; }; { typedef Quotient<MP_Float> Type; };
template <> template <>
struct Exact_type_selector<Quotient<MP_Float> > struct Exact_field_selector<Quotient<MP_Float> >
{ typedef Quotient<MP_Float> Type; }; { typedef Quotient<MP_Float> Type; };
// And we specialize for the following types : // And we specialize for the following types :
#ifdef CGAL_USE_GMP #ifdef CGAL_USE_GMP
template <> template <>
struct Exact_type_selector<Gmpz> struct Exact_field_selector<Gmpz>
{ typedef Gmpq Type; }; { typedef Gmpq Type; };
template <> template <>
struct Exact_type_selector<Gmpq> struct Exact_field_selector<Gmpq>
{ typedef Gmpq Type; }; { typedef Gmpq Type; };
#endif #endif
#ifdef CGAL_USE_GMPXX #ifdef CGAL_USE_GMPXX
template <> template <>
struct Exact_type_selector< ::mpz_class> struct Exact_field_selector< ::mpz_class>
{ typedef ::mpq_class Type; }; { typedef ::mpq_class Type; };
template <> template <>
struct Exact_type_selector< ::mpq_class> struct Exact_field_selector< ::mpq_class>
{ typedef ::mpq_class Type; }; { typedef ::mpq_class Type; };
#endif #endif
#ifdef CGAL_USE_LEDA #ifdef CGAL_USE_LEDA
template <> template <>
struct Exact_type_selector<leda_integer> struct Exact_field_selector<leda_integer>
{ typedef leda_rational Type; }; { typedef leda_rational Type; };
template <> template <>
struct Exact_type_selector<leda_rational> struct Exact_field_selector<leda_rational>
{ typedef leda_rational Type; }; { typedef leda_rational Type; };
template <> template <>
struct Exact_type_selector<leda_real> struct Exact_field_selector<leda_real>
{ typedef leda_real Type; }; { typedef leda_real Type; };
#endif #endif
#ifdef CGAL_USE_CORE #ifdef CGAL_USE_CORE
template <> template <>
struct Exact_type_selector<CORE::Expr> struct Exact_field_selector<CORE::Expr>
{ typedef CORE::Expr Type; }; { typedef CORE::Expr Type; };
#endif #endif
template < typename ET > template < typename ET >
struct Exact_type_selector<Lazy_exact_nt<ET> > struct Exact_field_selector<Lazy_exact_nt<ET> >
{ {
// We have a choice here : // We have a choice here :
// - using ET gets rid of the DAG computation as well as redoing the interval // - using ET gets rid of the DAG computation as well as redoing the interval

View File

@ -732,7 +732,7 @@ void sqrt_extension_test(){
#include <CGAL/internal/Exact_type_selector.h> #include <CGAL/internal/Exact_type_selector.h>
void test_nt_converter() void test_nt_converter()
{ {
typedef CGAL::internal::Exact_type_selector<int>::Type NT; typedef CGAL::internal::Exact_field_selector<int>::Type NT;
typedef CGAL::Sqrt_extension<double,double> Source; typedef CGAL::Sqrt_extension<double,double> Source;
typedef CGAL::Sqrt_extension<NT,NT> Target; typedef CGAL::Sqrt_extension<NT,NT> Target;

View File

@ -215,7 +215,7 @@ public:
const Geometric_traits & gt = Geometric_traits()) const Geometric_traits & gt = Geometric_traits())
: _gt(gt), _tds(), _domain(domain), too_long_edge_counter(0) { : _gt(gt), _tds(), _domain(domain), too_long_edge_counter(0) {
_gt.set_domain(_domain); _gt.set_domain(_domain);
typedef typename internal::Exact_type_selector<FT>::Type EFT; typedef typename internal::Exact_field_selector<FT>::Type EFT;
typedef NT_converter<FT,EFT> NTC; typedef NT_converter<FT,EFT> NTC;
CGAL_triangulation_assertion_code( NTC ntc; ) CGAL_triangulation_assertion_code( NTC ntc; )
CGAL_triangulation_precondition(ntc(_domain.xmax())-ntc(_domain.xmin()) CGAL_triangulation_precondition(ntc(_domain.xmax())-ntc(_domain.xmin())