mirror of https://github.com/CGAL/cgal
Changes to replace Cartesian<Expr> with EPICK_with_sqrt, plus code cleanup, plus documentation fixes (for P4HT2)
This commit is contained in:
parent
9792b241dd
commit
3265e67da1
|
|
@ -1,7 +1,7 @@
|
|||
#include <CGAL/CORE_Expr.h>
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_2.h>
|
||||
#include <CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_traits_2.h>
|
||||
#include <CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h>
|
||||
#include <CGAL/Hyperbolic_octagon_translation.h>
|
||||
#include <CGAL/Delaunay_triangulation_2.h>
|
||||
#include <CGAL/Periodic_2_Delaunay_triangulation_traits_2.h>
|
||||
|
|
@ -15,21 +15,20 @@
|
|||
#include <boost/random/uniform_smallint.hpp>
|
||||
#include <boost/random/variate_generator.hpp>
|
||||
|
||||
typedef CORE::Expr NT;
|
||||
typedef CGAL::Cartesian<NT> Kernel;
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_traits_2<Kernel,
|
||||
CGAL::Hyperbolic_octagon_translation> Traits;
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_traits_2<> Traits;
|
||||
typedef Traits::FT NT;
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_2<Traits> Triangulation;
|
||||
typedef CGAL::Hyperbolic_octagon_translation_matrix<NT> Octagon_matrix;
|
||||
typedef Kernel::Point_2 Point;
|
||||
typedef Triangulation::Point Point;
|
||||
typedef Triangulation::Vertex_handle Vertex_handle;
|
||||
typedef Traits::Side_of_original_octagon Side_of_original_octagon;
|
||||
|
||||
typedef CGAL::Cartesian<double>::Point_2 Point_double;
|
||||
typedef CGAL::Creator_uniform_2<double, Point_double > Creator;
|
||||
|
||||
typedef CGAL::Delaunay_triangulation_2<Kernel> Euclidean_triangulation;
|
||||
typedef CGAL::Periodic_2_Delaunay_triangulation_traits_2<Kernel> Ptraits;
|
||||
typedef CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt EKernel;
|
||||
typedef CGAL::Delaunay_triangulation_2<EKernel> Euclidean_triangulation;
|
||||
typedef CGAL::Periodic_2_Delaunay_triangulation_traits_2<EKernel> Ptraits;
|
||||
typedef CGAL::Periodic_2_Delaunay_triangulation_2<Ptraits> PEuclidean_triangulation;
|
||||
|
||||
typedef double dNT;
|
||||
|
|
|
|||
|
|
@ -17,14 +17,11 @@
|
|||
#include <boost/random/uniform_smallint.hpp>
|
||||
#include <boost/random/variate_generator.hpp>
|
||||
|
||||
typedef CORE::Expr NT;
|
||||
typedef CGAL::Cartesian<NT> Kernel;
|
||||
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_traits_2<Kernel,
|
||||
CGAL::Hyperbolic_octagon_translation> Traits;
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_traits_2<> Traits;
|
||||
typedef Traits::FT NT;
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_2<Traits> Triangulation;
|
||||
typedef CGAL::Hyperbolic_octagon_translation_matrix<NT> Octagon_matrix;
|
||||
typedef Kernel::Point_2 Point;
|
||||
typedef Triangulation::Point Point;
|
||||
typedef Triangulation::Vertex_handle Vertex_handle;
|
||||
typedef Traits::Side_of_original_octagon Side_of_original_octagon;
|
||||
typedef Triangulation::Face_iterator Face_iterator;
|
||||
|
|
@ -45,16 +42,20 @@ double time_remove_dp(0);
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int N, iters;
|
||||
if(argc < 2)
|
||||
{
|
||||
std::cout << "usage: " << argv[0] << " [number_of_points_to_insert] [optional: number_of_iterations]" << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
int N = atoi(argv[1]);
|
||||
int iters = 1;
|
||||
if(argc == 3)
|
||||
std::cout << "Defaulting to 100k points, 10 iterations..." << std::endl;
|
||||
iters = 10;
|
||||
N = 100000;
|
||||
} else {
|
||||
N = atoi(argv[1]);
|
||||
if (argc < 3)
|
||||
iters = 10;
|
||||
else
|
||||
iters = atoi(argv[2]);
|
||||
}
|
||||
|
||||
Side_of_original_octagon pred;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
#include <CGAL/CORE_Expr.h>
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/point_generators_2.h>
|
||||
#include <CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_2.h>
|
||||
|
|
@ -13,10 +12,7 @@
|
|||
|
||||
#include <iostream>
|
||||
|
||||
typedef CORE::Expr NT;
|
||||
typedef CGAL::Cartesian<NT> Kernel;
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_traits_2<Kernel,
|
||||
CGAL::Hyperbolic_octagon_translation> Traits;
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_traits_2<> Traits;
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_2<Traits> Triangulation;
|
||||
typedef Triangulation::Face_iterator Face_iterator;
|
||||
typedef Triangulation::Vertex_handle Vertex_handle;
|
||||
|
|
@ -27,13 +23,16 @@ typedef CGAL::Creator_uniform_2<double, Point_double >
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int iter;
|
||||
if(argc < 2)
|
||||
{
|
||||
std::cout << "usage: " << argv[0] << " [number_of_iterations]" << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
std::cout << "defaulting to 10 iterations..." << std::endl;
|
||||
iter = 10;
|
||||
} else {
|
||||
iter = atoi(argv[1]);
|
||||
}
|
||||
|
||||
int iter = atoi(argv[1]);
|
||||
Side_of_original_octagon pred;
|
||||
|
||||
int N = 500;
|
||||
|
|
|
|||
|
|
@ -27,9 +27,6 @@
|
|||
#include <internal/Qt/TriangulationConflictZone.h>
|
||||
#include <internal/Qt/TriangulationPointInput.h>
|
||||
|
||||
#include <CGAL/CORE_Expr.h>
|
||||
#include <CGAL/Cartesian.h>
|
||||
|
||||
#include <CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_traits_2.h>
|
||||
#include <CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_2.h>
|
||||
|
||||
|
|
@ -40,15 +37,10 @@
|
|||
|
||||
#include <CGAL/Timer.h>
|
||||
|
||||
|
||||
//typedef CORE::Expr NT;
|
||||
//typedef CGAL::Cartesian<NT> Kernel;
|
||||
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_traits_2<> Traits;
|
||||
typedef Traits::Segment_2 Segment_2;
|
||||
typedef Traits::Circle_2 Circle_2;
|
||||
typedef Traits::Circular_arc_2 Circular_arc_2;
|
||||
//typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_2<Traits> Triangulation;
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_2<> Triangulation;
|
||||
typedef Triangulation::Point Point;
|
||||
typedef Triangulation::Vertex_handle Vertex_handle;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@
|
|||
#include <QEvent>
|
||||
#include <QPen>
|
||||
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/Qt/GraphicsViewInput.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ the default traits class for the class `Periodic_4_hyperbolic_Delaunay_triangula
|
|||
|
||||
\sa `Periodic_4_hyperbolic_Delaunay_triangulation_2`
|
||||
*/
|
||||
template< class Kernel = CGAL::Cartesian<CORE::Expr> >
|
||||
template< class Kernel = CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt >
|
||||
class Periodic_4_hyperbolic_Delaunay_triangulation_traits_2 :
|
||||
public Hyperbolic_Delaunay_triangulation_traits_2<Kernel>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -278,7 +278,8 @@ package is the class `Periodic_4_hyperbolic_Delaunay_triangulation_traits_2`. Th
|
|||
one template parameter:
|
||||
<ul>
|
||||
<li> A `Kernel` with a field number type `FT` that guarantees exact computations on algebraic numbers
|
||||
with nested square roots. The default value for this parameter is `CGAL::Cartesian<CORE::Expr>`.</li>
|
||||
with nested square roots. The default value for this parameter is
|
||||
`CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt`.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,11 @@
|
|||
#include <CGAL/CORE_Expr.h>
|
||||
#include <CGAL/Cartesian.h>
|
||||
|
||||
#include <CGAL/Hyperbolic_octagon_translation.h>
|
||||
#include <CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_2.h>
|
||||
#include <CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_traits_2.h>
|
||||
|
||||
#include <CGAL/point_generators_2.h>
|
||||
|
||||
typedef CORE::Expr NT;
|
||||
typedef CGAL::Cartesian<NT> Kernel;
|
||||
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_traits_2<Kernel> Traits;
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_traits_2<> Traits;
|
||||
typedef Traits::FT NT;
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_2<Traits> Triangulation;
|
||||
|
||||
typedef Triangulation::Vertex_handle Vertex_handle;
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
#include <CGAL/license/Periodic_4_hyperbolic_triangulation_2.h>
|
||||
|
||||
#include <CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h>
|
||||
#include <CGAL/Hyperbolic_octagon_translation.h>
|
||||
#include <CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h>
|
||||
|
||||
|
|
@ -615,7 +616,7 @@ class Side_of_original_octagon
|
|||
} // end namespace internal
|
||||
|
||||
|
||||
template <typename Kernel = CGAL::Cartesian<CORE::Expr>,
|
||||
template <typename Kernel = Exact_predicates_exact_constructions_kernel_with_sqrt,
|
||||
template<typename> class Translation_type = Hyperbolic_octagon_translation>
|
||||
class Periodic_4_hyperbolic_Delaunay_triangulation_traits_2
|
||||
: public Hyperbolic_Delaunay_triangulation_traits_2<Kernel>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,11 @@
|
|||
#include <CGAL/CORE_Expr.h>
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Hyperbolic_octagon_translation.h>
|
||||
#include <CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_2.h>
|
||||
#include <CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_traits_2.h>
|
||||
|
||||
typedef CORE::Expr NT;
|
||||
typedef CGAL::Cartesian<NT> Kernel;
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_traits_2<Kernel,
|
||||
CGAL::Hyperbolic_octagon_translation> Traits;
|
||||
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_traits_2<> Traits;
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_2<Traits> Triangulation;
|
||||
typedef Kernel::Point_2 Point;
|
||||
typedef Triangulation::Point Point;
|
||||
|
||||
typedef Traits::Construct_hyperbolic_point_2 CP2;
|
||||
typedef Traits::Hyperbolic_translation Trans;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
#include <CGAL/CORE_Expr.h>
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_traits_2.h>
|
||||
#include <CGAL/Hyperbolic_octagon_translation.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
#include <CGAL/CORE_Expr.h>
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_2.h>
|
||||
#include <CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_traits_2.h>
|
||||
|
|
@ -14,10 +13,7 @@
|
|||
|
||||
#include <iostream>
|
||||
|
||||
typedef CORE::Expr NT;
|
||||
typedef CGAL::Cartesian<NT> Kernel;
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_traits_2<Kernel,
|
||||
CGAL::Hyperbolic_octagon_translation> Traits;
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_traits_2<> Traits;
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_2<Traits> Triangulation;
|
||||
typedef Triangulation::Face_handle Face_handle;
|
||||
typedef Triangulation::Vertex_handle Vertex_handle;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
#include <CGAL/CORE_Expr.h>
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/point_generators_2.h>
|
||||
#include <CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_2.h>
|
||||
#include <CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_traits_2.h>
|
||||
#include <CGAL/Hyperbolic_octagon_translation.h>
|
||||
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include <boost/random/linear_congruential.hpp>
|
||||
#include <boost/random/uniform_smallint.hpp>
|
||||
|
|
@ -12,10 +10,7 @@
|
|||
|
||||
#include <iostream>
|
||||
|
||||
typedef CORE::Expr NT;
|
||||
typedef CGAL::Cartesian<NT> Kernel;
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_traits_2<Kernel,
|
||||
CGAL::Hyperbolic_octagon_translation> Traits;
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_traits_2<> Traits;
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_2<Traits> Triangulation;
|
||||
typedef Triangulation::Face_iterator Face_iterator;
|
||||
typedef Triangulation::Vertex_handle Vertex_handle;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
#include <CGAL/CORE_Expr.h>
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/point_generators_2.h>
|
||||
#include <CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_2.h>
|
||||
|
|
@ -12,10 +11,7 @@
|
|||
|
||||
#include <iostream>
|
||||
|
||||
typedef CORE::Expr NT;
|
||||
typedef CGAL::Cartesian<NT> Kernel;
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_traits_2<Kernel,
|
||||
CGAL::Hyperbolic_octagon_translation> Traits;
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_traits_2<> Traits;
|
||||
typedef CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_2<Traits> Triangulation;
|
||||
typedef Triangulation::Face_iterator Face_iterator;
|
||||
typedef Triangulation::Vertex_handle Vertex_handle;
|
||||
|
|
|
|||
Loading…
Reference in New Issue