From 284142f645e728eb9ed7eb793bcf330d3582865e Mon Sep 17 00:00:00 2001 From: Olivier Devillers Date: Fri, 6 Jul 2012 14:13:18 +0000 Subject: [PATCH] ambient vs max dim, (code first step) --- Triangulation/TODO | 1 + .../examples/Triangulation/delaunay.cpp | 2 +- .../triangulation_data_structure_dynamic.cpp | 2 +- .../triangulation_data_structure_static.cpp | 2 +- Triangulation/include/CGAL/Convex_hull.h | 6 +-- .../include/CGAL/Delaunay_triangulation.h | 24 ++++++------ .../include/CGAL/Regular_triangulation.h | 10 ++--- .../TDS_full_cell_mirror_storage_policy.h | 8 ++-- Triangulation/include/CGAL/Triangulation.h | 38 +++++++++---------- .../CGAL/Triangulation_data_structure.h | 24 ++++++------ .../include/CGAL/Triangulation_ds_full_cell.h | 32 ++++++++-------- .../include/CGAL/Triangulation_face.h | 8 ++-- Triangulation/test/Triangulation/delaunay.cpp | 4 +- Triangulation/test/Triangulation/tds.cpp | 4 +- .../test/Triangulation/triangulation.cpp | 4 +- 15 files changed, 85 insertions(+), 84 deletions(-) diff --git a/Triangulation/TODO b/Triangulation/TODO index f6fa287b5a3..6e7adac899b 100644 --- a/Triangulation/TODO +++ b/Triangulation/TODO @@ -28,6 +28,7 @@ check that the perturbation scheme is independant of the order of insertion Add a template parameter Location_policy ambient dim vs max dim + OD: global replace done, remains to get the dim from the traits (and not from the point of the traits) check all is_valid function, precise in the doc what they are doing. (do sth like 2/3 d) diff --git a/Triangulation/examples/Triangulation/delaunay.cpp b/Triangulation/examples/Triangulation/delaunay.cpp index fbf18cb5f42..9c4803618b6 100644 --- a/Triangulation/examples/Triangulation/delaunay.cpp +++ b/Triangulation/examples/Triangulation/delaunay.cpp @@ -50,7 +50,7 @@ int main(int argc, char **argv) std::cout << " adding "< V(5); diff --git a/Triangulation/examples/Triangulation/triangulation_data_structure_static.cpp b/Triangulation/examples/Triangulation/triangulation_data_structure_static.cpp index 674c9805ca7..d1c9a8110d4 100644 --- a/Triangulation/examples/Triangulation/triangulation_data_structure_static.cpp +++ b/Triangulation/examples/Triangulation/triangulation_data_structure_static.cpp @@ -7,7 +7,7 @@ int main() typedef CGAL::Triangulation_data_structure > TDS; TDS S; - assert( 7 == S.ambient_dimension() ); + assert( 7 == S.maximal_dimension() ); assert( -2 == S.current_dimension() ); assert( S.is_valid() ); diff --git a/Triangulation/include/CGAL/Convex_hull.h b/Triangulation/include/CGAL/Convex_hull.h index d048dc0e2e2..6656d5b535f 100644 --- a/Triangulation/include/CGAL/Convex_hull.h +++ b/Triangulation/include/CGAL/Convex_hull.h @@ -33,10 +33,10 @@ namespace CGAL { template < class CHTraits, class TDS_ = Default > class Convex_hull { - typedef typename Ambient_dimension::type - Ambient_dimension_; + typedef typename Maximal_dimension::type + Maximal_dimension_; typedef typename Default::Get, Triangulation_full_cell > >::type TDS; diff --git a/Triangulation/include/CGAL/Delaunay_triangulation.h b/Triangulation/include/CGAL/Delaunay_triangulation.h index 93d1138a390..41ea7d23e5f 100644 --- a/Triangulation/include/CGAL/Delaunay_triangulation.h +++ b/Triangulation/include/CGAL/Delaunay_triangulation.h @@ -36,9 +36,9 @@ class Delaunay_triangulation >::type > { typedef typename Ambient_dimension::type - Ambient_dimension_; + Maximal_dimension_; typedef typename Default::Get<_TDS, Triangulation_data_structure< - Ambient_dimension_, + Maximal_dimension_, Triangulation_vertex, Triangulation_full_cell > >::type TDS; @@ -63,7 +63,7 @@ public: // PUBLIC NESTED TYPES typedef typename Base::Facet Facet; typedef typename Base::Face Face; - typedef typename Base::Ambient_dimension Ambient_dimension; + typedef typename Base::Maximal_dimension Maximal_dimension; typedef typename DCTraits::Point_d Point; typedef typename DCTraits::Point_d Point_d; @@ -88,7 +88,7 @@ protected: // DATA MEMBERS public: - using Base::ambient_dimension; + using Base::maximal_dimension; using Base::are_incident_full_cells_valid; using Base::coaffine_orientation_predicate; using Base::current_dimension; @@ -166,7 +166,7 @@ public: Full_cell_handle remove(const Point & p, Full_cell_handle hint = Full_cell_handle()) { Locate_type lt; - Face f(ambient_dimension()); + Face f(maximal_dimension()); Facet ft; Full_cell_handle s = locate(p, lt, f, ft, hint); if( Base::ON_VERTEX == lt ) @@ -205,7 +205,7 @@ public: Vertex_handle insert(const Point & p, const Full_cell_handle start = Full_cell_handle()) { Locate_type lt; - Face f(ambient_dimension()); + Face f(maximal_dimension()); Facet ft; Full_cell_handle s = locate(p, lt, f, ft, start); return insert(p, lt, f, ft, s); @@ -408,13 +408,13 @@ Delaunay_triangulation typedef Triangulation_vertex Dark_vertex_base; typedef Triangulation_full_cell > Dark_full_cell_base; - typedef Triangulation_data_structure Dark_tds; + typedef Triangulation_data_structure Dark_tds; typedef Delaunay_triangulation Dark_triangulation; typedef typename Dark_triangulation::Face Dark_face; typedef typename Dark_triangulation::Facet Dark_facet; typedef typename Dark_triangulation::Vertex_handle Dark_v_handle; typedef typename Dark_triangulation::Full_cell_handle Dark_s_handle; - Dark_triangulation dark_side(ambient_dimension()); + Dark_triangulation dark_side(maximal_dimension()); Dark_s_handle dark_s; Dark_v_handle dark_v; typedef std::map Vertex_map; @@ -499,7 +499,7 @@ Delaunay_triangulation // Now, compute the conflict zone of v->point() in // the dark side. This is precisely the set of full_cells // that we have to glue back into the light side. - Dark_face dark_f(dark_side.ambient_dimension()); + Dark_face dark_f(dark_side.maximal_dimension()); Dark_facet dark_ft; typename Dark_triangulation::Locate_type lt; dark_s = dark_side.locate(v->point(), lt, dark_f, dark_ft); @@ -701,7 +701,7 @@ Delaunay_triangulation { // we don't use Base::insert_outside_affine_hull(...) because here, we // also need to reset the side_of_oriented_subsphere functor. - CGAL_precondition( current_dimension() < ambient_dimension() ); + CGAL_precondition( current_dimension() < maximal_dimension() ); Vertex_handle v = tds().insert_increase_dimension(infinite_vertex()); // reset the predicates: coaffine_orientation_predicate() = geom_traits().coaffine_orientation_d_object(); @@ -798,7 +798,7 @@ Delaunay_triangulation ::is_in_conflict(const Point & p, Full_cell_const_handle s) const { CGAL_precondition( 2 <= current_dimension() ); - if( current_dimension() < ambient_dimension() ) + if( current_dimension() < maximal_dimension() ) { Conflict_pred_in_subspace c(*this, p, coaffine_orientation_predicate(), side_of_oriented_subsphere_predicate()); return c(s); @@ -819,7 +819,7 @@ Delaunay_triangulation ::compute_conflict_zone(const Point & p, const Full_cell_handle s, OutputIterator out) const { CGAL_precondition( 2 <= current_dimension() ); - if( current_dimension() < ambient_dimension() ) + if( current_dimension() < maximal_dimension() ) { Conflict_pred_in_subspace c(*this, p, coaffine_orientation_predicate(), side_of_oriented_subsphere_predicate()); Conflict_traversal_pred_in_subspace tp(*this, c); diff --git a/Triangulation/include/CGAL/Regular_triangulation.h b/Triangulation/include/CGAL/Regular_triangulation.h index afe9ed319fa..2a1a3b49377 100644 --- a/Triangulation/include/CGAL/Regular_triangulation.h +++ b/Triangulation/include/CGAL/Regular_triangulation.h @@ -28,15 +28,15 @@ template< typename RTTraits, typename TDS_ = Default > class Regular_triangulation : public Triangulation::type, + typename Maximal_dimension::type, Triangulation_vertex, Triangulation_full_cell > >::type > { - typedef typename Ambient_dimension::type - Ambient_dimension_; + typedef typename Maximal_dimension::type + Maximal_dimension_; typedef typename Default::Get, Triangulation_full_cell > >::type TDS; @@ -44,7 +44,7 @@ class Regular_triangulation typedef Regular_triangulation Self; public: - typedef Ambient_dimension_ Ambient_dimension; + typedef Maximal_dimension_ Maximal_dimension; }; } //namespace CGAL diff --git a/Triangulation/include/CGAL/TDS_full_cell_mirror_storage_policy.h b/Triangulation/include/CGAL/TDS_full_cell_mirror_storage_policy.h index ea0e977731a..fc4483d1ddd 100644 --- a/Triangulation/include/CGAL/TDS_full_cell_mirror_storage_policy.h +++ b/Triangulation/include/CGAL/TDS_full_cell_mirror_storage_policy.h @@ -26,11 +26,11 @@ namespace CGAL { struct TDS_full_cell_mirror_storage_policy {}; // Stores the mirror index of all vertices. -template< typename Vertex_handle, typename Full_cell_handle, typename Ambient_dimension > -struct TFC_data< Vertex_handle, Full_cell_handle, Ambient_dimension, TDS_full_cell_mirror_storage_policy > -: public TFC_data< Vertex_handle, Full_cell_handle, Ambient_dimension, TDS_full_cell_default_storage_policy > +template< typename Vertex_handle, typename Full_cell_handle, typename Maximal_dimension > +struct TFC_data< Vertex_handle, Full_cell_handle, Maximal_dimension, TDS_full_cell_mirror_storage_policy > +: public TFC_data< Vertex_handle, Full_cell_handle, Maximal_dimension, TDS_full_cell_default_storage_policy > { - typedef TFC_data< Vertex_handle, Full_cell_handle, Ambient_dimension, TDS_full_cell_default_storage_policy > Base; + typedef TFC_data< Vertex_handle, Full_cell_handle, Maximal_dimension, TDS_full_cell_default_storage_policy > Base; typedef typename Base::Vertex_handle_array Vertex_handle_array; typedef typename Base::Full_cell_handle_array Full_cell_handle_array; typedef typename internal::S_or_D_array< int, typename Base::Dimen_plus > Int_array; diff --git a/Triangulation/include/CGAL/Triangulation.h b/Triangulation/include/CGAL/Triangulation.h index 2a6f5d0a895..30ff57a8e94 100644 --- a/Triangulation/include/CGAL/Triangulation.h +++ b/Triangulation/include/CGAL/Triangulation.h @@ -37,9 +37,9 @@ template < class TriangulationTraits, class TDS_ = Default > class Triangulation { typedef typename Ambient_dimension::type - Ambient_dimension_; + Maximal_dimension_; typedef typename Default::Get, Triangulation_full_cell > >::type TDS; @@ -60,7 +60,7 @@ public: typedef typename TDS::Facet Facet; typedef typename TDS::Face Face; - typedef Ambient_dimension_ Ambient_dimension; + typedef Maximal_dimension_ Maximal_dimension; typedef typename Geom_traits::Point_d Point; typedef typename TDS::Vertex_handle Vertex_handle; @@ -171,8 +171,8 @@ public: ++infinity_; ++inf2; } - // A full_cell has at most 1 + ambient_dimension() facets: - orientations_.resize(1 + ambient_dimension()); + // A full_cell has at most 1 + maximal_dimension() facets: + orientations_.resize(1 + maximal_dimension()); // Our coaffine orientation predicates HAS state member variables coaffine_orientation_predicate() = geom_traits().coaffine_orientation_d_object(); } @@ -229,7 +229,7 @@ public: return kernel_; } - int ambient_dimension() const { return tds().ambient_dimension(); } + int maximal_dimension() const { return tds().maximal_dimension(); } int current_dimension() const { return tds().current_dimension(); } bool empty() const @@ -338,7 +338,7 @@ public: bool is_vertex(const Point & p, Vertex_handle & v, Full_cell_handle hint = Full_cell_handle()) const { Locate_type lt; - Face f(ambient_dimension()); + Face f(maximal_dimension()); Facet ft; Full_cell_handle s = locate(p, lt, f, ft, hint); if( ON_VERTEX == lt ) @@ -450,7 +450,7 @@ public: CGAL_assertion( ! is_infinite(s) ); if( 0 == current_dimension() ) return POSITIVE; - if( current_dimension() == ambient_dimension() ) + if( current_dimension() == maximal_dimension() ) { Orientation_d ori = geom_traits().orientation_d_object(); return ori(s->points_begin(), s->points_begin() + 1 + current_dimension()); @@ -467,8 +467,8 @@ public: { tds_.clear(); infinity_ = tds().insert_increase_dimension(); - // A full_cell has at most 1 + ambient_dimension() facets: - orientations_.resize(1 + ambient_dimension()); + // A full_cell has at most 1 + maximal_dimension() facets: + orientations_.resize(1 + maximal_dimension()); // Our coaffine orientation predicates HAS state member variables coaffine_orientation_predicate() = geom_traits().coaffine_orientation_d_object(); #ifdef CGAL_TRIANGULATION_STATISTICS @@ -673,7 +673,7 @@ Triangulation ::insert(const Point & p, Full_cell_handle start) { Locate_type lt; - Face f(ambient_dimension()); + Face f(maximal_dimension()); Facet ft; Full_cell_handle s = locate(p, lt, f, ft, start); return insert(p, lt, f, ft, s); @@ -757,7 +757,7 @@ Triangulation std::vector simps; simps.reserve(64); std::back_insert_iterator > out(simps); - if( current_dimension() < ambient_dimension() ) + if( current_dimension() < maximal_dimension() ) { Outside_convex_hull_traversal_predicate ochtp(*this, p, coaffine_orientation_predicate()); @@ -779,7 +779,7 @@ typename Triangulation::Vertex_handle Triangulation ::insert_outside_affine_hull(const Point & p) { - CGAL_precondition( current_dimension() < ambient_dimension() ); + CGAL_precondition( current_dimension() < maximal_dimension() ); Vertex_handle v = tds().insert_increase_dimension(infinite_vertex()); // reset the orientation predicate: coaffine_orientation_predicate() = geom_traits().coaffine_orientation_d_object(); @@ -848,7 +848,7 @@ Triangulation } // Check if query |p| is outside the affine hull - if( cur_dim < ambient_dimension() ) + if( cur_dim < maximal_dimension() ) { if( ! geom_traits().contained_in_affine_hull_d_object()( s->points_begin(), @@ -979,7 +979,7 @@ Triangulation Full_cell_handle start// starting full_cell for the walk ) const { - if( current_dimension() == ambient_dimension() ) + if( current_dimension() == maximal_dimension() ) { Orientation_d ori = geom_traits().orientation_d_object(); return do_locate(p, loc_type, face, facet, start, ori); @@ -1011,7 +1011,7 @@ Triangulation ::locate(const Point & p, Full_cell_handle s) const { Locate_type lt; - Face face(ambient_dimension()); + Face face(maximal_dimension()); Facet facet; return locate(p, lt, face, facet, s); } @@ -1108,7 +1108,7 @@ template < class TT, class TDS > std::istream & operator>>(std::istream & is, Triangulation & tr) // reads : - // - the dimensions (ambient and current) + // - the dimensions (maximal and current) // - the number of finite vertices // - the non combinatorial information on vertices (point, etc) // - the number of full_cells @@ -1133,7 +1133,7 @@ operator>>(std::istream & is, Triangulation & tr) read(is, n, io_Read_write()); } - CGAL_assertion_msg( cd <= tr.ambient_dimension(), "input Triangulation has too high dimension"); + CGAL_assertion_msg( cd <= tr.maximal_dimension(), "input Triangulation has too high dimension"); tr.clear(); tr.set_current_dimension(cd); @@ -1163,7 +1163,7 @@ template < class TT, class TDS > std::ostream & operator<<(std::ostream & os, const Triangulation & tr) // writes : - // - the dimensions (ambient and current) + // - the dimensions (maximal and current) // - the number of finite vertices // - the non combinatorial information on vertices (point, etc) // - the number of full_cells diff --git a/Triangulation/include/CGAL/Triangulation_data_structure.h b/Triangulation/include/CGAL/Triangulation_data_structure.h index 0800f42025a..6e46b9b62a7 100644 --- a/Triangulation/include/CGAL/Triangulation_data_structure.h +++ b/Triangulation/include/CGAL/Triangulation_data_structure.h @@ -87,7 +87,7 @@ protected: typedef Compact_container Full_cell_container; public: - typedef Dimen Ambient_dimension; + typedef Dimen Maximal_dimension; typedef typename Vertex_container::size_type size_type; /* Concept */ typedef typename Vertex_container::difference_type difference_type; /* Concept */ @@ -135,23 +135,23 @@ private: } template < class Dim_tag > - struct get_ambient_dimension + struct get_maximal_dimension { static int value(const int D) { return D; } }; // specialization template < int D > - struct get_ambient_dimension > + struct get_maximal_dimension > { static int value(const int) { return D; } }; public: Triangulation_data_structure( int dim=0) /* Concept */ - : dmax_(get_ambient_dimension::value(dim)), dcur_(-2), + : dmax_(get_maximal_dimension::value(dim)), dcur_(-2), vertices_(), full_cells_() { - CGAL_assertion_msg(dmax_ > 0, "ambient dimension must be positive."); + CGAL_assertion_msg(dmax_ > 0, "maximal dimension must be positive."); } ~Triangulation_data_structure() @@ -203,7 +203,7 @@ protected: public: /* returns the current dimension of the full cells in the triangulation. */ - int ambient_dimension() const { return dmax_; } /* Concept */ + int maximal_dimension() const { return dmax_; } /* Concept */ int current_dimension() const { return dcur_; } /* Concept */ size_type number_of_vertices() const /* Concept */ @@ -406,7 +406,7 @@ public: void set_current_dimension(const int d) /* Concept */ { - CGAL_precondition(-1<=d && d<=ambient_dimension()); + CGAL_precondition(-1<=d && d<=maximal_dimension()); dcur_ = d; } @@ -881,7 +881,7 @@ Triangulation_data_structure const int cur_dim = current_dimension(); Vertex_handle v = new_vertex(); // the full_cell 'fc' is just used to store the handle to all the new full_cells. - Full_cell fc(ambient_dimension()); + Full_cell fc(maximal_dimension()); for( int i = 1; i <= cur_dim; ++i ) { Full_cell_handle new_s = new_full_cell(s); @@ -1128,7 +1128,7 @@ Triangulation_data_structure ::insert_increase_dimension(Vertex_handle star = Vertex_handle()) /* Concept */ { const int prev_cur_dim = current_dimension(); - CGAL_precondition(prev_cur_dim < ambient_dimension()); + CGAL_precondition(prev_cur_dim < maximal_dimension()); if( -2 != current_dimension() ) { CGAL_precondition( Vertex_handle() != star ); @@ -1460,7 +1460,7 @@ template std::istream & operator>>(std::istream & is, Triangulation_data_structure & tr) // reads : - // - the dimensions (ambient and current) + // - the dimensions (maximal and current) // - the number of finite vertices // - the non combinatorial information on vertices (point, etc) // - the number of full_cells @@ -1485,7 +1485,7 @@ operator>>(std::istream & is, Triangulation_data_structure & tr) read(is, n, io_Read_write()); } - CGAL_assertion_msg( cd <= tr.ambient_dimension(), "input Triangulation_data_structure has too high dimension"); + CGAL_assertion_msg( cd <= tr.maximal_dimension(), "input Triangulation_data_structure has too high dimension"); tr.clear(); tr.set_current_dimension(cd); @@ -1513,7 +1513,7 @@ template std::ostream & operator<<(std::ostream & os, const Triangulation_data_structure & tr) // writes : - // - the dimensions (ambient and current) + // - the dimensions (maximal and current) // - the number of finite vertices // - the non combinatorial information on vertices (point, etc) // - the number of full cells diff --git a/Triangulation/include/CGAL/Triangulation_ds_full_cell.h b/Triangulation/include/CGAL/Triangulation_ds_full_cell.h index e823cd28436..4893eda0485 100644 --- a/Triangulation/include/CGAL/Triangulation_ds_full_cell.h +++ b/Triangulation/include/CGAL/Triangulation_ds_full_cell.h @@ -34,7 +34,7 @@ class Triangulation_ds_full_cell typedef typename Default::Get::type Storage_policy; typedef Triangulation_ds_full_cell Self; - typedef typename TDS::Ambient_dimension Ambient_dimension; + typedef typename TDS::Maximal_dimension Maximal_dimension; public: typedef typename TDS::Face Face; @@ -51,9 +51,9 @@ public: private: // STORAGE typedef TFC_data< Vertex_handle, Full_cell_handle, - Ambient_dimension, Storage_policy > Combinatorics; + Maximal_dimension, Storage_policy > Combinatorics; friend class TFC_data< Vertex_handle, Full_cell_handle, - Ambient_dimension, Storage_policy >; + Maximal_dimension, Storage_policy >; // array of vertices typedef typename Combinatorics::Vertex_handle_array Vertex_handle_array; // neighbor simplices @@ -87,7 +87,7 @@ public: ~Triangulation_ds_full_cell() {} - int ambient_dimension() const /* Concept */ + int maximal_dimension() const /* Concept */ { return vertices().size() - 1; } @@ -104,26 +104,26 @@ public: Vertex_handle vertex(const int i) const /* Concept */ { - CGAL_precondition(0<=i && i<=ambient_dimension()); + CGAL_precondition(0<=i && i<=maximal_dimension()); return vertices()[i]; } Full_cell_handle neighbor(const int i) const /* Concept */ { - CGAL_precondition(0<=i && i<=ambient_dimension()); + CGAL_precondition(0<=i && i<=maximal_dimension()); return neighbors()[i]; } int mirror_index(const int i) const /* Concept */ { - CGAL_precondition(0<=i && i<=ambient_dimension()); + CGAL_precondition(0<=i && i<=maximal_dimension()); return combinatorics_.mirror_index(i); } // Advanced... Vertex_handle mirror_vertex(const int i, const int cur_dim) const /* Concept */ { - CGAL_precondition(0<=i && i<=ambient_dimension()); + CGAL_precondition(0<=i && i<=maximal_dimension()); return combinatorics_.mirror_vertex(i, cur_dim); } @@ -149,19 +149,19 @@ public: void set_vertex(const int i, Vertex_handle v) /* Concept */ { - CGAL_precondition(0<=i && i<=ambient_dimension()); + CGAL_precondition(0<=i && i<=maximal_dimension()); vertices()[i] = v; } void set_neighbor(const int i, Full_cell_handle s) /* Concept */ { - CGAL_precondition(0<=i && i<=ambient_dimension()); + CGAL_precondition(0<=i && i<=maximal_dimension()); neighbors()[i] = s; } void set_mirror_index(const int i, const int index) /* Concept */ { - CGAL_precondition(0<=i && i<=ambient_dimension()); + CGAL_precondition(0<=i && i<=maximal_dimension()); combinatorics_.set_mirror_index(i, index); } @@ -173,7 +173,7 @@ public: bool has_vertex(Vertex_const_handle v, int & index) const /* Concept */ { - const int d = ambient_dimension(); + const int d = maximal_dimension(); index = 0; while( (index <= d) && (vertex(index) != v) ) ++index; @@ -188,7 +188,7 @@ public: bool has_neighbor(Full_cell_const_handle s, int & index) const /* Concept */ { - const int d = ambient_dimension(); + const int d = maximal_dimension(); index = 0; while( (index <= d) && (neighbor(index) != s) ) ++index; @@ -197,8 +197,8 @@ public: void swap_vertices(const int d1, const int d2) /* Concept */ { - CGAL_precondition(0 <= d1 && d1<=ambient_dimension()); - CGAL_precondition(0 <= d2 && d2<=ambient_dimension()); + CGAL_precondition(0 <= d1 && d1<=maximal_dimension()); + CGAL_precondition(0 <= d2 && d2<=maximal_dimension()); combinatorics_.swap_vertices(d1, d2); } @@ -210,7 +210,7 @@ public: bool is_valid(bool verbose = true, int /* level */ = 0) const /* Concept */ { - const int d = ambient_dimension(); + const int d = maximal_dimension(); for( int i = 0; i <= d; ++i ) { if( Vertex_handle() != vertex(i) ) diff --git a/Triangulation/include/CGAL/Triangulation_face.h b/Triangulation/include/CGAL/Triangulation_face.h index 0a24845451d..c7c39e737b7 100644 --- a/Triangulation/include/CGAL/Triangulation_face.h +++ b/Triangulation/include/CGAL/Triangulation_face.h @@ -26,7 +26,7 @@ namespace CGAL { template< typename TDS > class Triangulation_face { - typedef typename internal::Dimen_plus_one::type Dimen_plus; + typedef typename internal::Dimen_plus_one::type Dimen_plus; public: typedef typename TDS::Full_cell_handle Full_cell_handle; /* Concept */ typedef typename TDS::Vertex_handle Vertex_handle; /* Concept */ @@ -38,14 +38,14 @@ protected: public: explicit Triangulation_face(Full_cell_handle s) /* Concept */ - : full_cell_(s), indices_(s->ambient_dimension()+2) + : full_cell_(s), indices_(s->maximal_dimension()+2) { CGAL_assertion( Full_cell_handle() != s ); clear(); } - explicit Triangulation_face(const int ambient_dim) /* Concept */ - : full_cell_(), indices_(ambient_dim+2) + explicit Triangulation_face(const int maximal_dim) /* Concept */ + : full_cell_(), indices_(maximal_dim+2) { clear(); } diff --git a/Triangulation/test/Triangulation/delaunay.cpp b/Triangulation/test/Triangulation/delaunay.cpp index bcd0ed4c712..7cf6c542e0e 100644 --- a/Triangulation/test/Triangulation/delaunay.cpp +++ b/Triangulation/test/Triangulation/delaunay.cpp @@ -76,7 +76,7 @@ void test(const int d, const string & type, const int N) cerr << nbfv < 1 ) + if( pc.maximal_dimension() > 1 ) { typedef vector Faces; Faces edges; @@ -85,7 +85,7 @@ void test(const int d, const string & type, const int N) cout << "\nThere are " << edges.size() << " vertices on the convex hull."; edges.clear(); } - else // pc.ambient_dimension() == 1 + else // pc.maximal_dimension() == 1 { typedef vector Cells; Cells cells; diff --git a/Triangulation/test/Triangulation/tds.cpp b/Triangulation/test/Triangulation/tds.cpp index 9e54902e018..451fbf1cf77 100644 --- a/Triangulation/test/Triangulation/tds.cpp +++ b/Triangulation/test/Triangulation/tds.cpp @@ -23,7 +23,7 @@ void test(const int d, const string & type) TDS tds(d); cout << "\nChecking Tds of (" << type << ") dimension " - << tds.ambient_dimension(); + << tds.maximal_dimension(); assert(tds.empty()); vector vhs; vhs.push_back(tds.insert_increase_dimension()); @@ -112,7 +112,7 @@ void test(const int d, const string & type) TDS tds2(tds); assert( tds2.is_valid() ); assert( tds.current_dimension() == tds2.current_dimension() ); - assert( tds.ambient_dimension() == tds2.ambient_dimension() ); + assert( tds.maximal_dimension() == tds2.maximal_dimension() ); assert( tds.number_of_vertices() == tds2.number_of_vertices() ); assert( tds.number_of_full_cells() == tds2.number_of_full_cells() ); diff --git a/Triangulation/test/Triangulation/triangulation.cpp b/Triangulation/test/Triangulation/triangulation.cpp index bc619ba077c..1ed8be1fed3 100644 --- a/Triangulation/test/Triangulation/triangulation.cpp +++ b/Triangulation/test/Triangulation/triangulation.cpp @@ -30,7 +30,7 @@ void test(const int d, const string & type, int N) T tri(d); cerr << "\nChecking Triangulation of (" << type << d << ") dimension " - << tri.ambient_dimension(); + << tri.maximal_dimension(); assert(tri.empty()); vector coords(d); @@ -72,7 +72,7 @@ void test(const int d, const string & type, int N) T tri2(tri); assert( tri2.is_valid() ); assert( tri.current_dimension() == tri2.current_dimension() ); - assert( tri.ambient_dimension() == tri2.ambient_dimension() ); + assert( tri.maximal_dimension() == tri2.maximal_dimension() ); assert( tri.number_of_vertices() == tri2.number_of_vertices() ); assert( tri.number_of_full_cells() == tri2.number_of_full_cells() );