Changes to replace Cartesian<Expr> with EPICK_with_sqrt, plus code cleanup, plus documentation fixes

This commit is contained in:
Iordan Iordanov 2019-01-14 18:29:42 +01:00
parent 46ff29c2e7
commit 9792b241dd
10 changed files with 10 additions and 16 deletions

View File

@ -3,7 +3,7 @@
#include <CGAL/Hyperbolic_Delaunay_triangulation_2.h> #include <CGAL/Hyperbolic_Delaunay_triangulation_2.h>
#include <CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h> #include <CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h>
#include <CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h> #include <CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h>
#include <CGAL/Cartesian.h>
#include <CGAL/point_generators_2.h> #include <CGAL/point_generators_2.h>
#include <CGAL/Timer.h> #include <CGAL/Timer.h>
@ -80,8 +80,7 @@ std::pair<double,double> insert_CK_points(const std::vector<NT_point>& dpts)
template<typename NT_point> template<typename NT_point>
std::pair<double,double> insert_CORE_points(const std::vector<NT_point>& dpts) std::pair<double,double> insert_CORE_points(const std::vector<NT_point>& dpts)
{ {
typedef CGAL::Cartesian<CORE::Expr> K; typedef CGAL::Hyperbolic_Delaunay_triangulation_traits_2<> Gt;
typedef CGAL::Hyperbolic_Delaunay_triangulation_traits_2<K> Gt;
typedef Gt::Point_2 Point_2; typedef Gt::Point_2 Point_2;
typedef CGAL::Hyperbolic_Delaunay_triangulation_2<Gt> Dt; typedef CGAL::Hyperbolic_Delaunay_triangulation_2<Gt> Dt;

View File

@ -14,8 +14,9 @@ offered by %CGAL.
If `K` provides exact computations with square roots, then this class automatically If `K` provides exact computations with square roots, then this class automatically
provides exact constructions and predicates. The default value for `K` is provides exact constructions and predicates. The default value for `K` is
`CGAL::Cartesian<CORE::Expr>`, which guarantees exact constructions of Delaunay `Exact_predicates_exact_constructions_kernel_with_sqrt`, which guarantees exact
triangulations and dual objects for input points with algebraic coordinates. constructions of Delaunay triangulations and dual objects for input points with
algebraic coordinates.
\sa Hyperbolic_Delaunay_triangulation_CK_traits_2 \sa Hyperbolic_Delaunay_triangulation_CK_traits_2

View File

@ -55,7 +55,7 @@ The Delaunay triangulation of a set of points \f$P\f$ in the hyperbolic plane \f
- `CGAL::Hyperbolic_triangulation_face_base_2` - `CGAL::Hyperbolic_triangulation_face_base_2`
Two models for the concept `HyperbolicDelaunayTriangulationTraits_2` are provided: Two models for the concept `HyperbolicDelaunayTriangulationTraits_2` are provided:
- `CGAL::Hyperbolic_Delaunay_triangulation_traits_2` is by default based upon `CGAL::Cartesian<CORE::Expr>` and guarantees exact constructions of Delaunay triangulations and dual objects for input points with algebraic coordinates. - `CGAL::Hyperbolic_Delaunay_triangulation_traits_2` is by default based upon `CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt` and guarantees exact constructions of Delaunay triangulations and dual objects for input points with algebraic coordinates.
- `CGAL::Hyperbolic_Delaunay_triangulation_CK_traits_2` is based upon `CGAL::Circular_kernel_2` and guarantees exact constructions of Delaunay triangulations and dual objects when the input points have rational coordinates. - `CGAL::Hyperbolic_Delaunay_triangulation_CK_traits_2` is based upon `CGAL::Circular_kernel_2` and guarantees exact constructions of Delaunay triangulations and dual objects when the input points have rational coordinates.
The model `CGAL::Hyperbolic_Delaunay_triangulation_CK_traits_2` is faster than `CGAL::Hyperbolic_Delaunay_triangulation_traits_2` for points with rational coordinates. The model `CGAL::Hyperbolic_Delaunay_triangulation_CK_traits_2` is faster than `CGAL::Hyperbolic_Delaunay_triangulation_traits_2` for points with rational coordinates.

View File

@ -24,12 +24,10 @@
#define CGAL_HYPERBOLIC_DELAUNAY_TRIANGULATION_TRAITS_2_H #define CGAL_HYPERBOLIC_DELAUNAY_TRIANGULATION_TRAITS_2_H
#include <CGAL/license/Hyperbolic_triangulation_2.h> #include <CGAL/license/Hyperbolic_triangulation_2.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h>
#include <CGAL/basic.h> #include <CGAL/basic.h>
#include <CGAL/basic_constructions_2.h> #include <CGAL/basic_constructions_2.h>
#include <CGAL/Bbox_2.h> #include <CGAL/Bbox_2.h>
#include <CGAL/Cartesian.h>
#include <CGAL/CORE_Expr.h>
#include <CGAL/determinant.h> #include <CGAL/determinant.h>
#include <CGAL/distance_predicates_2.h> #include <CGAL/distance_predicates_2.h>
#include <CGAL/internal/Exact_complex.h> #include <CGAL/internal/Exact_complex.h>
@ -465,7 +463,9 @@ private:
} // end namespace internal } // end namespace internal
template<typename Kernel = CGAL::Cartesian<CORE::Expr> > //template<typename Kernel = CGAL::Cartesian<CORE::Expr> >
template<typename Kernel = Exact_predicates_exact_constructions_kernel_with_sqrt>
class Hyperbolic_Delaunay_triangulation_traits_2 class Hyperbolic_Delaunay_triangulation_traits_2
: public Kernel : public Kernel
{ {

View File

@ -1,6 +1,5 @@
#include <CGAL/Hyperbolic_Delaunay_triangulation_2.h> #include <CGAL/Hyperbolic_Delaunay_triangulation_2.h>
#include <CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h> #include <CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/point_generators_2.h> #include <CGAL/point_generators_2.h>
typedef CGAL::Hyperbolic_Delaunay_triangulation_traits_2<> Traits; typedef CGAL::Hyperbolic_Delaunay_triangulation_traits_2<> Traits;

View File

@ -1,6 +1,5 @@
#include <CGAL/Hyperbolic_Delaunay_triangulation_2.h> #include <CGAL/Hyperbolic_Delaunay_triangulation_2.h>
#include <CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h> #include <CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/point_generators_2.h> #include <CGAL/point_generators_2.h>
typedef CGAL::Hyperbolic_Delaunay_triangulation_traits_2<> Traits; typedef CGAL::Hyperbolic_Delaunay_triangulation_traits_2<> Traits;

View File

@ -1,6 +1,5 @@
#include <CGAL/Hyperbolic_Delaunay_triangulation_2.h> #include <CGAL/Hyperbolic_Delaunay_triangulation_2.h>
#include <CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h> #include <CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/point_generators_2.h> #include <CGAL/point_generators_2.h>
typedef CGAL::Hyperbolic_Delaunay_triangulation_traits_2<> Traits; typedef CGAL::Hyperbolic_Delaunay_triangulation_traits_2<> Traits;

View File

@ -1,6 +1,5 @@
#include <CGAL/Hyperbolic_Delaunay_triangulation_2.h> #include <CGAL/Hyperbolic_Delaunay_triangulation_2.h>
#include <CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h> #include <CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/point_generators_2.h> #include <CGAL/point_generators_2.h>
typedef CGAL::Hyperbolic_Delaunay_triangulation_traits_2<> Traits; typedef CGAL::Hyperbolic_Delaunay_triangulation_traits_2<> Traits;

View File

@ -1,6 +1,5 @@
#include <CGAL/Hyperbolic_Delaunay_triangulation_2.h> #include <CGAL/Hyperbolic_Delaunay_triangulation_2.h>
#include <CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h> #include <CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/point_generators_2.h> #include <CGAL/point_generators_2.h>
typedef CGAL::Hyperbolic_Delaunay_triangulation_traits_2<> Traits; typedef CGAL::Hyperbolic_Delaunay_triangulation_traits_2<> Traits;

View File

@ -1,6 +1,5 @@
#include <CGAL/Hyperbolic_Delaunay_triangulation_2.h> #include <CGAL/Hyperbolic_Delaunay_triangulation_2.h>
#include <CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h> #include <CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/point_generators_2.h> #include <CGAL/point_generators_2.h>
typedef CGAL::Hyperbolic_Delaunay_triangulation_traits_2<> Traits; typedef CGAL::Hyperbolic_Delaunay_triangulation_traits_2<> Traits;