Fixed weighted Alpha_shapes_3 TDS construction

When weighted, Alpha_cell_base_3 must use Regular_triangulation_cell_base_3
as base
This commit is contained in:
Mael Rouxel-Labbé 2017-04-25 10:36:44 +02:00
parent d7cd4e2955
commit 7a7ac15f42
5 changed files with 55 additions and 52 deletions

View File

@ -8,10 +8,12 @@
typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Regular_triangulation_vertex_base_3<K> Vbb; typedef CGAL::Regular_triangulation_vertex_base_3<K> Vbb;
typedef CGAL::Fixed_alpha_shape_vertex_base_3<K,Vbb> Vb; typedef CGAL::Fixed_alpha_shape_vertex_base_3<K,Vbb> Vb;
typedef CGAL::Fixed_alpha_shape_cell_base_3<K> Fb;
typedef CGAL::Triangulation_data_structure_3<Vb,Fb> Tds; typedef CGAL::Regular_triangulation_cell_base_3<K> Rcb;
typedef CGAL::Fixed_alpha_shape_cell_base_3<K,Rcb> Cb;
typedef CGAL::Triangulation_data_structure_3<Vb,Cb> Tds;
typedef CGAL::Regular_triangulation_3<K,Tds> Triangulation_3; typedef CGAL::Regular_triangulation_3<K,Tds> Triangulation_3;
typedef CGAL::Fixed_alpha_shape_3<Triangulation_3> Fixed_alpha_shape_3; typedef CGAL::Fixed_alpha_shape_3<Triangulation_3> Fixed_alpha_shape_3;

View File

@ -5,11 +5,13 @@
typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Regular_triangulation_vertex_base_3<K> Vbb; typedef CGAL::Regular_triangulation_vertex_base_3<K> Rvb;
typedef CGAL::Alpha_shape_vertex_base_3<K,Rvb> Vb;
typedef CGAL::Alpha_shape_vertex_base_3<K,Vbb> Vb; typedef CGAL::Regular_triangulation_cell_base_3<K> Rcb;
typedef CGAL::Alpha_shape_cell_base_3<K> Fb; typedef CGAL::Alpha_shape_cell_base_3<K,Rcb> Cb;
typedef CGAL::Triangulation_data_structure_3<Vb,Fb> Tds;
typedef CGAL::Triangulation_data_structure_3<Vb,Cb> Tds;
typedef CGAL::Regular_triangulation_3<K,Tds> Triangulation_3; typedef CGAL::Regular_triangulation_3<K,Tds> Triangulation_3;
typedef CGAL::Alpha_shape_3<Triangulation_3> Alpha_shape_3; typedef CGAL::Alpha_shape_3<Triangulation_3> Alpha_shape_3;

View File

