diff --git a/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_2.h b/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_2.h index 4f62df5899b..6e2db82065d 100644 --- a/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_2.h +++ b/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_2.h @@ -261,63 +261,62 @@ operator=(const Apollonius_graph_2& other); /*! Returns a reference to the Apollonius graph traits object. */ -Geom_traits geom_traits(); +const Geom_traits& geom_traits() const; /*! Returns a reference to the underlying data structure. */ -Data_structure data_structure(); +const Data_structure& data_structure() const; /*! Same as `data_structure()`. This method has been added in compliance with the `DelaunayGraph_2` concept. */ -Data_structure tds(); +const Data_structure& tds() const; /*! Returns the dimension of the Apollonius graph. */ -int dimension(); +int dimension() const; /*! Returns the number of finite vertices. */ -size_type number_of_vertices(); +size_type number_of_vertices() const; /*! Returns the number of visible sites. */ -size_type number_of_visible_sites(); +size_type number_of_visible_sites() const; /*! Returns the number of hidden sites. */ -size_type number_of_hidden_sites(); +size_type number_of_hidden_sites() const; /*! Returns the number of faces (both finite and infinite) of the Apollonius graph. */ -size_type number_of_faces(); +size_type number_of_faces() const; /*! Returns a face incident to the `infinite_vertex`. */ -Face_handle infinite_face(); +Face_handle infinite_face() const; /*! Returns the `infinite_vertex`. */ -Vertex_handle -infinite_vertex(); +Vertex_handle infinite_vertex() const; /*! Returns a vertex distinct from the `infinite_vertex`. \pre The number of (visible) vertices in the Apollonius graph must be at least one. */ -Vertex_handle finite_vertex(); +Vertex_handle finite_vertex() const; /// @} @@ -337,63 +336,62 @@ Vertex_handle finite_vertex(); /*! Starts at an arbitrary finite vertex. */ -Finite_vertices_iterator finite_vertices_begin(); +Finite_vertices_iterator finite_vertices_begin() const; /*! Past-the-end iterator. */ -Finite_vertices_iterator finite_vertices_end(); +Finite_vertices_iterator finite_vertices_end() const; /*! Starts at an arbitrary finite edge. */ -Finite_edges_iterator finite_edges_begin(); +Finite_edges_iterator finite_edges_begin() const; /*! Past-the-end iterator. */ -Finite_edges_iterator finite_edges_end(); +Finite_edges_iterator finite_edges_end() const; /*! Starts at an arbitrary finite face. */ -Finite_faces_iterator finite_faces_begin(); +Finite_faces_iterator finite_faces_begin() const; /*! Past-the-end iterator. */ -Finite_faces_iterator finite_faces_end() -const; +Finite_faces_iterator finite_faces_end() const; /*! Starts at an arbitrary vertex. */ -All_vertices_iterator all_vertices_begin(); +All_vertices_iterator all_vertices_begin() const; /*! Past-the-end iterator. */ -All_vertices_iterator all_vertices_end(); +All_vertices_iterator all_vertices_end() const; /*! Starts at an arbitrary edge. */ -All_edges_iterator all_edges_begin(); +All_edges_iterator all_edges_begin() const; /*! Past-the-end iterator. */ -All_edges_iterator all_edges_end(); +All_edges_iterator all_edges_end() const; /*! Starts at an arbitrary face. */ -All_faces_iterator all_faces_begin(); +All_faces_iterator all_faces_begin() const; /*! Past-the-end iterator. */ -All_faces_iterator all_faces_end(); +All_faces_iterator all_faces_end() const; /// @} @@ -407,32 +405,32 @@ All_faces_iterator all_faces_end(); /*! Starts at an arbitrary site. */ -Sites_iterator sites_begin(); +Sites_iterator sites_begin() const; /*! Past-the-end iterator. */ -Sites_iterator sites_end(); +Sites_iterator sites_end() const; /*! Starts at an arbitrary visible site. */ -Visible_sites_iterator visible_sites_begin(); +Visible_sites_iterator visible_sites_begin() const; /*! Past-the-end iterator. */ -Visible_sites_iterator visible_sites_end(); +Visible_sites_iterator visible_sites_end() const; /*! Starts at an arbitrary hidden site. */ -Hidden_sites_iterator hidden_sites_begin(); +Hidden_sites_iterator hidden_sites_begin() const; /*! Past-the-end iterator. */ -Hidden_sites_iterator hidden_sites_end(); +Hidden_sites_iterator hidden_sites_end() const; /// @} @@ -454,39 +452,39 @@ Hidden_sites_iterator hidden_sites_end(); Starts at an arbitrary face incident to `v`. */ -Face_circulator incident_faces(Vertex_handle v); +Face_circulator incident_faces(Vertex_handle v) const; /*! Starts at face `f`. \pre Face `f` is incident to vertex `v`. */ -Face_circulator incident_faces(Vertex_handle v, Face_handle f); +Face_circulator incident_faces(Vertex_handle v, Face_handle f) const; /*! Starts at an arbitrary edge incident to `v`. */ -Edge_circulator incident_edges(Vertex_handle v); +Edge_circulator incident_edges(Vertex_handle v) const; /*! Starts at the first edge of `f` incident to `v`, in counterclockwise order around `v`. \pre Face `f` is incident to vertex `v`. */ -Edge_circulator incident_edges(Vertex_handle v, Face_handle f); +Edge_circulator incident_edges(Vertex_handle v, Face_handle f) const; /*! Starts at an arbitrary vertex incident to `v`. */ -Vertex_circulator incident_vertices(Vertex_handle v); +Vertex_circulator incident_vertices(Vertex_handle v) const; /*! Starts at the first vertex of `f` adjacent to `v` in counterclockwise order around `v`. \pre Face `f` is incident to vertex `v`. */ -Vertex_circulator incident_vertices(Vertex_handle v, Face_handle f); +Vertex_circulator incident_vertices(Vertex_handle v, Face_handle f) const; /// @} @@ -516,7 +514,7 @@ bool is_infinite(Face_handle f, int i) const; `true`, iff edge `e` is infinite. */ bool -is_infinite(Edge e) const; +is_infinite(const Edge& e) const; /*! `true`, iff edge `*ec` is infinite. @@ -544,7 +542,7 @@ site `s` in the Apollonius graph. If `s` is visible then the vertex handle of `s` is returned, otherwise `Vertex_handle(nullptr)` is returned. */ -Vertex_handle insert(Site_2 s); +Vertex_handle insert(const Site_2& s); /*! Inserts `s` in the Apollonius graph using the site @@ -553,8 +551,7 @@ the center of `s`. If `s` is visible then the vertex handle of `s` is returned, otherwise `Vertex_handle(nullptr)` is returned. */ -Vertex_handle insert(Site_2 s, Vertex_handle -vnear); +Vertex_handle insert(const Site_2& s, Vertex_handle vnear); /// @} @@ -581,7 +578,7 @@ arbitrarily and one of the nearest neighbors of `p` is returned. If there are no visible sites in the Apollonius diagram `Vertex_handle(nullptr)` is returned. */ -Vertex_handle nearest_neighbor(Point_2 p); +Vertex_handle nearest_neighbor(const Point_2& p) const; /*! Finds the nearest neighbor of the point @@ -591,8 +588,7 @@ arbitrarily and one of the nearest neighbors of `p` is returned. If there are no visible sites in the Apollonius diagram `Vertex_handle(nullptr)` is returned. */ -Vertex_handle nearest_neighbor(Point_2 p, -Vertex_handle vnear); +Vertex_handle nearest_neighbor(const Point_2& p, Vertex_handle vnear) const; /// @} @@ -645,7 +641,7 @@ the stream `str`. */ template< class Stream > -Stream& draw_primal(Stream& str); +Stream& draw_primal(Stream& str) const; /*! Draws the dual of the @@ -658,7 +654,7 @@ Apollonius graph, i.e., the Apollonius diagram, to the stream */ template < class Stream > -Stream& draw_dual(Stream& str); +Stream& draw_dual(Stream& str) const; /*! Draws the edge @@ -669,7 +665,7 @@ Draws the edge */ template< class Stream > -Stream& draw_primal_edge(Edge e, Stream& str); +Stream& draw_primal_edge(const Edge& e, Stream& str) const; /*! Draws the dual of the @@ -682,7 +678,7 @@ of the Apollonius diagram. */ template< class Stream > -Stream& draw_dual_edge(Edge e, Stream& str); +Stream& draw_dual_edge(const Edge& e, Stream& str) const; /*! Writes the current @@ -690,7 +686,7 @@ state of the Apollonius graph to an output stream. In particular, all visible and hidden sites are written as well as the underlying combinatorial data structure. */ -void file_output(std::ostream& os); +void file_output(std::ostream& os) const; /*! Reads the state of the @@ -701,14 +697,12 @@ void file_input(std::istream& is); /*! Writes the current state of the Apollonius graph to an output stream. */ -std::ostream& operator<<(std::ostream& os, -Apollonius_graph_2 ag); +std::ostream& operator<<(std::ostream& os, const Apollonius_graph_2& ag) const; /*! Reads the state of the Apollonius graph from an input stream. */ -std::istream& operator>>(std::istream& is, -Apollonius_graph_2 ag); +std::istream& operator>>(std::istream& is, const Apollonius_graph_2& ag); /// @} @@ -723,7 +717,7 @@ both the data structure and the Apollonius graph are validated. Negative values of `level` always return true, and values greater than 1 are equivalent to `level` being 1. */ -bool is_valid(bool verbose = false, int level = 1); +bool is_valid(bool verbose = false, int level = 1) const; /// @} @@ -737,12 +731,11 @@ void clear(); /*! The Apollonius graphs -`other` and `ag` are swapped. `ag`.`swap(other)` should -be preferred to `ag`` = other` or to `ag``(other)` if +`other` and `ag` are swapped. `ag.swap(other)` should +be preferred to `ag = other` or to `ag(other)` if `other` is deleted afterwards. */ -void swap(Apollonius_graph_2 -other); +void swap(Apollonius_graph_2& other); /// @} diff --git a/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_hierarchy_2.h b/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_hierarchy_2.h index b331d57fcef..742a7c14742 100644 --- a/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_hierarchy_2.h +++ b/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_hierarchy_2.h @@ -61,8 +61,7 @@ public: Creates an hierarchy of Apollonius graphs using `gt` as geometric traits. */ -Apollonius_graph_hierarchy_2(Gt -gt=Gt()); +Apollonius_graph_hierarchy_2(Gt gt=Gt()); /*! Creates an Apollonius graph hierarchy using @@ -79,8 +78,7 @@ are duplicated. After the construction, `agh` and `other` refer to two different Apollonius graph hierarchies: if `other` is modified, `agh` is not. */ -Apollonius_graph_hierarchy_2 -(Apollonius_graph_hierarchy_2 other); +Apollonius_graph_hierarchy_2(const Apollonius_graph_hierarchy_2& other); /*! Assignment. All faces, vertices and inter-level pointers @@ -112,7 +110,7 @@ site `s` in the Apollonius graph hierarchy. If `s` is visible then the vertex handle of `s` is returned, otherwise `Vertex_handle(nullptr)` is returned. */ -Vertex_handle insert(Site_2 s); +Vertex_handle insert(const Site_2& s); /*! Inserts `s` in the Apollonius graph hierarchy using the @@ -124,8 +122,7 @@ A call to this method is equivalent to `agh.insert(s);` and it has been added for the sake of conformity with the interface of the `Apollonius_graph_2` class. */ -Vertex_handle insert(Site_2 s, Vertex_handle -vnear); +Vertex_handle insert(const Site_2& s, Vertex_handle vnear); /// @} @@ -152,7 +149,7 @@ arbitrarily and one of the nearest neighbors of `p` is returned. If there are no visible sites in the Apollonius diagram `Vertex_handle(nullptr)` is returned. */ -Vertex_handle nearest_neighbor(Point p); +Vertex_handle nearest_neighbor(const Point_2& p) const; /*! Finds the nearest neighbor of the point @@ -163,8 +160,7 @@ A call to this method is equivalent to conformity with the interface of the `Apollonius_graph_2` class. */ -Vertex_handle nearest_neighbor(Point p, -Vertex_handle vnear); +Vertex_handle nearest_neighbor(const Point_2& p, Vertex_handle vnear) const; /// @} @@ -177,7 +173,7 @@ state of the Apollonius graph hierarchy to an output stream. In particular, all visible and hidden sites are written as well as the underlying combinatorial hierarchical data structure. */ -void file_output(std::ostream& os); +void file_output(std::ostream& os) const; /*! Reads the state of the @@ -189,7 +185,7 @@ void file_input(std::istream& is); Writes the current state of the Apollonius graph hierarchy to an output stream. */ -std::ostream& operator<<(std::ostream& os, Apollonius_graph_hierarchy_2 agh); +std::ostream& operator<<(std::ostream& os, Apollonius_graph_hierarchy_2 agh) const; /*! Reads the state of the Apollonius graph hierarchy from an input stream. @@ -227,11 +223,10 @@ void clear(); /*! The Apollonius graph hierarchies `other` and `agh` are -swapped. `agh`.`swap(other)` should be preferred to `agh`` = -other` or to `agh``(other)` if `other` is deleted afterwards. +swapped. `agh.swap(other)` should be preferred to `agh = other` +or to `agh(other)` if `other` is deleted afterwards. */ -void swap(Apollonius_graph_hierarchy_2 -other); +void swap(Apollonius_graph_hierarchy_2& other); /// @} diff --git a/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_hierarchy_vertex_base_2.h b/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_hierarchy_vertex_base_2.h index 3d6bc26db21..354dd734e8b 100644 --- a/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_hierarchy_vertex_base_2.h +++ b/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_hierarchy_vertex_base_2.h @@ -34,7 +34,7 @@ Apollonius_graph_hierarchy_vertex_base_2(); Constructs a vertex associated with the site `s` and embedded at the center of `s`. */ -Apollonius_graph_hierarchy_vertex_base_2(Site_2 s); +Apollonius_graph_hierarchy_vertex_base_2(const Site_2& s); /*! Constructs a vertex associated with @@ -42,7 +42,7 @@ the site `s`, embedded at the center of `s`, and pointing to the face associated with the face handle `f`. */ -Apollonius_graph_vertex_base_2(Site_2 s, Face_handle f); +Apollonius_graph_hierarchy_vertex_base_2(const Site_2& s, Face_handle f); /// @} diff --git a/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_traits_2.h b/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_traits_2.h index ae347df1437..091a2cb8f00 100644 --- a/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_traits_2.h +++ b/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_traits_2.h @@ -45,14 +45,13 @@ Apollonius_graph_traits_2(); /*! Copy constructor. */ -Apollonius_graph_traits_2(Apollonius_graph_traits_2 other); +Apollonius_graph_traits_2(const Apollonius_graph_traits_2& other); /*! Assignment operator. */ Apollonius_graph_traits_2 -operator=(Apollonius_graph_traits_2 -other); +operator=(const Apollonius_graph_traits_2& other); /// @} diff --git a/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_vertex_base_2.h b/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_vertex_base_2.h index a4ba4a49194..75bf5137d3d 100644 --- a/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_vertex_base_2.h +++ b/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_graph_vertex_base_2.h @@ -43,7 +43,7 @@ Apollonius_graph_bertex_base_2(); Constructs a vertex associated with the site `s` and embedded at the center of `s`. */ -Apollonius_graph_vertex_base_2(Site_2 s); +Apollonius_graph_vertex_base_2(const Site_2& s); /*! Constructs a vertex associated with @@ -51,7 +51,7 @@ the site `s`, embedded at the center of `s`, and pointing to the face associated with the face handle `f`. */ -Apollonius_graph_vertex_base_2(Site_2 s, Face_handle f); +Apollonius_graph_vertex_base_2(const Site_2& s, Face_handle f); /// @} diff --git a/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_site_2.h b/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_site_2.h index 03bee290f37..30de7481481 100644 --- a/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_site_2.h +++ b/Apollonius_graph_2/doc/Apollonius_graph_2/CGAL/Apollonius_site_2.h @@ -44,7 +44,7 @@ Apollonius_site_2(Point_2 p=Point_2(), Weight w= Weight(0)); /*! Copy constructor. */ -Apollonius_site_2(Apollonius_site_2 other); +Apollonius_site_2(const Apollonius_site_2& other); /// @} @@ -57,8 +57,7 @@ Apollonius site `s` into the stream `os`. \pre The insert operator must be defined for `Point_2` and `Weight`. \relates Apollonius_site_2 */ -std::ostream& operator<<(std::ostream& os, -const Apollonius_site_2& s); +std::ostream& operator<<(std::ostream& os, const Apollonius_site_2& s) const; /*! Reads an Apollonius site from the stream `is` and assigns it @@ -67,8 +66,7 @@ to `s`. \pre The extract operator must be defined for `Point_2` and `Weight`. \relates Apollonius_site_2 */ -std::istream& operator>>(std::istream& is, -const Apollonius_site_2& s); +std::istream& operator>>(std::istream& is, const Apollonius_site_2& s); /*! Inserts the Apollonius site `s` into the `Qt_widget` stream `w`. @@ -76,7 +74,6 @@ Inserts the Apollonius site `s` into the `Qt_widget` stream `w`. \pre The insert operator must be defined for `K::Circle_2`. \relates Apollonius_site_2 */ -Qt_widget& operator<<(Qt_widget& w, -const Apollonius_site_2& s); +Qt_widget& operator<<(Qt_widget& w, const Apollonius_site_2& s) const; } /* end namespace CGAL */ diff --git a/Segment_Delaunay_graph_2/doc/Segment_Delaunay_graph_2/CGAL/Segment_Delaunay_graph_2.h b/Segment_Delaunay_graph_2/doc/Segment_Delaunay_graph_2/CGAL/Segment_Delaunay_graph_2.h index 9aa16d3a72c..388f9eed77b 100644 --- a/Segment_Delaunay_graph_2/doc/Segment_Delaunay_graph_2/CGAL/Segment_Delaunay_graph_2.h +++ b/Segment_Delaunay_graph_2/doc/Segment_Delaunay_graph_2/CGAL/Segment_Delaunay_graph_2.h @@ -324,33 +324,32 @@ Point_container point_container(); /*! Starts at an arbitrary finite vertex. */ -Finite_vertices_iterator finite_vertices_begin(); +Finite_vertices_iterator finite_vertices_begin() const; /*! Past-the-end iterator. */ -Finite_vertices_iterator finite_vertices_end(); +Finite_vertices_iterator finite_vertices_end() const; /*! Starts at an arbitrary finite edge. */ -Finite_edges_iterator finite_edges_begin(); +Finite_edges_iterator finite_edges_begin() const; /*! Past-the-end iterator. */ -Finite_edges_iterator finite_edges_end(); +Finite_edges_iterator finite_edges_end() const; /*! Starts at an arbitrary finite face. */ -Finite_faces_iterator finite_faces_begin(); +Finite_faces_iterator finite_faces_begin() const; /*! Past-the-end iterator. */ -Finite_faces_iterator finite_faces_end() -const; +Finite_faces_iterator finite_faces_end() const; /// @} @@ -366,32 +365,32 @@ const; /*! Starts at an arbitrary vertex. */ -All_vertices_iterator all_vertices_begin(); +All_vertices_iterator all_vertices_begin() const; /*! Past-the-end iterator. */ -All_vertices_iterator all_vertices_end(); +All_vertices_iterator all_vertices_end() const; /*! Starts at an arbitrary edge. */ -All_edges_iterator all_edges_begin(); +All_edges_iterator all_edges_begin() const; /*! Past-the-end iterator. */ -All_edges_iterator all_edges_end(); +All_edges_iterator all_edges_end() const; /*! Starts at an arbitrary face. */ -All_faces_iterator all_faces_begin(); +All_faces_iterator all_faces_begin() const; /*! Past-the-end iterator. */ -All_faces_iterator all_faces_end(); +All_faces_iterator all_faces_end() const; /// @} @@ -405,22 +404,22 @@ All_faces_iterator all_faces_end(); /*! Starts at an arbitrary input site. */ -Input_sites_iterator input_sites_begin(); +Input_sites_iterator input_sites_begin() const; /*! Past-the-end iterator. */ -Input_sites_iterator input_sites_end(); +Input_sites_iterator input_sites_end() const; /*! Starts at an arbitrary output site. */ -Output_sites_iterator output_sites_begin(); +Output_sites_iterator output_sites_begin() const; /*! Past-the-end iterator. */ -Output_sites_iterator output_sites_end(); +Output_sites_iterator output_sites_end() const; /// @}