Skip to content

Commit

Permalink
Merge remote-tracking branch 'cgal/5.6.x-branch'
Browse files Browse the repository at this point in the history
  • Loading branch information
lrineau committed Jul 20, 2023
2 parents 829e809 + c2ded06 commit d6ebf17
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ halfspace_intersection_interior_point_3(PlaneIterator begin, PlaneIterator end)
typedef typename Kernel_traits<typename std::iterator_traits<PlaneIterator>::value_type>::Kernel K;

// choose exact integral type
typedef typename internal::Exact_field_selector<void*>::Type ET;
typedef typename internal::Exact_field_selector<typename K::FT>::Type ET;

// find a point inside the intersection
internal::Interior_polyhedron_3<K, ET> interior;
Expand Down
9 changes: 8 additions & 1 deletion Installation/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Release date: October 2023
[Release 5.6](https://github.com/CGAL/cgal/releases/tag/v5.6)
-----------

Release date: June 2023
Release date: July 2023

### General Changes

Expand Down Expand Up @@ -186,6 +186,13 @@ Release date: June 2023
to describe 3D simplicial meshes, and makes the data structure independent
from the [tetrahedral mesh generation](https://doc.cgal.org/5.6/Manual/packages.html#PkgMesh3) package.

### [Tetrahedral Remeshing](https://doc.cgal.org/5.6/Manual/packages.html#PkgTetrahedralRemeshing)
- **Breaking change**: The template parameters of
[`CGAL::Tetrahedral_remeshing::Remeshing_vertex_base_3`](https://doc.cgal.org/5.6/Tetrahedral_remeshing/group__PkgTetrahedralRemeshingClasses.html#ga7ef4f8c0c1ed715c34389ea4ee851a92)
and
[`CGAL::Tetrahedral_remeshing::Remeshing_cell_base_3`](https://doc.cgal.org/5.6/Tetrahedral_remeshing/classCGAL_1_1Tetrahedral__remeshing_1_1Remeshing__cell__base__3.html)
have been modified.

### [3D Mesh Generation](https://doc.cgal.org/5.6/Manual/packages.html#PkgMesh3)

- Added two new named parameters to the named constructor
Expand Down
4 changes: 2 additions & 2 deletions Intersections_2/test/Intersections_2/test_intersections_2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -924,9 +924,9 @@ int main()
{
CGAL::Set_ieee_double_precision pfr;

Test< CGAL::Simple_cartesian<CGAL::internal::Exact_field_selector<void*>::Type > >().run();
Test< CGAL::Simple_cartesian<CGAL::internal::Exact_field_selector<double>::Type > >().run();
Test< CGAL::Cartesian<double> >().run();
Test< CGAL::Homogeneous<CGAL::internal::Exact_field_selector<void*>::Type > >().run();
Test< CGAL::Homogeneous<CGAL::internal::Exact_field_selector<double>::Type > >().run();
Test< CGAL::Exact_predicates_inexact_constructions_kernel >().run();
Test< CGAL::Exact_predicates_exact_constructions_kernel >().run();
}
2 changes: 1 addition & 1 deletion Number_types/include/CGAL/Exact_integer.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ typedef unspecified_type Exact_integer;

#else // not DOXYGEN_RUNNING

typedef internal::Exact_ring_selector<int>::Type Exact_integer;
using Exact_integer = internal::Exact_NT_backend<internal::Default_exact_nt_backend>::Integer;

#endif // not DOXYGEN_RUNNING

Expand Down
2 changes: 1 addition & 1 deletion Number_types/include/CGAL/Exact_rational.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ typedef unspecified_type Exact_rational;

#else // not DOXYGEN_RUNNING

typedef internal::Exact_field_selector<double>::Type Exact_rational;
using Exact_rational = internal::Exact_NT_backend<internal::Default_exact_nt_backend>::Rational;

#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,25 +156,27 @@ constexpr ENT_backend_choice Default_exact_nt_backend = static_cast<ENT_backend_
#endif

template < typename >
struct Exact_field_selector
{
using Type = typename Exact_NT_backend<Default_exact_nt_backend>::Rational;
};
struct Exact_field_selector;

template < typename >
struct Exact_ring_selector
{
using Type = typename Exact_NT_backend<Default_exact_nt_backend>::Integer;
};

template <>
struct Exact_ring_selector<double>
{
using Type = typename Exact_NT_backend<Default_exact_nt_backend>::Ring_for_float;
struct Exact_ring_selector;

#define CGAL_EXACT_SELECTORS_SPECS(X) \
template <> \
struct Exact_ring_selector<X> \
{ \
using Type = typename Exact_NT_backend<Default_exact_nt_backend>::Ring_for_float; \
}; \
\
template <> \
struct Exact_field_selector<X> \
{ \
using Type = typename Exact_NT_backend<Default_exact_nt_backend>::Rational; \
};

template <>
struct Exact_ring_selector<float> : Exact_ring_selector<double> { };
CGAL_EXACT_SELECTORS_SPECS(double)
CGAL_EXACT_SELECTORS_SPECS(float)
CGAL_EXACT_SELECTORS_SPECS(int)

template <>
struct Exact_field_selector<MP_Float>
Expand All @@ -188,6 +190,10 @@ template <>
struct Exact_field_selector<Quotient<MP_Float> >
{ typedef Quotient<MP_Float> Type; };

template <>
struct Exact_ring_selector<Quotient<MP_Float> >
{ typedef Quotient<MP_Float> Type; };

// And we specialize for the following types :
#ifdef CGAL_USE_GMP
template <>
Expand Down Expand Up @@ -249,6 +255,10 @@ struct Exact_ring_selector<leda_rational>
template <>
struct Exact_field_selector<leda_real>
{ typedef leda_real Type; };

template <>
struct Exact_ring_selector<leda_real>
{ typedef leda_real Type; };
#endif

#ifdef CGAL_USE_CORE
Expand Down Expand Up @@ -277,6 +287,26 @@ struct Exact_field_selector<Exact_NT_backend<BOOST_BACKEND>::Rational>
template <>
struct Exact_ring_selector<Exact_NT_backend<BOOST_BACKEND>::Rational>
{ typedef Exact_NT_backend<BOOST_BACKEND>::Rational Type; };


#ifdef CGAL_USE_GMP
template <>
struct Exact_field_selector<Exact_NT_backend<BOOST_GMP_BACKEND>::Integer>
{ typedef Exact_NT_backend<BOOST_GMP_BACKEND>::Rational Type; };

template <>
struct Exact_ring_selector<Exact_NT_backend<BOOST_GMP_BACKEND>::Integer>
{ typedef Exact_NT_backend<BOOST_GMP_BACKEND>::Integer Type; };

template <>
struct Exact_field_selector<Exact_NT_backend<BOOST_GMP_BACKEND>::Rational>
{ typedef Exact_NT_backend<BOOST_GMP_BACKEND>::Rational Type; };

template <>
struct Exact_ring_selector<Exact_NT_backend<BOOST_GMP_BACKEND>::Rational>
{ typedef Exact_NT_backend<BOOST_GMP_BACKEND>::Rational Type; };
#endif

#endif

#ifndef CGAL_NO_DEPRECATED_CODE
Expand All @@ -287,4 +317,6 @@ struct Exact_type_selector : Exact_field_selector< ET > {};

} } // namespace CGAL::internal

#undef CGAL_EXACT_SELECTORS_SPECS

#endif // CGAL_INTERNAL_EXACT_TYPE_SELECTOR_H

0 comments on commit d6ebf17

Please sign in to comment.