@ -13,37 +13,35 @@
#include <CGAL/Alpha_shape_cell_base_3.h> #include <CGAL/Alpha_shape_cell_base_3.h>
#include <CGAL/Alpha_shape_vertex_base_3.h> #include <CGAL/Alpha_shape_vertex_base_3.h>
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef CGAL::Exact_predicates_inexact_constructions_kernel EPICK;
typedef Kernel EPIC_traits; typedef CGAL::Exact_predicates_exact_constructions_kernel EPECK;
typedef Kernel::Weighted_point_3 Weighted_point; typedef CGAL::Regular_triangulation_vertex_base_3<EPICK> Rvb;
typedef CGAL::Regular_triangulation_vertex_base_3<Kernel> Vbb; typedef CGAL::Fixed_alpha_shape_vertex_base_3<EPICK,Rvb> WFixed_Vb;
typedef CGAL::Fixed_alpha_shape_vertex_base_3<Kernel,Vbb> WFixed_Vb; typedef CGAL::Regular_triangulation_cell_base_3<EPICK> Rcb;
typedef CGAL::Fixed_alpha_shape_cell_base_3<EPIC_traits> WFixed_Cb; typedef CGAL::Fixed_alpha_shape_cell_base_3<EPICK,Rcb> WFixed_Cb;
typedef CGAL::Triangulation_data_structure_3<WFixed_Vb,WFixed_Cb> WFixed_TDS; typedef CGAL::Triangulation_data_structure_3<WFixed_Vb,WFixed_Cb> WFixed_TDS;
typedef CGAL::Regular_triangulation_3<EPIC_traits,WFixed_TDS> WFixed_DT; typedef CGAL::Regular_triangulation_3<EPICK,WFixed_TDS> WFixed_DT;
typedef CGAL::Fixed_alpha_shape_3<WFixed_DT> WFixed_AS; typedef CGAL::Fixed_alpha_shape_3<WFixed_DT> WFixed_AS;
typedef CGAL::Alpha_shape_vertex_base_3<EPICK,Rvb> WVb;
typedef CGAL::Alpha_shape_vertex_base_3<EPIC_traits,Vbb> WVb; typedef CGAL::Alpha_shape_cell_base_3<EPICK,Rcb> WCb;
typedef CGAL::Alpha_shape_cell_base_3<EPIC_traits> WCb;
typedef CGAL::Triangulation_data_structure_3<WVb,WCb> WTDS; typedef CGAL::Triangulation_data_structure_3<WVb,WCb> WTDS;
typedef CGAL::Regular_triangulation_3<EPIC_traits,WTDS> WDT; typedef CGAL::Regular_triangulation_3<EPICK,WTDS> WDT;
typedef CGAL::Alpha_shape_3< WDT > WAS; typedef CGAL::Alpha_shape_3< WDT > WAS;
typedef CGAL::Alpha_shape_vertex_base_3<EPIC_traits,Vbb,CGAL::Tag_true,CGAL::Tag_true> WVb_f; typedef CGAL::Alpha_shape_vertex_base_3<EPICK,Rvb,CGAL::Tag_true,CGAL::Tag_true> WVb_f;
typedef CGAL::Alpha_shape_cell_base_3<EPIC_traits,CGAL::Default,CGAL::Tag_true,CGAL::Tag_true> WCb_f; typedef CGAL::Alpha_shape_cell_base_3<EPICK,Rcb,CGAL::Tag_true,CGAL::Tag_true> WCb_f;
typedef CGAL::Triangulation_data_structure_3<WVb_f,WCb_f> WTDS_f; typedef CGAL::Triangulation_data_structure_3<WVb_f,WCb_f> WTDS_f;
typedef CGAL::Regular_triangulation_3<EPIC_traits,WTDS_f> WDT_f; typedef CGAL::Regular_triangulation_3<EPICK,WTDS_f> WDT_f;
typedef CGAL::Alpha_shape_3< WDT_f,CGAL::Tag_true > WAS_f; typedef CGAL::Alpha_shape_3< WDT_f,CGAL::Tag_true > WAS_f;
typedef CGAL::Exact_predicates_exact_constructions_kernel EKernel; typedef CGAL::Regular_triangulation_vertex_base_3<EPECK> ERvb;
typedef CGAL::Regular_triangulation_vertex_base_3<EKernel> EVbb; typedef CGAL::Alpha_shape_vertex_base_3<EPECK,ERvb> EVb;
typedef EKernel EPEC_traits; typedef CGAL::Regular_triangulation_cell_base_3<EPECK> ERcb;
typedef CGAL::Alpha_shape_vertex_base_3<EPEC_traits,EVbb> EVb; typedef CGAL::Alpha_shape_cell_base_3<EPECK,ERcb> ECb;
typedef CGAL::Alpha_shape_cell_base_3<EPEC_traits> ECb;
typedef CGAL::Triangulation_data_structure_3<EVb,ECb> ETDS; typedef CGAL::Triangulation_data_structure_3<EVb,ECb> ETDS;
typedef CGAL::Regular_triangulation_3<EPEC_traits,ETDS> EDT; typedef CGAL::Regular_triangulation_3<EPECK,ETDS> EDT;
typedef CGAL::Alpha_shape_3< EDT > EAS; typedef CGAL::Alpha_shape_3< EDT > EAS;
template <class Object> template <class Object>
@ -64,7 +62,7 @@ void fill_wp_lists(const char* file_path,std::list<Object>& Ls,double rw=0){
void make_one_run(const char* filename){ void make_one_run(const char* filename){
std::cout << "== testing with " << filename << " ==\n"; std::cout << "== testing with " << filename << " ==\n";
//read weighted points //read weighted points
std::list<Weighted_point > lst; std::list<EPICK::Weighted_point_3> lst;
fill_wp_lists(filename,lst,1.4); fill_wp_lists(filename,lst,1.4);
CGAL::Timer time; CGAL::Timer time;
@ -112,7 +110,7 @@ void make_one_run(const char* filename){
time.reset(); time.reset();
std::list<EPEC_traits::Weighted_point_3 > elst; std::list<EPECK::Weighted_point_3> elst;
fill_wp_lists(filename,elst,1.4); fill_wp_lists(filename,elst,1.4);
//recreate the triangulation //recreate the triangulation
time.start(); time.start();

View File

@ -29,20 +29,21 @@
typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Regular_triangulation_vertex_base_3<K> Vbb; typedef CGAL::Regular_triangulation_vertex_base_3<K> Rvb;
typedef K::Weighted_point_3 Weighted_point; typedef CGAL::Alpha_shape_vertex_base_3<K,Rvb> Vb;
typedef CGAL::Alpha_shape_vertex_base_3<K,Vbb> Vb; typedef CGAL::Regular_triangulation_cell_base_3<K> Rcb;
typedef CGAL::Alpha_shape_cell_base_3<K> Fb; typedef CGAL::Alpha_shape_cell_base_3<K,Rcb> Cb;
typedef CGAL::Triangulation_data_structure_3<Vb,Fb> Tds; typedef CGAL::Triangulation_data_structure_3<Vb,Cb> Tds;
typedef CGAL::Regular_triangulation_3<K,Tds> Triangulation_3; typedef CGAL::Regular_triangulation_3<K,Tds> Triangulation_3;
typedef CGAL::Alpha_shape_3<Triangulation_3> Alpha_shape_3; typedef CGAL::Alpha_shape_3<Triangulation_3> Alpha_shape_3;
typedef K::Weighted_point_3 Weighted_point;
//using exact filtered traits //using exact filtered traits
typedef CGAL::Alpha_shape_vertex_base_3<K,Vbb,CGAL::Tag_true,CGAL::Tag_true> EF_Vb; typedef CGAL::Alpha_shape_vertex_base_3<K,Rvb,CGAL::Tag_true,CGAL::Tag_true> EF_Vb;
typedef CGAL::Alpha_shape_cell_base_3<K,CGAL::Default,CGAL::Tag_true,CGAL::Tag_true> EF_Fb; typedef CGAL::Alpha_shape_cell_base_3<K,Rcb,CGAL::Tag_true,CGAL::Tag_true> EF_Cb;
typedef CGAL::Triangulation_data_structure_3<EF_Vb,EF_Fb> EF_Tds; typedef CGAL::Triangulation_data_structure_3<EF_Vb,EF_Cb> EF_Tds;
typedef CGAL::Regular_triangulation_3<K,EF_Tds> EF_Triangulation_3; typedef CGAL::Regular_triangulation_3<K,EF_Tds> EF_Triangulation_3;
typedef CGAL::Alpha_shape_3<EF_Triangulation_3,CGAL::Tag_true> EF_Alpha_shape_3; typedef CGAL::Alpha_shape_3<EF_Triangulation_3,CGAL::Tag_true> EF_Alpha_shape_3;