diff --git a/Triangulation/doc/Triangulation/CGAL/Triangulation.h b/Triangulation/doc/Triangulation/CGAL/Triangulation.h index 33df14d0200..9cdd73e167c 100644 --- a/Triangulation/doc/Triangulation/CGAL/Triangulation.h +++ b/Triangulation/doc/Triangulation/CGAL/Triangulation.h @@ -454,7 +454,7 @@ p_1, p_2, \ldots, p_d, \infty\}\f$ is returned such that the full cell \f$ (p_1, on the other side of facet \f$ (p_1, p_2, \ldots, p_d)\f$). */ Full_cell_handle locate(const Point & query, - Full_cell_handle hint = Full_cell_handle()) const; + Full_cell_const_handle hint = Full_cell_handle()) const; /*! Same as above but `hint` is a vertex and not a full cell. diff --git a/Triangulation/include/CGAL/Triangulation.h b/Triangulation/include/CGAL/Triangulation.h index d88a5608ede..49170a62380 100644 --- a/Triangulation/include/CGAL/Triangulation.h +++ b/Triangulation/include/CGAL/Triangulation.h @@ -139,20 +139,20 @@ public: typedef Maximal_dimension_ Maximal_dimension; typedef typename Geom_traits::Point_d Point; - typedef typename TDS::Vertex_handle Vertex_handle; - typedef typename TDS::Vertex_iterator Vertex_iterator; - typedef typename TDS::Vertex_const_handle Vertex_const_handle; - typedef typename TDS::Vertex_const_iterator Vertex_const_iterator; + typedef typename TDS::Vertex_handle Vertex_handle; + typedef typename TDS::Vertex_iterator Vertex_iterator; + typedef typename TDS::Vertex_const_handle Vertex_const_handle; + typedef typename TDS::Vertex_const_iterator Vertex_const_iterator; - typedef typename TDS::Full_cell_handle Full_cell_handle; - typedef typename TDS::Full_cell_iterator Full_cell_iterator; - typedef typename TDS::Full_cell_const_handle Full_cell_const_handle; - typedef typename TDS::Full_cell_const_iterator Full_cell_const_iterator; + typedef typename TDS::Full_cell_handle Full_cell_handle; + typedef typename TDS::Full_cell_iterator Full_cell_iterator; + typedef typename TDS::Full_cell_const_handle Full_cell_const_handle; + typedef typename TDS::Full_cell_const_iterator Full_cell_const_iterator; - typedef typename TDS::Facet_iterator Facet_iterator; + typedef typename TDS::Facet_iterator Facet_iterator; - typedef typename TDS::size_type size_type; - typedef typename TDS::difference_type difference_type; + typedef typename TDS::size_type size_type; + typedef typename TDS::difference_type difference_type; /// The type of location a new point is found lying on enum Locate_type @@ -182,18 +182,18 @@ public: protected: // DATA MEMBERS - Triangulation_ds tds_; - const Geom_traits kernel_; - Vertex_handle infinity_; - mutable std::vector orientations_; + Triangulation_ds tds_; + const Geom_traits kernel_; + Vertex_handle infinity_; + mutable std::vector orientations_; mutable boost::optional flat_orientation_; // The user can specify a Flat_orientation_d object to be used for // orienting simplices of a specific dimension // (= preset_flat_orientation_.first) // preset_flat_orientation_.first = numeric_limits::max() otherwise) - std::pair preset_flat_orientation_; + std::pair preset_flat_orientation_; // for stochastic walk in the locate() function: - mutable Random rng_; + mutable Random rng_; #ifdef CGAL_TRIANGULATION_STATISTICS mutable unsigned long walk_size_; #endif diff --git a/Triangulation/include/CGAL/Triangulation_data_structure.h b/Triangulation/include/CGAL/Triangulation_data_structure.h index 915f93b9775..fe175e43a29 100644 --- a/Triangulation/include/CGAL/Triangulation_data_structure.h +++ b/Triangulation/include/CGAL/Triangulation_data_structure.h @@ -154,13 +154,13 @@ private: template < class Dim_tag > struct get_maximal_dimension { - static int value(const int D) { return D; } + static int value(int D) { return D; } }; // specialization template < int D > struct get_maximal_dimension > { - static int value(const int) { return D; } + static int value(int) { return D; } }; public: @@ -208,7 +208,7 @@ public: protected: - bool check_range(const int i) const + bool check_range(int i) const { if( current_dimension() < 0 ) { @@ -242,19 +242,19 @@ public: Full_cell_container & full_cells() { return full_cells_; } const Full_cell_container & full_cells() const { return full_cells_; } - Vertex_handle vertex(const Full_cell_handle s, const int i) const /* Concept */ + Vertex_handle vertex(Full_cell_handle s, int i) const /* Concept */ { CGAL_precondition(s != Full_cell_handle() && check_range(i)); return s->vertex(i); } - Vertex_const_handle vertex(const Full_cell_const_handle s, const int i) const /* Concept */ + Vertex_const_handle vertex(Full_cell_const_handle s, int i) const /* Concept */ { CGAL_precondition(s != Full_cell_handle() && check_range(i)); return s->vertex(i); } - bool is_vertex(const Vertex_const_handle & v) const /* Concept */ + bool is_vertex(Vertex_const_handle v) const /* Concept */ { if( Vertex_const_handle() == v ) return false; @@ -264,7 +264,7 @@ public: return v == vit; } - bool is_full_cell(const Full_cell_const_handle & s) const /* Concept */ + bool is_full_cell(Full_cell_const_handle s) const /* Concept */ { if( Full_cell_const_handle() == s ) return false; @@ -274,43 +274,43 @@ public: return s == sit; } - Full_cell_handle full_cell(const Vertex_handle v) const /* Concept */ + Full_cell_handle full_cell(Vertex_handle v) const /* Concept */ { CGAL_precondition(v != Vertex_handle()); return v->full_cell(); } - Full_cell_const_handle full_cell(const Vertex_const_handle v) const /* Concept */ + Full_cell_const_handle full_cell(Vertex_const_handle v) const /* Concept */ { CGAL_precondition(Vertex_const_handle() != v); return v->full_cell(); } - Full_cell_handle neighbor(const Full_cell_handle s, const int i) const /* Concept */ + Full_cell_handle neighbor(Full_cell_handle s, int i) const /* Concept */ { CGAL_precondition(Full_cell_handle() != s && check_range(i)); return s->neighbor(i); } - Full_cell_const_handle neighbor(const Full_cell_const_handle s, const int i) const/* Concept */ + Full_cell_const_handle neighbor(Full_cell_const_handle s, int i) const/* Concept */ { CGAL_precondition(Full_cell_const_handle() != s && check_range(i)); return s->neighbor(i); } - int mirror_index(const Full_cell_handle s, const int i) const /* Concept */ + int mirror_index(Full_cell_handle s, int i) const /* Concept */ { CGAL_precondition(Full_cell_handle() != s && check_range(i)); return s->mirror_index(i); } - int mirror_index(const Full_cell_const_handle s, const int i) const + int mirror_index(Full_cell_const_handle s, int i) const { CGAL_precondition(Full_cell_const_handle() != s && check_range(i)); /* Concept */ return s->mirror_index(i); } - int mirror_vertex(const Full_cell_handle s, const int i) const /* Concept */ + int mirror_vertex(Full_cell_handle s, int i) const /* Concept */ { CGAL_precondition(Full_cell_handle() != s && check_range(i)); return s->mirror_vertex(i); @@ -365,7 +365,7 @@ public: // NICE UPDATE OPERATIONS protected: - void do_insert_increase_dimension(const Vertex_handle, const Vertex_handle); + void do_insert_increase_dimension(Vertex_handle, Vertex_handle); public: // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - REMOVALS @@ -378,9 +378,9 @@ public: Vertex_handle insert_in_face(const Face &); /* Concept */ Vertex_handle insert_in_facet(const Facet &); /* Concept */ template< typename Forward_iterator > - Vertex_handle insert_in_hole(Forward_iterator, const Forward_iterator, Facet); /* Concept */ + Vertex_handle insert_in_hole(Forward_iterator, Forward_iterator, Facet); /* Concept */ template< typename Forward_iterator, typename OutputIterator > - Vertex_handle insert_in_hole(Forward_iterator, const Forward_iterator, Facet, OutputIterator); /* Concept */ + Vertex_handle insert_in_hole(Forward_iterator, Forward_iterator, Facet, OutputIterator); /* Concept */ template< typename OutputIterator > Full_cell_handle insert_in_tagged_hole(Vertex_handle, Facet, OutputIterator); @@ -445,13 +445,13 @@ public: dcur_ = -2; } - void set_current_dimension(const int d) /* Concept */ + void set_current_dimension(int d) /* Concept */ { CGAL_precondition(-2<=d && d<=maximal_dimension()); dcur_ = d; } - Full_cell_handle new_full_cell(const Full_cell_handle s) + Full_cell_handle new_full_cell(Full_cell_handle s) { return full_cells_.emplace(*s); } @@ -493,7 +493,7 @@ public: vertices_.erase(v); } - void associate_vertex_with_full_cell(Full_cell_handle s, const int i, Vertex_handle v) /* Concept */ + void associate_vertex_with_full_cell(Full_cell_handle s, int i, Vertex_handle v) /* Concept */ { CGAL_precondition(check_range(i)); CGAL_precondition(s != Full_cell_handle()); @@ -553,7 +553,7 @@ public: const Triangulation_data_structure & tds_; public: Incident_full_cell_traversal_predicate(const Triangulation_data_structure & tds, - const Face & f) + const Face & f) : f_(f), tds_(tds) { dim_ = f.face_dimension(); @@ -578,7 +578,7 @@ public: const Triangulation_data_structure & tds_; public: Star_traversal_predicate(const Triangulation_data_structure & tds, - const Face & f) + const Face & f) : f_(f), tds_(tds) { dim_ = f.face_dimension(); @@ -606,27 +606,27 @@ public: OutputIterator star(const Face &, OutputIterator) const; /* Concept */ #ifndef CGAL_CFG_NO_CPP0X_DEFAULT_TEMPLATE_ARGUMENTS_FOR_FUNCTION_TEMPLATES template< typename OutputIterator, typename Comparator = std::less > - OutputIterator incident_upper_faces(Vertex_const_handle v, const int dim, OutputIterator out, Comparator cmp = Comparator()) + OutputIterator incident_upper_faces(Vertex_const_handle v, int dim, OutputIterator out, Comparator cmp = Comparator()) { return incident_faces(v, dim, out, cmp, true); } template< typename OutputIterator, typename Comparator = std::less > - OutputIterator incident_faces(Vertex_const_handle, const int, OutputIterator, Comparator = Comparator(), bool = false) const; + OutputIterator incident_faces(Vertex_const_handle, int, OutputIterator, Comparator = Comparator(), bool = false) const; #else template< typename OutputIterator, typename Comparator > - OutputIterator incident_upper_faces(Vertex_const_handle v, const int dim, OutputIterator out, Comparator cmp = Comparator()) + OutputIterator incident_upper_faces(Vertex_const_handle v, int dim, OutputIterator out, Comparator cmp = Comparator()) { return incident_faces(v, dim, out, cmp, true); } template< typename OutputIterator > - OutputIterator incident_upper_faces(Vertex_const_handle v, const int dim, OutputIterator out) + OutputIterator incident_upper_faces(Vertex_const_handle v, int dim, OutputIterator out) { return incident_faces(v, dim, out, std::less(), true); } template< typename OutputIterator, typename Comparator > - OutputIterator incident_faces(Vertex_const_handle, const int, OutputIterator, Comparator = Comparator(), bool = false) const; + OutputIterator incident_faces(Vertex_const_handle, int, OutputIterator, Comparator = Comparator(), bool = false) const; template< typename OutputIterator > - OutputIterator incident_faces(Vertex_const_handle, const int, OutputIterator, + OutputIterator incident_faces(Vertex_const_handle, int, OutputIterator, std::less = std::less(), bool = false) const; #endif @@ -722,7 +722,7 @@ template< class Dim, class Vb, class Fcb > template< typename OutputIterator > OutputIterator Triangulation_data_structure -::incident_faces(Vertex_const_handle v, const int dim, OutputIterator out, +::incident_faces(Vertex_const_handle v, int dim, OutputIterator out, std::less cmp, bool upper_faces) const { return incident_faces >(v, dim, out, cmp, upper_faces); @@ -733,7 +733,7 @@ template< class Dim, class Vb, class Fcb > template< typename OutputIterator, typename Comparator > OutputIterator Triangulation_data_structure -::incident_faces(Vertex_const_handle v, const int dim, OutputIterator out, Comparator cmp, bool upper_faces) const +::incident_faces(Vertex_const_handle v, int dim, OutputIterator out, Comparator cmp, bool upper_faces) const { CGAL_precondition( 0 < dim ); if( dim >= current_dimension() ) @@ -966,10 +966,10 @@ Triangulation_data_structure CGAL_assertion_msg(is_boundary_facet(f), "starting facet should be on the hole boundary"); const int cur_dim = current_dimension(); - Full_cell_handle new_s; + Full_cell_handle new_s; - std::queue task_queue; - task_queue.push( + std::queue task_queue; + task_queue.push( IITH_task(f, mirror_index(full_cell(f), index_of_covertex(f))) ); while (!task_queue.empty()) @@ -1115,7 +1115,7 @@ Triangulation_data_structure template void Triangulation_data_structure -::do_insert_increase_dimension(const Vertex_handle x, const Vertex_handle star) +::do_insert_increase_dimension(Vertex_handle x, Vertex_handle star) { Full_cell_handle start = full_cells_begin(); Full_cell_handle swap_me;