Fixed P2DT2 traits class in P2T2/tests

This commit is contained in:
Mael Rouxel-Labbé 2017-08-24 15:53:09 +02:00
parent b36154cb7c
commit 4c969d6127
2 changed files with 7 additions and 7 deletions

View File

@ -14,7 +14,6 @@ int main()
#else #else
#include "./types.h" #include "./types.h"
#include <CGAL/Delaunay_triangulation_2.h>
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
@ -82,13 +81,13 @@ bool test(const char *filename) {
{ {
// if (true) { // if (true) {
// if (pre_run) { // if (pre_run) {
// Delaunay_triangulation_2<Gt> t; // Delaunay_triangulation_2<P2DTT> t;
// test(pts, t); // test(pts, t);
// } // }
// std::clock_t total_start = std::clock(); // std::clock_t total_start = std::clock();
// for (int i=0; i<n_runs; ++i) { // for (int i=0; i<n_runs; ++i) {
// Delaunay_triangulation_2<Gt> t; // Delaunay_triangulation_2<P2DTT> t;
// test(pts, t); // test(pts, t);
// } // }
// double total_time = (std::clock()-total_start)/(double)CLOCKS_PER_SEC; // double total_time = (std::clock()-total_start)/(double)CLOCKS_PER_SEC;
@ -120,7 +119,7 @@ bool test(const char *filename) {
int main(int argc, char * argv[]) int main(int argc, char * argv[])
{ {
typedef Periodic_2_Delaunay_triangulation_2<Gt> T; typedef Periodic_2_Delaunay_triangulation_2<P2DTT> T;
srand(42); srand(42);
int result = 0; int result = 0;

View File

@ -17,7 +17,7 @@ int main()
#include <CGAL/Triangulation_2.h> #include <CGAL/Triangulation_2.h>
#include <ctime> #include <ctime>
typedef Triangulation_2<Gt> EuclideanTriangulation; typedef Triangulation_2<P2TT> EuclideanTriangulation;
const int N_RUNS = 2; const int N_RUNS = 2;
const int N_PTS = 50000; const int N_PTS = 50000;
@ -50,8 +50,9 @@ int main()
pts.resize(500000); pts.resize(500000);
for (size_t i = 0; i < pts.size(); ++i) pts[i] = *(++g) + midpoint; for (size_t i = 0; i < pts.size(); ++i) pts[i] = *(++g) + midpoint;
Gt gt; P2TT gt;
for (size_t i = 0; i < pts.size() - 2; ++i) gt.orientation_2_object()(pts[i], pts[i + 1], pts[i + 2]); for (size_t i = 0; i < pts.size() - 2; ++i)
gt.orientation_2_object()(pts[i], pts[i + 1], pts[i + 2]);
return 0; return 0;
#endif #endif