diff --git a/Polyline_simplification_2/examples/Polyline_simplification_2/points_and_vertices.cpp b/Polyline_simplification_2/examples/Polyline_simplification_2/points_and_vertices.cpp index 34397eb1ddd..f582dde84c9 100644 --- a/Polyline_simplification_2/examples/Polyline_simplification_2/points_and_vertices.cpp +++ b/Polyline_simplification_2/examples/Polyline_simplification_2/points_and_vertices.cpp @@ -60,7 +60,7 @@ int main( ) PS::simplify(ct, cid, Cost(), Stop(0.5), keep_points); print(ct, cid); PS::simplify(ct, cid, Cost(), Stop(0.5), keep_points); - ct.remove_points_from_constraint(cid); + ct.remove_points_without_corresponding_vertex(cid); print(ct, cid); return 0; diff --git a/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/simplify.h b/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/simplify.h index 2179cb8a5ff..c1fec18c948 100644 --- a/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/simplify.h +++ b/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/simplify.h @@ -426,7 +426,7 @@ simplify(CGAL::Constrained_triangulation_plus_2& ct, while(simplifier()){} if(! keep_points){ - ct.remove_points_from_constraint(cid); + ct.remove_points_without_corresponding_vertex(cid); } return simplifier.number_of_removed_vertices(); } @@ -457,7 +457,7 @@ simplify(CGAL::Constrained_triangulation_plus_2& ct, while(simplifier()){} if(! keep_points){ - ct.remove_points_from_constraints(); + ct.remove_points_without_corresponding_vertex(); } return simplifier.number_of_removed_vertices(); } diff --git a/Triangulation_2/doc/Triangulation_2/CGAL/Constrained_triangulation_plus_2.h b/Triangulation_2/doc/Triangulation_2/CGAL/Constrained_triangulation_plus_2.h index 5436daf9660..21107c1f9c5 100644 --- a/Triangulation_2/doc/Triangulation_2/CGAL/Constrained_triangulation_plus_2.h +++ b/Triangulation_2/doc/Triangulation_2/CGAL/Constrained_triangulation_plus_2.h @@ -427,8 +427,8 @@ Points_in_constraint_iterator points_in_constraint_end(Constraint_id cid) const \cgalAdvancedBegin Removes the vertex at `vicq` from the constraint and the triangulation. The point of that vertex remains stored in the sequence of original points -of the constraint until `remove_points_without_vertex_from_constraint(Constraint_id)` -or `remove_points_without_vertex_from_constraints()` is called. +of the constraint until `remove_points_without_corresponding_vertex(Constraint_id)` +or `remove_points_without_corresponding_vertex()` is called. The polyline simplification algorithm described in Chapter \ref Chapter_2D_Polyline_simplification diff --git a/Triangulation_2/include/CGAL/Polyline_constrained_triangulation_2.h b/Triangulation_2/include/CGAL/Polyline_constrained_triangulation_2.h index a5545231f59..230594c0e71 100644 --- a/Triangulation_2/include/CGAL/Polyline_constrained_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Polyline_constrained_triangulation_2.h @@ -623,13 +623,13 @@ public: Triangulation::insert_constraint(*u, *w); } - std::size_t remove_points_from_constraint(Constraint_id cid) + std::size_t remove_points_without_corresponding_vertex(Constraint_id cid) { - return hierarchy.remove_points_from_constraint(cid); + return hierarchy.remove_points_without_corresponding_vertex(cid); } - std::size_t remove_points_from_constraints() + std::size_t remove_points_without_corresponding_vertex() { - return hierarchy.remove_points_from_constraints(); + return hierarchy.remove_points_without_corresponding_vertex(); } diff --git a/Triangulation_2/include/CGAL/Polyline_constraint_hierarchy_2.h b/Triangulation_2/include/CGAL/Polyline_constraint_hierarchy_2.h index 14b637e96a7..ce000f840c6 100644 --- a/Triangulation_2/include/CGAL/Polyline_constraint_hierarchy_2.h +++ b/Triangulation_2/include/CGAL/Polyline_constraint_hierarchy_2.h @@ -253,8 +253,8 @@ public: Vertex_it v, Vertex_it w); - std::size_t remove_points_from_constraint(Constraint_id); - std::size_t remove_points_from_constraints(); + std::size_t remove_points_without_corresponding_vertex(Constraint_id); + std::size_t remove_points_without_corresponding_vertex(); Constraint_id concatenate(Constraint_id first, Constraint_id second); Constraint_id concatenate2(Constraint_id first, Constraint_id second); @@ -648,7 +648,7 @@ void Polyline_constraint_hierarchy_2::simplify(Vertex_it uc, template std::size_t -Polyline_constraint_hierarchy_2::remove_points_from_constraint(Constraint_id cid) +Polyline_constraint_hierarchy_2::remove_points_without_corresponding_vertex(Constraint_id cid) { std::size_t n = 0; for(Point_it it = points_in_constraint_begin(cid); @@ -663,11 +663,11 @@ Polyline_constraint_hierarchy_2::remove_points_from_constraint(Constrain template std::size_t -Polyline_constraint_hierarchy_2::remove_points_from_constraints() +Polyline_constraint_hierarchy_2::remove_points_without_corresponding_vertex() { std::size_t n = 0; for(C_iterator it = constraint_set.begin(); it!= constraint_set.end(); ++it){ - n+= remove_points_from_constraint(*it); + n+= remove_points_without_corresponding_vertex(*it); } return n; }