From 2876ad9af18e312758a3c66f9f04d89ad57d5fcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 10 Apr 2020 18:15:32 +0200 Subject: [PATCH] remove trailing whitespaces --- .../CGAL/internal/boost/array_binary_tree.hpp | 2 +- .../segment_traverser_benchmark.cpp | 2 +- .../Triangulation_3/CGAL/Triangulation_3.h | 1600 ++++++++--------- .../Triangulation_3/PackageDescription.txt | 2 +- .../doc/Triangulation_3/Triangulation_3.txt | 356 ++-- .../examples/Triangulation_3/CMakeLists.txt | 4 +- .../CGAL/Triangulation_segment_traverser_3.h | 230 +-- .../Triangulation_segment_traverser_3_impl.h | 10 +- .../test_segment_cell_traverser_3.cpp | 6 +- .../test_segment_simplex_traverser_3.cpp | 4 +- .../test_simplex_iterator_3.cpp | 2 +- 11 files changed, 1109 insertions(+), 1109 deletions(-) diff --git a/STL_Extension/include/CGAL/internal/boost/array_binary_tree.hpp b/STL_Extension/include/CGAL/internal/boost/array_binary_tree.hpp index e57dda3d31a..dba4dc93fb8 100644 --- a/STL_Extension/include/CGAL/internal/boost/array_binary_tree.hpp +++ b/STL_Extension/include/CGAL/internal/boost/array_binary_tree.hpp @@ -13,7 +13,7 @@ // SPDX-License-Identifier: BSL-1.0 // // NOTE: this file have been taken from boost 1.46.1 for using -// with Modificable_priority_queue (to enhance the +// with Modificable_priority_queue (to enhance the // non-documented mutable_queue). // original file is // diff --git a/Triangulation_3/benchmark/Triangulation_3/segment_traverser_benchmark.cpp b/Triangulation_3/benchmark/Triangulation_3/segment_traverser_benchmark.cpp index 580d9d7e649..2839ea5e00b 100644 --- a/Triangulation_3/benchmark/Triangulation_3/segment_traverser_benchmark.cpp +++ b/Triangulation_3/benchmark/Triangulation_3/segment_traverser_benchmark.cpp @@ -14,7 +14,7 @@ // // $URL$ // $Id$ -// +// // #include diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h index 4bc5c0ca5be..281a73b5e69 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h @@ -4,8 +4,8 @@ namespace CGAL { /*! \ingroup PkgTriangulation3TriangulationClasses -The class `Triangulation_3` represents a 3-dimensional tetrahedralization -of points. +The class `Triangulation_3` represents a 3-dimensional tetrahedralization +of points. \tparam Traits is the geometric traits class and must be a model of `TriangulationTraits_3`. @@ -20,7 +20,7 @@ respectively. \tparam SLDS is an optional parameter to specify the type of the spatial lock data structure. It must be a model of the `SurjectiveLockDataStructure` concept, with `Object` being a `Point` (as defined below). - It is only used if the triangulation data structure used is concurrency-safe (i.e.\ when + It is only used if the triangulation data structure used is concurrency-safe (i.e.\ when `TriangulationDataStructure_3::Concurrency_tag` is `Parallel_tag`). The default value is `Spatial_lock_grid_3` if the triangulation data structure is concurrency-safe, and `void` otherwise. @@ -29,8 +29,8 @@ respectively. \cgalHeading{Traversal of the Triangulation} -The triangulation class provides several iterators and circulators -that allow one to traverse it (completely or partially). +The triangulation class provides several iterators and circulators +that allow one to traverse it (completely or partially). \sa `CGAL::Delaunay_triangulation_3` \sa `CGAL::Regular_triangulation_3` @@ -41,15 +41,15 @@ class Triangulation_3 : public Triangulation_utils_3 { public: /*! - The enum `Locate_type` is defined by `Triangulation_3` to specify + The enum `Locate_type` is defined by `Triangulation_3` to specify which case occurs when locating a point in the triangulation. */ enum Locate_type {VERTEX=0, EDGE, FACET, CELL, OUTSIDE_CONVEX_HULL, OUTSIDE_AFFINE_HULL}; public: -/// \name Types -/// The class `Triangulation_3` defines the following types: +/// \name Types +/// The class `Triangulation_3` defines the following types: /// @{ /*! @@ -59,32 +59,32 @@ typedef Traits Geom_traits; /*! -*/ +*/ typedef TDS Triangulation_data_structure; /*! -*/ +*/ typedef SLDS Lock_data_structure; /*! -*/ +*/ typedef Triangulation_data_structure::Vertex::Point Point; /*! -*/ +*/ typedef Geom_traits::Segment_3 Segment; /*! -*/ +*/ typedef Geom_traits::Triangle_3 Triangle; /*! -*/ +*/ typedef Geom_traits::Tetrahedron_3 Tetrahedron; /// @} @@ -97,32 +97,32 @@ Only vertices (0-faces) and cells (3-faces) are stored. Edges (1-faces) and face /*! -*/ +*/ typedef Triangulation_data_structure::Vertex Vertex; /*! -*/ +*/ typedef Triangulation_data_structure::Cell Cell; /*! -*/ +*/ typedef Triangulation_data_structure::Facet Facet; /*! -*/ +*/ typedef Triangulation_data_structure::Edge Edge; -/*! +/*! Concurrency tag (from the TDS). -*/ +*/ typedef Triangulation_data_structure::Concurrency_tag Concurrency_tag; /// @} -/*! \name +/*! \name The vertices and faces of the triangulations are accessed through `handles`, `iterators` and `circulators`. A handle is a model of the @@ -134,90 +134,90 @@ visited through iterators and circulators which are bidirectional and non-mutable. Iterators and circulators are convertible to the corresponding handles, thus the user can pass them directly as arguments to the functions. The handles are also model of the concepts -`LessThanComparable` and `Hashable`, that is they can be used as keys -in containers such as `std::map` and `boost::unordered_map`. +`LessThanComparable` and `Hashable`, that is they can be used as keys +in containers such as `std::map` and `boost::unordered_map`. */ /// @{ /*! -handle to a vertex -*/ +handle to a vertex +*/ typedef Triangulation_data_structure::Vertex_handle Vertex_handle; /*! -handle to a cell -*/ +handle to a cell +*/ typedef Triangulation_data_structure::Cell_handle Cell_handle; /*! -Reference to a simplex (vertex, edge, facet or cell) of the triangulation -*/ -typedef Triangulation_simplex_3 Simplex; +Reference to a simplex (vertex, edge, facet or cell) of the triangulation +*/ +typedef Triangulation_simplex_3 Simplex; /*! -Size type (an unsigned integral type) -*/ +Size type (an unsigned integral type) +*/ typedef Triangulation_data_structure::size_type size_type; /*! -Difference type (a signed integral type) -*/ +Difference type (a signed integral type) +*/ typedef Triangulation_data_structure::difference_type difference_type; /*! -iterator over cells -*/ +iterator over cells +*/ typedef Triangulation_data_structure::Cell_iterator All_cells_iterator; /*! -iterator over facets -*/ +iterator over facets +*/ typedef Triangulation_data_structure::Facet_iterator All_facets_iterator; /*! -iterator over edges -*/ +iterator over edges +*/ typedef Triangulation_data_structure::Edge_iterator All_edges_iterator; /*! -iterator over vertices -*/ +iterator over vertices +*/ typedef Triangulation_data_structure::Vertex_iterator All_vertices_iterator; /*! -iterator over finite cells -*/ -typedef unspecified_type Finite_cells_iterator; +iterator over finite cells +*/ +typedef unspecified_type Finite_cells_iterator; /*! -iterator over finite facets -*/ -typedef unspecified_type Finite_facets_iterator; +iterator over finite facets +*/ +typedef unspecified_type Finite_facets_iterator; /*! -iterator over finite edges -*/ -typedef unspecified_type Finite_edges_iterator; +iterator over finite edges +*/ +typedef unspecified_type Finite_edges_iterator; /*! -iterator over finite vertices -*/ -typedef unspecified_type Finite_vertices_iterator; +iterator over finite vertices +*/ +typedef unspecified_type Finite_vertices_iterator; /*! -iterator over the points corresponding to the -finite vertices of the triangulation. -*/ -typedef unspecified_type Point_iterator; +iterator over the points corresponding to the +finite vertices of the triangulation. +*/ +typedef unspecified_type Point_iterator; /*! -circulator over all cells incident to a given edge -*/ +circulator over all cells incident to a given edge +*/ typedef Triangulation_data_structure::Cell_circulator Cell_circulator; /*! -circulator over all facets incident to a given edge -*/ +circulator over all facets incident to a given edge +*/ typedef Triangulation_data_structure::Facet_circulator Facet_circulator; /*! @@ -246,51 +246,51 @@ In order to write \cpp 11 `for`-loops we provide the following range types. */ /// @{ - + /*! range type for iterating over all cell handles (including infinite cells), with a nested type `iterator` that has as value type `Cell_handle`. -*/ +*/ typedef Iterator_range All_cell_handles; - - + + /*! range type for iterating over facets. */ typedef Iterator_range All_facets; - + /*! range type for iterating over edges. */ typedef Iterator_range All_edges; - + /*! range type for iterating over all vertex handles, with a nested type `iterator` that has as value type `Vertex_handle`. -*/ +*/ typedef Iterator_range All_vertex_handles; /*! range type for iterating over finite cell handles, with a nested type `iterator` that has as value type `Cell_handle`. -*/ +*/ typedef Iterator_range Finite_cell_handles; - - + + /*! range type for iterating over finite facets. */ typedef Iterator_range Finite_facets; - + /*! range type for iterating over finite edges. */ typedef Iterator_range Finite_edges; - + /*! range type for iterating over finite vertex handles, with a nested type `iterator` that has as value type `Vertex_handle`. -*/ +*/ typedef Iterator_range Finite_vertex_handles; /*! @@ -310,95 +310,95 @@ that has as value type `Vertex_handle`. /// @} -/// \name Creation +/// \name Creation /// @{ /*! -Introduces a triangulation `t` having only one vertex which is the +Introduces a triangulation `t` having only one vertex which is the infinite vertex. `lock_ds` is an optional pointer to the lock data structure for parallel operations. It must be provided if concurrency is enabled. -*/ +*/ Triangulation_3(const Geom_traits & traits = Geom_traits(), Lock_data_structure *lock_ds = nullptr); -/*! +/*! Same as the previous one, but with parameters in reverse order. -*/ +*/ Triangulation_3(Lock_data_structure *lock_ds = nullptr, const Geom_traits & traits = Geom_traits()); /*! -Copy constructor. All vertices and faces are duplicated. +Copy constructor. All vertices and faces are duplicated. The pointer to the lock data structure is not copied. Thus, the copy won't be concurrency-safe as long as the user has not call `Triangulation_3::set_lock_data_structure`. -*/ -Triangulation_3 (const Triangulation_3 & tr); +*/ +Triangulation_3 (const Triangulation_3 & tr); /*! -Equivalent to constructing an empty triangulation with the optional -traits class argument and calling `insert(first,last)`. -*/ -template < class InputIterator> -Triangulation_3 (InputIterator first, InputIterator last, +Equivalent to constructing an empty triangulation with the optional +traits class argument and calling `insert(first,last)`. +*/ +template < class InputIterator> +Triangulation_3 (InputIterator first, InputIterator last, const Geom_traits & traits = Geom_traits(), Lock_data_structure *lock_ds = nullptr); -/// @} +/// @} -/// \name Assignment +/// \name Assignment /// @{ /*! -The triangulation `tr` is duplicated, and modifying the copy after the -duplication does not modify the original. The previous triangulation held -by `t` is deleted. -*/ -Triangulation_3 & operator=(const Triangulation_3 & tr); +The triangulation `tr` is duplicated, and modifying the copy after the +duplication does not modify the original. The previous triangulation held +by `t` is deleted. +*/ +Triangulation_3 & operator=(const Triangulation_3 & tr); /*! -The triangulations `tr` and `t` are swapped. -`t.swap(tr)` should be preferred to `t = tr` or to -`t(tr)` if `tr` is deleted after that. Indeed, there is no -copy of cells and vertices, thus this method runs in constant time. -*/ -void swap(Triangulation_3 & tr); +The triangulations `tr` and `t` are swapped. +`t.swap(tr)` should be preferred to `t = tr` or to +`t(tr)` if `tr` is deleted after that. Indeed, there is no +copy of cells and vertices, thus this method runs in constant time. +*/ +void swap(Triangulation_3 & tr); /*! -Deletes all finite vertices and all cells of `t`. -*/ -void clear(); +Deletes all finite vertices and all cells of `t`. +*/ +void clear(); /*! -Equality operator. Returns `true` iff there exist a bijection between the -vertices of `t1` and those of `t2` and a bijection between the cells of -`t1` and those of `t2`, which preserve the geometry of the -triangulation, that is, the points of each corresponding pair of vertices are -equal, and the tetrahedra corresponding to each pair of cells are equal (up to -a permutation of their vertices). -*/ -template < class GT, class Tds1, class Tds2 > -bool operator==(const Triangulation_3 & t1, const Triangulation_3 & t2); +Equality operator. Returns `true` iff there exist a bijection between the +vertices of `t1` and those of `t2` and a bijection between the cells of +`t1` and those of `t2`, which preserve the geometry of the +triangulation, that is, the points of each corresponding pair of vertices are +equal, and the tetrahedra corresponding to each pair of cells are equal (up to +a permutation of their vertices). +*/ +template < class GT, class Tds1, class Tds2 > +bool operator==(const Triangulation_3 & t1, const Triangulation_3 & t2); /*! -The opposite of `operator==`. -*/ -template < class GT, class Tds1, class Tds2 > -bool operator!=(const Triangulation_3 & t1, const Triangulation_3 & t2); +The opposite of `operator==`. +*/ +template < class GT, class Tds1, class Tds2 > +bool operator!=(const Triangulation_3 & t1, const Triangulation_3 & t2); -/// @} +/// @} -/// \name Access Functions +/// \name Access Functions /// @{ /*! -Returns a const reference to the geometric traits object. -*/ +Returns a const reference to the geometric traits object. +*/ const Geom_traits & geom_traits() const; /*! -Returns a const reference to the triangulation data structure. -*/ +Returns a const reference to the triangulation data structure. +*/ const Triangulation_data_structure & tds() const; @@ -412,24 +412,24 @@ The responsibility of keeping a valid triangulation belongs to the user when usi Triangulation_data_structure & tds(); /*! -Returns the dimension of the affine hull. -*/ -int dimension() const; +Returns the dimension of the affine hull. +*/ +int dimension() const; /*! -Returns the number of finite vertices. -*/ -size_type number_of_vertices() const; +Returns the number of finite vertices. +*/ +size_type number_of_vertices() const; /*! -Returns the number of cells or 0 if `t.dimension() < 3`. -*/ -size_type number_of_cells() const; +Returns the number of cells or 0 if `t.dimension() < 3`. +*/ +size_type number_of_cells() const; /*! -Returns the infinite vertex. -*/ -Vertex_handle infinite_vertex(); +Returns the infinite vertex. +*/ +Vertex_handle infinite_vertex(); /*! \cgalAdvancedFunction @@ -437,299 +437,299 @@ Vertex_handle infinite_vertex(); This method is meant to be used only if you have done a low-level operation on the underlying tds that invalidated the infinite vertex. Sets the infinite vertex. \cgalAdvancedEnd -*/ +*/ void set_infinite_vertex(Vertex_handle v); /*! -Returns a cell incident to the infinite vertex. -*/ -Cell_handle infinite_cell() const; +Returns a cell incident to the infinite vertex. +*/ +Cell_handle infinite_cell() const; -/// @} +/// @} -/// \name Non-Constant-Time Access Functions +/// \name Non-Constant-Time Access Functions /// As previously said, the triangulation is a collection of cells that are either infinite or represent a finite tetrahedra, where an infinite cell is a cell incident to the infinite vertex. Similarly we call an edge (resp. facet) `infinite` if it is incident to the infinite vertex. /// @{ /*! -The number of facets. Returns 0 if `t.dimension() < 2`. -*/ -size_type number_of_facets() const; +The number of facets. Returns 0 if `t.dimension() < 2`. +*/ +size_type number_of_facets() const; /*! -The number of edges. Returns 0 if `t.dimension() < 1`. -*/ -size_type number_of_edges() const; +The number of edges. Returns 0 if `t.dimension() < 1`. +*/ +size_type number_of_edges() const; /*! -The number of finite cells. Returns 0 if `t.dimension() < 3`. -*/ -size_type number_of_finite_cells() const; +The number of finite cells. Returns 0 if `t.dimension() < 3`. +*/ +size_type number_of_finite_cells() const; /*! -The number of finite facets. Returns 0 if `t.dimension() < 2`. -*/ -size_type number_of_finite_facets() const; +The number of finite facets. Returns 0 if `t.dimension() < 2`. +*/ +size_type number_of_finite_facets() const; /*! -The number of finite edges. Returns 0 if `t.dimension() < 1`. -*/ -size_type number_of_finite_edges() const; +The number of finite edges. Returns 0 if `t.dimension() < 1`. +*/ +size_type number_of_finite_edges() const; -/// @} +/// @} -/// \name Geometric Access Functions +/// \name Geometric Access Functions /// @{ /*! -Returns the tetrahedron formed by the four vertices of `c`. -\pre `t.dimension() == 3` and the cell is finite. -*/ -Tetrahedron tetrahedron(Cell_handle c) const; +Returns the tetrahedron formed by the four vertices of `c`. +\pre `t.dimension() == 3` and the cell is finite. +*/ +Tetrahedron tetrahedron(Cell_handle c) const; /*! -Returns the triangle formed by the three vertices of facet -`(c,i)`. The triangle is oriented so that its normal points to the -inside of cell `c`. -\pre `t.dimension()` \f$ \geq2\f$ and \f$ i \in\{0,1,2,3\}\f$ in dimension 3, \f$ i = 3\f$ in dimension 2, and the facet is finite. -*/ -Triangle triangle(Cell_handle c, int i) const; +Returns the triangle formed by the three vertices of facet +`(c,i)`. The triangle is oriented so that its normal points to the +inside of cell `c`. +\pre `t.dimension()` \f$ \geq2\f$ and \f$ i \in\{0,1,2,3\}\f$ in dimension 3, \f$ i = 3\f$ in dimension 2, and the facet is finite. +*/ +Triangle triangle(Cell_handle c, int i) const; /*! -Same as the previous method for facet `f`. -\pre `t.dimension()` \f$ \geq2\f$ and the facet is finite. -*/ -Triangle triangle(const Facet & f) const; +Same as the previous method for facet `f`. +\pre `t.dimension()` \f$ \geq2\f$ and the facet is finite. +*/ +Triangle triangle(const Facet & f) const; /*! -Returns the line segment formed by the vertices of `e`. -\pre `t.dimension()` \f$ \geq1\f$ and `e` is finite. -*/ -Segment segment(const Edge & e) const; +Returns the line segment formed by the vertices of `e`. +\pre `t.dimension()` \f$ \geq1\f$ and `e` is finite. +*/ +Segment segment(const Edge & e) const; /*! -Same as the previous method for edge `(c,i,j)`. -\pre As above and \f$ i\neq j\f$. Moreover \f$ i,j \in\{0,1,2,3\}\f$ in dimension 3, \f$ i,j \in\{0,1,2\}\f$ in dimension 2, \f$ i,j \in\{0,1\}\f$ in dimension 1, and the edge is finite. -*/ -Segment segment(Cell_handle c, int i, int j) const; +Same as the previous method for edge `(c,i,j)`. +\pre As above and \f$ i\neq j\f$. Moreover \f$ i,j \in\{0,1,2,3\}\f$ in dimension 3, \f$ i,j \in\{0,1,2\}\f$ in dimension 2, \f$ i,j \in\{0,1\}\f$ in dimension 1, and the edge is finite. +*/ +Segment segment(Cell_handle c, int i, int j) const; /*! -Returns the point given by vertex `i` of cell `c`. -\pre `t.dimension()` \f$ \geq0\f$ and \f$ i \in\{0,1,2,3\}\f$ in dimension 3, \f$ i \in\{0,1,2\}\f$ in dimension 2, \f$ i \in\{0,1\}\f$ in dimension 1, \f$ i = 0\f$ in dimension 0, and the vertex is finite. -*/ -const Point & point(Cell_handle c, int i) const; +Returns the point given by vertex `i` of cell `c`. +\pre `t.dimension()` \f$ \geq0\f$ and \f$ i \in\{0,1,2,3\}\f$ in dimension 3, \f$ i \in\{0,1,2\}\f$ in dimension 2, \f$ i \in\{0,1\}\f$ in dimension 1, \f$ i = 0\f$ in dimension 0, and the vertex is finite. +*/ +const Point & point(Cell_handle c, int i) const; /*! -Same as the previous method for vertex `v`. -\pre `t.dimension()` \f$ \geq0\f$ and the vertex is finite. -*/ -const Point & point(Vertex_handle v) const; +Same as the previous method for vertex `v`. +\pre `t.dimension()` \f$ \geq0\f$ and the vertex is finite. +*/ +const Point & point(Vertex_handle v) const; -/// @} +/// @} -/// \name Tests for Finite and Infinite Vertices and Faces +/// \name Tests for Finite and Infinite Vertices and Faces /// @{ /*! -`true`, iff vertex `v` is the infinite vertex. -*/ -bool is_infinite(Vertex_handle v) const; +`true`, iff vertex `v` is the infinite vertex. +*/ +bool is_infinite(Vertex_handle v) const; /*! -`true`, iff `c` is incident to the infinite vertex. -\pre `t.dimension() == 3`. -*/ -bool is_infinite(Cell_handle c) const; +`true`, iff `c` is incident to the infinite vertex. +\pre `t.dimension() == 3`. +*/ +bool is_infinite(Cell_handle c) const; /*! -`true`, iff the facet `i` of cell `c` is incident to the -infinite vertex. -\pre `t.dimension()` \f$ \geq2\f$ and \f$ i\in\{0,1,2,3\}\f$ in dimension 3, \f$ i=3\f$ in dimension 2. -*/ -bool is_infinite(Cell_handle c, int i) const; +`true`, iff the facet `i` of cell `c` is incident to the +infinite vertex. +\pre `t.dimension()` \f$ \geq2\f$ and \f$ i\in\{0,1,2,3\}\f$ in dimension 3, \f$ i=3\f$ in dimension 2. +*/ +bool is_infinite(Cell_handle c, int i) const; /*! -`true` iff facet `f` is incident to the infinite vertex. -\pre `t.dimension()` \f$ \geq2\f$. -*/ -bool is_infinite(const Facet & f) const; +`true` iff facet `f` is incident to the infinite vertex. +\pre `t.dimension()` \f$ \geq2\f$. +*/ +bool is_infinite(const Facet & f) const; /*! -`true`, iff the edge `(i,j)` of cell `c` is incident to -the infinite vertex. -\pre `t.dimension()` \f$ \geq1\f$ and \f$ i\neq j\f$. Moreover \f$ i,j \in\{0,1,2,3\}\f$ in dimension 3, \f$ i,j \in\{0,1,2\}\f$ in dimension 2, \f$ i,j \in\{0,1\}\f$ in dimension 1. -*/ -bool is_infinite(Cell_handle c, int i, int j) const; +`true`, iff the edge `(i,j)` of cell `c` is incident to +the infinite vertex. +\pre `t.dimension()` \f$ \geq1\f$ and \f$ i\neq j\f$. Moreover \f$ i,j \in\{0,1,2,3\}\f$ in dimension 3, \f$ i,j \in\{0,1,2\}\f$ in dimension 2, \f$ i,j \in\{0,1\}\f$ in dimension 1. +*/ +bool is_infinite(Cell_handle c, int i, int j) const; /*! -`true` iff edge `e` is incident to the infinite vertex. -\pre `t.dimension()` \f$ \geq1\f$. -*/ -bool is_infinite(const Edge & e) const; +`true` iff edge `e` is incident to the infinite vertex. +\pre `t.dimension()` \f$ \geq1\f$. +*/ +bool is_infinite(const Edge & e) const; -/// @} +/// @} -/// \name Queries +/// \name Queries /// @{ /*! -Tests whether `p` is a vertex of `t` by locating `p` in -the triangulation. If `p` is found, the associated vertex `v` -is given. -*/ -bool is_vertex(const Point & p, Vertex_handle & v) const; +Tests whether `p` is a vertex of `t` by locating `p` in +the triangulation. If `p` is found, the associated vertex `v` +is given. +*/ +bool is_vertex(const Point & p, Vertex_handle & v) const; /*! -Tests whether `v` is a vertex of `t`. -*/ -bool is_vertex(Vertex_handle v) const; +Tests whether `v` is a vertex of `t`. +*/ +bool is_vertex(Vertex_handle v) const; /*! -Tests whether `(u,v)` is an edge of `t`. If the edge is found, -it gives a cell `c` having this edge and the indices `i` -and `j` of the vertices `u` and `v` in `c`, in this order. -\pre `u` and `v` are vertices of `t`. -*/ -bool is_edge(Vertex_handle u, Vertex_handle v, -Cell_handle & c, int & i, int & j) const; +Tests whether `(u,v)` is an edge of `t`. If the edge is found, +it gives a cell `c` having this edge and the indices `i` +and `j` of the vertices `u` and `v` in `c`, in this order. +\pre `u` and `v` are vertices of `t`. +*/ +bool is_edge(Vertex_handle u, Vertex_handle v, +Cell_handle & c, int & i, int & j) const; /*! -Tests whether `(u,v,w)` is a facet of `t`. If the facet is found, -it computes a cell `c` having this facet and the indices `i`, -`j` and `k` of the vertices `u`, `v` and `w` in `c`, -in this order. -\pre `u`, `v` and `w` are vertices of `t`. -*/ -bool is_facet(Vertex_handle u, Vertex_handle v, Vertex_handle w, -Cell_handle & c, int & i, int & j, int & k) const; +Tests whether `(u,v,w)` is a facet of `t`. If the facet is found, +it computes a cell `c` having this facet and the indices `i`, +`j` and `k` of the vertices `u`, `v` and `w` in `c`, +in this order. +\pre `u`, `v` and `w` are vertices of `t`. +*/ +bool is_facet(Vertex_handle u, Vertex_handle v, Vertex_handle w, +Cell_handle & c, int & i, int & j, int & k) const; /*! -Tests whether `c` is a cell of `t`. -*/ -bool is_cell(Cell_handle c) const; +Tests whether `c` is a cell of `t`. +*/ +bool is_cell(Cell_handle c) const; /*! -Tests whether `(u,v,w,x)` is a cell of `t`. -If the cell `c` is found, the method -computes the indices `i`, `j`, `k` and `l` of the -vertices `u`, `v`, `w` and `x` in `c`, in this -order. -\pre `u`, `v`, `w` and `x` are vertices of `t`. -*/ -bool is_cell(Vertex_handle u, Vertex_handle v, -Vertex_handle w, Vertex_handle x, -Cell_handle & c, -int & i, int & j, int & k, int & l) const; +Tests whether `(u,v,w,x)` is a cell of `t`. +If the cell `c` is found, the method +computes the indices `i`, `j`, `k` and `l` of the +vertices `u`, `v`, `w` and `x` in `c`, in this +order. +\pre `u`, `v`, `w` and `x` are vertices of `t`. +*/ +bool is_cell(Vertex_handle u, Vertex_handle v, +Vertex_handle w, Vertex_handle x, +Cell_handle & c, +int & i, int & j, int & k, int & l) const; /*! -Tests whether `(u,v,w,x)` is a cell of `t` and computes -this cell `c`. -\pre `u`, `v`, `w` and `x` are vertices of `t`. -*/ -bool is_cell(Vertex_handle u, Vertex_handle v, -Vertex_handle w, Vertex_handle x, -Cell_handle & c) const; +Tests whether `(u,v,w,x)` is a cell of `t` and computes +this cell `c`. +\pre `u`, `v`, `w` and `x` are vertices of `t`. +*/ +bool is_cell(Vertex_handle u, Vertex_handle v, +Vertex_handle w, Vertex_handle x, +Cell_handle & c) const; /// @} /*! \name -There is a method `has_vertex()` in the cell class. The analogous methods for facets are defined here. +There is a method `has_vertex()` in the cell class. The analogous methods for facets are defined here. */ /// @{ /*! -If `v` is a vertex of `f`, then `j` is the index of -`v` in the cell `f.first`, and the method returns `true`. +If `v` is a vertex of `f`, then `j` is the index of +`v` in the cell `f.first`, and the method returns `true`. \pre `t.dimension() == 3` -*/ -bool has_vertex(const Facet & f, Vertex_handle v, int & j) const; +*/ +bool has_vertex(const Facet & f, Vertex_handle v, int & j) const; /*! -Same for facet `(c,i)`. Computes the index `j` of `v` in -`c`. -*/ -bool has_vertex(Cell_handle c, int i, -Vertex_handle v, int & j) const; +Same for facet `(c,i)`. Computes the index `j` of `v` in +`c`. +*/ +bool has_vertex(Cell_handle c, int i, +Vertex_handle v, int & j) const; /*! -*/ -bool has_vertex(const Facet & f, Vertex_handle v) const; +*/ +bool has_vertex(const Facet & f, Vertex_handle v) const; /*! -Same as the first two methods, but these two methods do not return the -index of the vertex. -*/ -bool has_vertex(Cell_handle c, int i, Vertex_handle v) const; +Same as the first two methods, but these two methods do not return the +index of the vertex. +*/ +bool has_vertex(Cell_handle c, int i, Vertex_handle v) const; /// @} /*! \name -The following three methods test whether two facets have the same vertices. +The following three methods test whether two facets have the same vertices. */ /// @{ /*! -*/ -bool are_equal(Cell_handle c, int i, Cell_handle n, int j) const; +*/ +bool are_equal(Cell_handle c, int i, Cell_handle n, int j) const; /*! -*/ -bool are_equal(const Facet & f, const Facet & g) const; +*/ +bool are_equal(const Facet & f, const Facet & g) const; /*! -For these three methods: \pre `t.dimension() == 3`. -*/ -bool are_equal(const Facet & f, Cell_handle n, int j) const; +For these three methods: \pre `t.dimension() == 3`. +*/ +bool are_equal(const Facet & f, Cell_handle n, int j) const; -/// @} +/// @} -/// \name Point Location +/// \name Point Location /// The class `Triangulation_3` provides two functions to locate a given point with respect to a triangulation. It provides also functions to test if a given point is inside a finite face or not. Note that the class `Delaunay_triangulation_3` also provides a `nearest_vertex()` function. /// @{ /*! -If the point `query` lies inside the convex hull of the points, the cell -that contains the query in its interior is returned. If `query` lies on a -facet, an edge or on a vertex, one of the cells having `query` on -its boundary is returned. +If the point `query` lies inside the convex hull of the points, the cell +that contains the query in its interior is returned. If `query` lies on a +facet, an edge or on a vertex, one of the cells having `query` on +its boundary is returned. -If the point `query` lies outside the convex hull of the points, -an infinite cell with vertices \f$ \{ p, q, r, \infty\}\f$ is returned such that -the tetrahedron \f$ ( p, q, r, query )\f$ is positively oriented -(the rest of the triangulation lies on the other side of facet -\f$ ( p, q, r )\f$). +If the point `query` lies outside the convex hull of the points, +an infinite cell with vertices \f$ \{ p, q, r, \infty\}\f$ is returned such that +the tetrahedron \f$ ( p, q, r, query )\f$ is positively oriented +(the rest of the triangulation lies on the other side of facet +\f$ ( p, q, r )\f$). -Note that locate works even in degenerate dimensions: in dimension 2 -(resp. 1, 0) the `Cell_handle` returned is the one that represents -the facet (resp. edge, vertex) containing the query point. +Note that locate works even in degenerate dimensions: in dimension 2 +(resp. 1, 0) the `Cell_handle` returned is the one that represents +the facet (resp. edge, vertex) containing the query point. -The optional argument `start` is used as a starting place for the search. +The optional argument `start` is used as a starting place for the search. The optional argument `could_lock_zone` is used by the concurrency-safe version of the triangulation. When the pointer is not null, the locate will try to lock all the cells along the walk. If it succeeds, `*could_lock_zone` is `true`, otherwise it is false. In any case, the locked cells are not unlocked by `locate`, leaving this choice to the user. -*/ -Cell_handle +*/ +Cell_handle locate(const Point & query, Cell_handle start = Cell_handle(), - bool *could_lock_zone = nullptr) const; + bool *could_lock_zone = nullptr) const; /*! -Same as above but uses `hint` as the starting place for the search. -*/ -Cell_handle +Same as above but uses `hint` as the starting place for the search. +*/ +Cell_handle locate(const Point & query, Vertex_handle hint, - bool *could_lock_zone = nullptr) const; + bool *could_lock_zone = nullptr) const; /*! -Same as `locate()` but uses inexact predicates. +Same as `locate()` but uses inexact predicates. This function returns a handle on a cell that is a good approximation of the exact -location of `query`, while being faster. Note that it may return a handle on a cell +location of `query`, while being faster. Note that it may return a handle on a cell whose interior does not contain `query`. When the triangulation has dimension smaller than 3, `start` is returned. @@ -740,136 +740,136 @@ Cell_handle inexact_locate(const Point & query, Cell_handle start = Cell_handle()) const; /*! -If `query` lies inside the affine hull of the points, the \f$ k\f$-face -(finite or infinite) that contains `query` in its interior is -returned, by means of the cell returned together with `lt`, which -is set to the locate type of the query (`VERTEX, EDGE, FACET, CELL`, or `OUTSIDE_CONVEX_HULL` if the cell is infinite and `query` -lies strictly in it) and two indices `li` and `lj` that -specify the \f$ k\f$-face of the cell containing `query`. +If `query` lies inside the affine hull of the points, the \f$ k\f$-face +(finite or infinite) that contains `query` in its interior is +returned, by means of the cell returned together with `lt`, which +is set to the locate type of the query (`VERTEX, EDGE, FACET, CELL`, or `OUTSIDE_CONVEX_HULL` if the cell is infinite and `query` +lies strictly in it) and two indices `li` and `lj` that +specify the \f$ k\f$-face of the cell containing `query`. -If the \f$ k\f$-face is a cell, `li` and `lj` have no -meaning; if it is a facet (resp. vertex), `li` gives the index of -the facet (resp. vertex) and `lj` has no meaning; if it is and -edge, `li` and `lj` give the indices of its vertices. +If the \f$ k\f$-face is a cell, `li` and `lj` have no +meaning; if it is a facet (resp. vertex), `li` gives the index of +the facet (resp. vertex) and `lj` has no meaning; if it is and +edge, `li` and `lj` give the indices of its vertices. -If the point `query` lies outside the affine hull of the points, -which can happen in case of degenerate dimensions, `lt` is set to -`OUTSIDE_AFFINE_HULL`, and the cell returned has no meaning. -As a particular case, if there is no finite vertex yet in the -triangulation, `lt` is set to `OUTSIDE_AFFINE_HULL` and -locate returns the default constructed handle. +If the point `query` lies outside the affine hull of the points, +which can happen in case of degenerate dimensions, `lt` is set to +`OUTSIDE_AFFINE_HULL`, and the cell returned has no meaning. +As a particular case, if there is no finite vertex yet in the +triangulation, `lt` is set to `OUTSIDE_AFFINE_HULL` and +locate returns the default constructed handle. -The optional argument `start` is used as a starting place for the search. +The optional argument `start` is used as a starting place for the search. The optional argument `could_lock_zone` is used by the concurrency-safe version of the triangulation. When the pointer is not null, the locate will try to lock all the cells along the walk. If it succeeds, `*could_lock_zone` is `true`, otherwise it is false. In any case, the locked cells are not unlocked by `locate`, leaving this choice to the user. -*/ -Cell_handle -locate(const Point & query, Locate_type & lt, +*/ +Cell_handle +locate(const Point & query, Locate_type & lt, int & li, int & lj, Cell_handle start = Cell_handle(), -bool *could_lock_zone = nullptr ) const; +bool *could_lock_zone = nullptr ) const; /*! -Same as above but uses `hint` as the starting place for the search. -*/ -Cell_handle -locate(const Point & query, Locate_type & lt, +Same as above but uses `hint` as the starting place for the search. +*/ +Cell_handle +locate(const Point & query, Locate_type & lt, int & li, int & lj, Vertex_handle hint, -bool *could_lock_zone = nullptr) const; +bool *could_lock_zone = nullptr) const; /*! -Returns a value indicating on which side of the oriented boundary -of `c` the point `p` lies. More precisely, it returns: +Returns a value indicating on which side of the oriented boundary +of `c` the point `p` lies. More precisely, it returns: -- `ON_BOUNDED_SIDE` if `p` is inside the cell. For an infinite -cell this means that `p` lies strictly in the half space limited by -its finite facet and not containing any other point of the triangulation. +- `ON_BOUNDED_SIDE` if `p` is inside the cell. For an infinite +cell this means that `p` lies strictly in the half space limited by +its finite facet and not containing any other point of the triangulation. -- `ON_BOUNDARY` if p on the boundary of the cell. For an infinite -cell this means that `p` lies on the finite facet. Then -`lt` together with `li` and `lj` give the precise location -on the boundary. (See the descriptions of the locate methods.) +- `ON_BOUNDARY` if p on the boundary of the cell. For an infinite +cell this means that `p` lies on the finite facet. Then +`lt` together with `li` and `lj` give the precise location +on the boundary. (See the descriptions of the locate methods.) -- `ON_UNBOUNDED_SIDE` if `p` lies outside the cell. For an -infinite cell this means that `p` does not satisfy either of the -two previous conditions. -\pre `t.dimension() == 3` -*/ -Bounded_side -side_of_cell(const Point & p, -Cell_handle c, -Locate_type & lt, int & li, int & lj) const; +- `ON_UNBOUNDED_SIDE` if `p` lies outside the cell. For an +infinite cell this means that `p` does not satisfy either of the +two previous conditions. +\pre `t.dimension() == 3` +*/ +Bounded_side +side_of_cell(const Point & p, +Cell_handle c, +Locate_type & lt, int & li, int & lj) const; /*! -Returns a value indicating on which side of the oriented boundary -of `f` the point `p` lies: +Returns a value indicating on which side of the oriented boundary +of `f` the point `p` lies: -- `ON_BOUNDED_SIDE` if `p` is inside the facet. For an -infinite facet this means that `p` lies strictly in the half plane -limited by its finite edge and not containing any other point of the -triangulation . +- `ON_BOUNDED_SIDE` if `p` is inside the facet. For an +infinite facet this means that `p` lies strictly in the half plane +limited by its finite edge and not containing any other point of the +triangulation . -- `ON_BOUNDARY` if `p` is on the boundary of the facet. -For an infinite facet this means that `p` lies on the finite -edge. `lt`, `li` and `lj` give the precise location of -`p` on the boundary of the facet. `li` and `lj` refer to -indices in the degenerate cell `c` representing `f`. +- `ON_BOUNDARY` if `p` is on the boundary of the facet. +For an infinite facet this means that `p` lies on the finite +edge. `lt`, `li` and `lj` give the precise location of +`p` on the boundary of the facet. `li` and `lj` refer to +indices in the degenerate cell `c` representing `f`. -- `ON_UNBOUNDED_SIDE` if `p` lies outside the facet. For -an infinite facet this means that `p` does not satisfy either of -the two previous conditions. +- `ON_UNBOUNDED_SIDE` if `p` lies outside the facet. For +an infinite facet this means that `p` does not satisfy either of +the two previous conditions. -\pre `t.dimension() == 2` and `p` lies in the plane containing the triangulation. `f.second` \f$ =3\f$ (in dimension 2 there is only one facet per cell). -*/ -Bounded_side -side_of_facet(const Point & p, -const Facet & f, -Locate_type & lt, int & li, int & lj) const; +\pre `t.dimension() == 2` and `p` lies in the plane containing the triangulation. `f.second` \f$ =3\f$ (in dimension 2 there is only one facet per cell). +*/ +Bounded_side +side_of_facet(const Point & p, +const Facet & f, +Locate_type & lt, int & li, int & lj) const; /*! -Same as the previous method for the facet `(c,3)`. -*/ -Bounded_side -side_of_facet(const Point & p, -Cell_handle c, -Locate_type & lt, int & li, int & lj) const; +Same as the previous method for the facet `(c,3)`. +*/ +Bounded_side +side_of_facet(const Point & p, +Cell_handle c, +Locate_type & lt, int & li, int & lj) const; /*! -Returns a value indicating on which side of the oriented boundary -of `e` the point `p` lies: +Returns a value indicating on which side of the oriented boundary +of `e` the point `p` lies: -- `ON_BOUNDED_SIDE` if `p` is inside the edge. For an -infinite edge this means that `p` lies in the half line defined by -the vertex and not containing any other point of the triangulation. +- `ON_BOUNDED_SIDE` if `p` is inside the edge. For an +infinite edge this means that `p` lies in the half line defined by +the vertex and not containing any other point of the triangulation. -- `ON_BOUNDARY` if `p` equals one of the vertices, -`li` give the index of the vertex in the cell storing `e` +- `ON_BOUNDARY` if `p` equals one of the vertices, +`li` give the index of the vertex in the cell storing `e` -- `ON_UNBOUNDED_SIDE` if `p` lies outside the edge. For -an infinite edge this means that `p` lies on the other half line, -which contains the other points of the triangulation. -\pre `t.dimension() == 1` and `p` is collinear with the points of the triangulation. `e.second == 0` and `e.third` \f$ =1\f$ (in dimension 1 there is only one edge per cell). -*/ -Bounded_side -side_of_edge(const Point & p, -const Edge & e, -Locate_type & lt, int & li) const; +- `ON_UNBOUNDED_SIDE` if `p` lies outside the edge. For +an infinite edge this means that `p` lies on the other half line, +which contains the other points of the triangulation. +\pre `t.dimension() == 1` and `p` is collinear with the points of the triangulation. `e.second == 0` and `e.third` \f$ =1\f$ (in dimension 1 there is only one edge per cell). +*/ +Bounded_side +side_of_edge(const Point & p, +const Edge & e, +Locate_type & lt, int & li) const; /*! -Same as the previous method for edge \f$ (c,0,1)\f$. -*/ -Bounded_side -side_of_edge(const Point & p, -Cell_handle c, -Locate_type & lt, int & li) const; +Same as the previous method for edge \f$ (c,0,1)\f$. +*/ +Bounded_side +side_of_edge(const Point & p, +Cell_handle c, +Locate_type & lt, int & li) const; -/// @} +/// @} -/*! \name Flips +/*! \name Flips Two kinds of flips exist for a three-dimensional triangulation. They are reciprocal. To be flipped, an edge must be incident to three @@ -880,7 +880,7 @@ facets is shaded. On the right, the facet shared by the two new tetrahedra is shaded. Flips are possible only under the following conditions: - the edge or facet to be flipped is not on the boundary of the convex hull of the triangulation - the five points involved are -in convex position. +in convex position. \cgalFigureBegin{Triangulation3figflips, flips.png} Flips @@ -895,131 +895,131 @@ triangulation. Flips for a 2d triangulation are not implemented yet. /*! -*/ -bool flip(Edge e); +*/ +bool flip(Edge e); /*! -Before flipping, these methods check that edge `e=(c,i,j)` is -flippable (which is quite expensive). They return `false` or -`true` according to this test. -*/ -bool flip(Cell_handle c, int i, int j); +Before flipping, these methods check that edge `e=(c,i,j)` is +flippable (which is quite expensive). They return `false` or +`true` according to this test. +*/ +bool flip(Cell_handle c, int i, int j); /*! -*/ -void flip_flippable(Edge e); +*/ +void flip_flippable(Edge e); /*! -Should be preferred to the previous methods when the edge is -known to be flippable. -\pre The edge is flippable. -*/ -void flip_flippable(Cell_handle c, int i, int j); +Should be preferred to the previous methods when the edge is +known to be flippable. +\pre The edge is flippable. +*/ +void flip_flippable(Cell_handle c, int i, int j); /*! -*/ -bool flip(Facet f); +*/ +bool flip(Facet f); /*! -Before flipping, these methods check that facet `f=(c,i)` is -flippable (which is quite expensive). They return `false` or -`true` according to this test. -*/ -bool flip(Cell_handle c, int i); +Before flipping, these methods check that facet `f=(c,i)` is +flippable (which is quite expensive). They return `false` or +`true` according to this test. +*/ +bool flip(Cell_handle c, int i); /*! -*/ -void flip_flippable(Facet f); +*/ +void flip_flippable(Facet f); /*! -Should be preferred to the previous methods when the facet is -known to be flippable. -\pre The facet is flippable. -*/ -void flip_flippable(Cell_handle c, int i); +Should be preferred to the previous methods when the facet is +known to be flippable. +\pre The facet is flippable. +*/ +void flip_flippable(Cell_handle c, int i); -/// @} +/// @} -/// \name Insertions +/// \name Insertions /// The following operations are guaranteed to lead to a valid triangulation when they are applied on a valid triangulation. /// @{ /*! Inserts the point `p` in the triangulation and returns the corresponding -vertex. +vertex. -If point `p` coincides with an already existing vertex, this -vertex is returned and the triangulation remains unchanged. +If point `p` coincides with an already existing vertex, this +vertex is returned and the triangulation remains unchanged. -If point `p` lies in the convex hull of the points, it is added -naturally: if it lies inside a cell, the cell is split into four -cells, if it lies on a facet, the two incident cells are split into -three cells, if it lies on an edge, all the cells incident to this -edge are split into two cells. +If point `p` lies in the convex hull of the points, it is added +naturally: if it lies inside a cell, the cell is split into four +cells, if it lies on a facet, the two incident cells are split into +three cells, if it lies on an edge, all the cells incident to this +edge are split into two cells. -If point `p` is strictly outside the convex hull but in the affine -hull, `p` is linked to all visible points on the convex hull to -form the new triangulation. See -Figure \ref Triangulation3figinsert_outside_convex_hull. +If point `p` is strictly outside the convex hull but in the affine +hull, `p` is linked to all visible points on the convex hull to +form the new triangulation. See +Figure \ref Triangulation3figinsert_outside_convex_hull. -If point `p` is outside the affine hull of the points, `p` is -linked to all the points, and the dimension of the triangulation is -incremented. All the points now belong to the boundary of the convex -hull, so, the infinite vertex is linked to all the points to -triangulate the new infinite face. See -Figure \ref Triangulation3figinsert_outside_affine_hull. -The optional argument `start` is used as a starting place for the search. -*/ -Vertex_handle insert(const Point & p, -Cell_handle start = Cell_handle() ); +If point `p` is outside the affine hull of the points, `p` is +linked to all the points, and the dimension of the triangulation is +incremented. All the points now belong to the boundary of the convex +hull, so, the infinite vertex is linked to all the points to +triangulate the new infinite face. See +Figure \ref Triangulation3figinsert_outside_affine_hull. +The optional argument `start` is used as a starting place for the search. +*/ +Vertex_handle insert(const Point & p, +Cell_handle start = Cell_handle() ); /*! -Same as above but uses `hint` as the starting place for the search. -*/ -Vertex_handle insert(const Point & p, Vertex_handle hint); +Same as above but uses `hint` as the starting place for the search. +*/ +Vertex_handle insert(const Point & p, Vertex_handle hint); /*! Inserts the point `p` in the triangulation and returns the corresponding -vertex. Similar to the above `insert()` function, but takes as additional -parameter the return values of a previous location query. See description of -locate() above. -*/ -Vertex_handle insert(const Point & p, Locate_type lt, -Cell_handle loc, int li, int lj); +vertex. Similar to the above `insert()` function, but takes as additional +parameter the return values of a previous location query. See description of +locate() above. +*/ +Vertex_handle insert(const Point & p, Locate_type lt, +Cell_handle loc, int li, int lj); /*! Inserts the points in the range `[first,last)` in the given order, -and returns the number of inserted points. +and returns the number of inserted points. -*/ -template < class PointInputIterator > -std::ptrdiff_t -insert(PointInputIterator first, PointInputIterator last); +*/ +template < class PointInputIterator > +std::ptrdiff_t +insert(PointInputIterator first, PointInputIterator last); /*! Inserts the points in the iterator range `[first,last)` in the given order, -and returns the number of inserted points. +and returns the number of inserted points. -Given a pair `(p,i)`, the vertex `v` storing `p` also stores `i`, that is -`v.point() == p` and `v.info() == i`. If several pairs have the same point, -only one vertex is created, and one of the objects of type `Vertex::Info` will be stored in the vertex. -\pre `Vertex` must be model of the concept `TriangulationVertexBaseWithInfo_3`. +Given a pair `(p,i)`, the vertex `v` storing `p` also stores `i`, that is +`v.point() == p` and `v.info() == i`. If several pairs have the same point, +only one vertex is created, and one of the objects of type `Vertex::Info` will be stored in the vertex. +\pre `Vertex` must be model of the concept `TriangulationVertexBaseWithInfo_3`. -\tparam PointWithInfoInputIterator must be an input iterator with the value type `std::pair`. +\tparam PointWithInfoInputIterator must be an input iterator with the value type `std::pair`. -*/ -template < class PointWithInfoInputIterator > -std::ptrdiff_t -insert(PointWithInfoInputIterator first, PointWithInfoInputIterator last); +*/ +template < class PointWithInfoInputIterator > +std::ptrdiff_t +insert(PointWithInfoInputIterator first, PointWithInfoInputIterator last); -/// @} +/// @} -/*! \name +/*! \name We also provide some other methods that can be used instead of `Triangulatation_3::insert()` when the place where the new point must be inserted is already known. They are also guaranteed to lead to a @@ -1029,210 +1029,210 @@ valid triangulation when they are applied on a valid triangulation. /// @{ /*! Inserts the point `p` in the cell `c`. The cell `c` is split into 4 -tetrahedra. -\pre `t.dimension() == 3` and `p` lies strictly inside cell `c`. -*/ -Vertex_handle insert_in_cell(const Point & p, Cell_handle c); +tetrahedra. +\pre `t.dimension() == 3` and `p` lies strictly inside cell `c`. +*/ +Vertex_handle insert_in_cell(const Point & p, Cell_handle c); /*! Inserts the point `p` in the facet `f`. In dimension 3, the 2 -neighboring cells are split into 3 tetrahedra; in dimension 2, the facet -is split into 3 triangles. -\pre `t.dimension()` \f$ \geq2\f$ and `p` lies strictly inside face `f`. -*/ -Vertex_handle insert_in_facet(const Point & p, const Facet & f); +neighboring cells are split into 3 tetrahedra; in dimension 2, the facet +is split into 3 triangles. +\pre `t.dimension()` \f$ \geq2\f$ and `p` lies strictly inside face `f`. +*/ +Vertex_handle insert_in_facet(const Point & p, const Facet & f); /*! As above, insertion in the facet `(c,i)`. -\pre As above and \f$ i \in\{0,1,2,3\}\f$ in dimension 3, \f$ i = 3\f$ in dimension 2. -*/ -Vertex_handle insert_in_facet(const Point & p, -Cell_handle c, int i); +\pre As above and \f$ i \in\{0,1,2,3\}\f$ in dimension 3, \f$ i = 3\f$ in dimension 2. +*/ +Vertex_handle insert_in_facet(const Point & p, +Cell_handle c, int i); /*! Inserts `p` in the edge `e`. In dimension 3, -all the cells having this edge are split into 2 tetrahedra; in -dimension 2, the 2 neighboring facets are split into 2 triangles; in -dimension 1, the edge is split into 2 edges. -\pre `t.dimension()` \f$ \geq1\f$ and `p` lies on edge `e`. -*/ -Vertex_handle insert_in_edge(const Point & p, const Edge & e); +all the cells having this edge are split into 2 tetrahedra; in +dimension 2, the 2 neighboring facets are split into 2 triangles; in +dimension 1, the edge is split into 2 edges. +\pre `t.dimension()` \f$ \geq1\f$ and `p` lies on edge `e`. +*/ +Vertex_handle insert_in_edge(const Point & p, const Edge & e); /*! As above, inserts `p` in the edge \f$ (i, j)\f$ of `c`. -\pre As above and \f$ i\neq j\f$. Moreover \f$ i,j \in\{0,1,2,3\}\f$ in dimension 3, \f$ i,j \in\{0,1,2\}\f$ in dimension 2, \f$ i,j \in\{0,1\}\f$ in dimension 1. -*/ +\pre As above and \f$ i\neq j\f$. Moreover \f$ i,j \in\{0,1,2,3\}\f$ in dimension 3, \f$ i,j \in\{0,1,2\}\f$ in dimension 2, \f$ i,j \in\{0,1\}\f$ in dimension 1. +*/ Vertex_handle insert_in_edge(const Point& p, Cell_handle c, int i, int j); /*! -The cell `c` must be an infinite cell containing `p`. +The cell `c` must be an infinite cell containing `p`. -Links `p` to all points in the triangulation that are visible from -`p`. Updates consequently the infinite faces. See -Figure \ref Triangulation3figinsert_outside_convex_hull. -\pre `t.dimension() > 0`, `c`, and the \f$ k\f$-face represented by `c` is infinite and contains `t`. +Links `p` to all points in the triangulation that are visible from +`p`. Updates consequently the infinite faces. See +Figure \ref Triangulation3figinsert_outside_convex_hull. +\pre `t.dimension() > 0`, `c`, and the \f$ k\f$-face represented by `c` is infinite and contains `t`. \anchor Triangulation3figinsert_outside_convex_hull \image html insert_outside_convex_hull.png "insert_outside_convex_hull() (2-dimensional case)" \image latex insert_outside_convex_hull.png "insert_outside_convex_hull() (2-dimensional case)" -*/ -Vertex_handle insert_outside_convex_hull(const Point & p, -Cell_handle c); +*/ +Vertex_handle insert_outside_convex_hull(const Point & p, +Cell_handle c); /*! -`p` is linked to all the points, and the infinite vertex is linked -to all the points (including `p`) to triangulate the new infinite -face, so that all the points now belong to the boundary of the convex -hull. See Figure \ref Triangulation3figinsert_outside_affine_hull. +`p` is linked to all the points, and the infinite vertex is linked +to all the points (including `p`) to triangulate the new infinite +face, so that all the points now belong to the boundary of the convex +hull. See Figure \ref Triangulation3figinsert_outside_affine_hull. -This method can be used to insert the first point in an empty -triangulation. -\pre `t.dimension() < 3` and `p` lies outside the affine hull of the points. +This method can be used to insert the first point in an empty +triangulation. +\pre `t.dimension() < 3` and `p` lies outside the affine hull of the points. \anchor Triangulation3figinsert_outside_affine_hull \image html insert_outside_affine_hull.png "insert_outside_affine_hull() (2-dimensional case)" \image latex insert_outside_affine_hull.png "insert_outside_affine_hull() (2-dimensional case)" -*/ -Vertex_handle insert_outside_affine_hull(const Point & p); +*/ +Vertex_handle insert_outside_affine_hull(const Point & p); /*! -Creates a new vertex by starring a hole. It takes an iterator range -`[cell_begin,cell_end)` of `Cell_handle`s which specifies -a hole: a set of connected cells (resp. facets in dimension 2) which is -star-shaped wrt `p`. -(`begin`, `i`) is a facet (resp. an edge) on the boundary of the hole, -that is, `begin` belongs to the set of cells (resp. facets) previously -described, and `begin->neighbor(i)` does not. Then this function deletes -all the cells (resp. facets) describing the hole, creates a new vertex -`v`, and for each facet (resp. edge) on the boundary of the hole, creates -a new cell (resp. facet) with `v` as vertex. Then `v->set_point(p)` -is called and `v` is returned. +Creates a new vertex by starring a hole. It takes an iterator range +`[cell_begin,cell_end)` of `Cell_handle`s which specifies +a hole: a set of connected cells (resp. facets in dimension 2) which is +star-shaped wrt `p`. +(`begin`, `i`) is a facet (resp. an edge) on the boundary of the hole, +that is, `begin` belongs to the set of cells (resp. facets) previously +described, and `begin->neighbor(i)` does not. Then this function deletes +all the cells (resp. facets) describing the hole, creates a new vertex +`v`, and for each facet (resp. edge) on the boundary of the hole, creates +a new cell (resp. facet) with `v` as vertex. Then `v->set_point(p)` +is called and `v` is returned. -This operation is equivalent to calling -`tds().insert_in_hole(cell_begin, cell_end, begin, i); v->set_point(p)`. -\pre `t.dimension()` \f$ \geq2\f$, the set of cells (resp. facets in dimension 2) is connected, its boundary is connected, and `p` lies inside the hole, which is star-shaped wrt `p`. -*/ -template +This operation is equivalent to calling +`tds().insert_in_hole(cell_begin, cell_end, begin, i); v->set_point(p)`. +\pre `t.dimension()` \f$ \geq2\f$, the set of cells (resp. facets in dimension 2) is connected, its boundary is connected, and `p` lies inside the hole, which is star-shaped wrt `p`. +*/ +template Vertex_handle insert_in_hole(const Point& p, CellIt cell_begin, CellIt cell_end, Cell_handle begin, int i); /*! -Same as above, except that `newv` will be used as the new vertex, which -must have been allocated previously with e.g.\ `create_vertex`. -*/ -template +Same as above, except that `newv` will be used as the new vertex, which +must have been allocated previously with e.g.\ `create_vertex`. +*/ +template Vertex_handle insert_in_hole(const Point& p, CellIt cell_begin, CellIt cell_end, Cell_handle begin, int i, Vertex_handle newv); -/// @} +/// @} -/*! \name Cell, Face, Edge and Vertex Iterators +/*! \name Cell, Face, Edge and Vertex Iterators The following iterators allow the user to visit cells, facets, edges and vertices of the triangulation. These iterators are non-mutable, bidirectional and their value types are respectively `Cell`, `Facet`, `Edge` and `Vertex`. They are all invalidated by any change in the triangulation. */ /// @{ /*! -Starts at an arbitrary finite vertex. Then `++` and `--` will +Starts at an arbitrary finite vertex. Then `++` and `--` will iterate over finite vertices. -*/ -Finite_vertices_iterator finite_vertices_begin() const; +*/ +Finite_vertices_iterator finite_vertices_begin() const; /*! -Past-the-end iterator -*/ -Finite_vertices_iterator finite_vertices_end() const; +Past-the-end iterator +*/ +Finite_vertices_iterator finite_vertices_end() const; /*! -Starts at an arbitrary finite edge. Then `++` and `--` will +Starts at an arbitrary finite edge. Then `++` and `--` will iterate over finite edges. -*/ -Finite_edges_iterator finite_edges_begin() const; +*/ +Finite_edges_iterator finite_edges_begin() const; /*! -Past-the-end iterator -*/ -Finite_edges_iterator finite_edges_end() const; +Past-the-end iterator +*/ +Finite_edges_iterator finite_edges_end() const; /*! -Starts at an arbitrary finite facet. Then `++` and `--` will -iterate over finite facets. Returns `finite_facets_end()` when -`t.dimension() < 2`. -*/ -Finite_facets_iterator finite_facets_begin() const; +Starts at an arbitrary finite facet. Then `++` and `--` will +iterate over finite facets. Returns `finite_facets_end()` when +`t.dimension() < 2`. +*/ +Finite_facets_iterator finite_facets_begin() const; /*! -Past-the-end iterator -*/ -Finite_facets_iterator finite_facets_end() const; +Past-the-end iterator +*/ +Finite_facets_iterator finite_facets_end() const; /*! -Starts at an arbitrary finite cell. Then `++` and `--` will -iterate over finite cells. Returns `finite_cells_end()` when -`t.dimension() < 3`. -*/ -Finite_cells_iterator finite_cells_begin() const; +Starts at an arbitrary finite cell. Then `++` and `--` will +iterate over finite cells. Returns `finite_cells_end()` when +`t.dimension() < 3`. +*/ +Finite_cells_iterator finite_cells_begin() const; /*! -Past-the-end iterator -*/ -Finite_cells_iterator finite_cells_end() const; +Past-the-end iterator +*/ +Finite_cells_iterator finite_cells_end() const; /*! -Starts at an arbitrary vertex. Iterates over all vertices (even the infinite one). -*/ -All_vertices_iterator all_vertices_begin() const; +Starts at an arbitrary vertex. Iterates over all vertices (even the infinite one). +*/ +All_vertices_iterator all_vertices_begin() const; /*! -Past-the-end iterator -*/ -All_vertices_iterator all_vertices_end() const; +Past-the-end iterator +*/ +All_vertices_iterator all_vertices_end() const; /*! -Starts at an arbitrary edge. Iterates over all edges (even infinite -ones). Returns `edges_end()` when `t.dimension() < 1`. -*/ -All_edges_iterator all_edges_begin() const; +Starts at an arbitrary edge. Iterates over all edges (even infinite +ones). Returns `edges_end()` when `t.dimension() < 1`. +*/ +All_edges_iterator all_edges_begin() const; /*! -Past-the-end iterator -*/ -All_edges_iterator all_edges_end() const; +Past-the-end iterator +*/ +All_edges_iterator all_edges_end() const; /*! -Starts at an arbitrary facet. Iterates over all facets (even infinite -ones). Returns `facets_end()` when -`t.dimension() < 2`. -*/ -All_facets_iterator all_facets_begin() const; +Starts at an arbitrary facet. Iterates over all facets (even infinite +ones). Returns `facets_end()` when +`t.dimension() < 2`. +*/ +All_facets_iterator all_facets_begin() const; /*! -Past-the-end iterator -*/ -All_facets_iterator all_facets_end() const; +Past-the-end iterator +*/ +All_facets_iterator all_facets_end() const; /*! -Starts at an arbitrary cell. Iterates over all cells (even infinite -ones). Returns `cells_end()` when -`t.dimension() < 3`. -*/ -All_cells_iterator all_cells_begin() const; +Starts at an arbitrary cell. Iterates over all cells (even infinite +ones). Returns `cells_end()` when +`t.dimension() < 3`. +*/ +All_cells_iterator all_cells_begin() const; /*! -Past-the-end iterator -*/ -All_cells_iterator all_cells_end() const; +Past-the-end iterator +*/ +All_cells_iterator all_cells_end() const; /*! -Iterates over the points of the triangulation. -*/ -Point_iterator points_begin() const; +Iterates over the points of the triangulation. +*/ +Point_iterator points_begin() const; /*! -Past-the-end iterator -*/ -Point_iterator points_end() const; +Past-the-end iterator +*/ +Point_iterator points_end() const; -/// @} +/// @} /*! \name Ranges @@ -1245,59 +1245,59 @@ Note that vertex and cell ranges are special. See Section \ref Triangulation3sec /*! returns a range of iterators over all cells (even the infinite cells). - Returns an empty range when `t.number_of_cells() == 0`. - \note While the value type of `All_cells_iterator` is `Cell`, the value type of + Returns an empty range when `t.number_of_cells() == 0`. + \note While the value type of `All_cells_iterator` is `Cell`, the value type of `All_cell_handles::iterator` is `Cell_handle`. */ All_cell_handles all_cell_handles() const; - - + + /*! returns a range of iterators starting at an arbitrary facet. - Returns an empty range when `t.dimension() < 2`. + Returns an empty range when `t.dimension() < 2`. */ All_facets all_facets() const; - + /*! returns a range of iterators starting at an arbitrary edge. - Returns an empty range when `t.dimension() < 2`. + Returns an empty range when `t.dimension() < 2`. */ All_edges all_edges() const; - + /*! returns a range of iterators over all vertices (even the infinite one). - \note While the value type of `All_vertices_iterator` is `Vertex`, the value type of + \note While the value type of `All_vertices_iterator` is `Vertex`, the value type of `All_vertex_handles::iterator` is `Vertex_handle`. */ All_vertex_handles all_vertex_handles() const; - + /*! returns a range of iterators over finite cells. - Returns an empty range when `t.number_of_cells() == 0`. - \note While the value type of `Finite_cells_iterator` is `Cell`, the value type of + Returns an empty range when `t.number_of_cells() == 0`. + \note While the value type of `Finite_cells_iterator` is `Cell`, the value type of `Finite_cell_handles::iterator` is `Cell_handle`. */ Finite_cell_handles finite_cell_handles() const; - - + + /*! returns a range of iterators starting at an arbitrary facet. - Returns an empty range when `t.dimension() < 2`. + Returns an empty range when `t.dimension() < 2`. */ Finite_facets finite_facets() const; - + /*! returns a range of iterators starting at an arbitrary edge. - Returns an empty range when `t.dimension() < 2`. + Returns an empty range when `t.dimension() < 2`. */ Finite_edges finite_edges() const; - + /*! returns a range of iterators over finite vertices. - \note While the value type of `Finite_vertices_iterator` is `Vertex`, the value type of + \note While the value type of `Finite_vertices_iterator` is `Vertex`, the value type of `Finite_vertex_handles::iterator` is `Vertex_handle`. */ Finite_vertex_handles finite_vertex_handles() const; @@ -1317,8 +1317,8 @@ Segment_traverser_cell_handles segment_traverser_cell_handles() const; */ Segment_traverser_simplices segment_traverser_simplices() const; - -/// @} + +/// @} /*!\name Segment Cell Iterator @@ -1366,7 +1366,7 @@ The remaining incident cells visited make a facet-connected sequence connecting `Segment_cell_iterator` implements the concept `ForwardIterator` and is non-mutable. It is invalidated by any modification of one of the cells traversed. -Its `value_type` is `Cell_handle`. +Its `value_type` is `Cell_handle`. \cgalModifEnd */ /// @{ @@ -1454,7 +1454,7 @@ the source of `[s,t]` and the vertex of `c` opposite of `f`. It is invalidated by any modification of one of the cells traversed. Its `value_type` is `Triangulation_simplex_3`. -\cgalModifEnd +\cgalModifEnd */ /// @{ /*! @@ -1502,33 +1502,33 @@ Segment_simplex_iterator segment_traverser_simplices_end() const; /// @} -/*!\name Cell and Facet Circulators -The following circulators respectively visit all cells or all facets incident to a given edge. They are non-mutable and bidirectional. They are invalidated by any modification of one of the cells traversed. +/*!\name Cell and Facet Circulators +The following circulators respectively visit all cells or all facets incident to a given edge. They are non-mutable and bidirectional. They are invalidated by any modification of one of the cells traversed. */ /// @{ /*! -Starts at an arbitrary cell incident to `e`. -\pre `t.dimension() == 3`. -*/ -Cell_circulator incident_cells(Edge e) const; +Starts at an arbitrary cell incident to `e`. +\pre `t.dimension() == 3`. +*/ +Cell_circulator incident_cells(Edge e) const; /*! -As above for edge `(i,j)` of `c`. -*/ -Cell_circulator incident_cells(Cell_handle c, int i, int j) const; +As above for edge `(i,j)` of `c`. +*/ +Cell_circulator incident_cells(Cell_handle c, int i, int j) const; /*! -Starts at cell `start`. -\pre `t.dimension() == 3` and `start` is incident to `e`. -*/ -Cell_circulator incident_cells(Edge e, Cell_handle start) const; +Starts at cell `start`. +\pre `t.dimension() == 3` and `start` is incident to `e`. +*/ +Cell_circulator incident_cells(Edge e, Cell_handle start) const; /*! -As above for edge `(i,j)` of `c`. -*/ -Cell_circulator incident_cells(Cell_handle c, int i, int j, -Cell_handle start) const; +As above for edge `(i,j)` of `c`. +*/ +Cell_circulator incident_cells(Cell_handle c, int i, int j, +Cell_handle start) const; /// @} /*! @@ -1538,169 +1538,169 @@ The following circulators on facets are defined only in dimension 3, though face /// @{ /*! -Starts at an arbitrary facet incident to `e`. -\pre `t.dimension() == 3` -*/ -Facet_circulator incident_facets(Edge e) const; +Starts at an arbitrary facet incident to `e`. +\pre `t.dimension() == 3` +*/ +Facet_circulator incident_facets(Edge e) const; /*! -As above for edge `(i,j)` of `c`. -*/ -Facet_circulator incident_facets(Cell_handle c, int i, int j) const; +As above for edge `(i,j)` of `c`. +*/ +Facet_circulator incident_facets(Cell_handle c, int i, int j) const; /*! -Starts at facet `start`. -\pre `start` is incident to `e`. -*/ -Facet_circulator incident_facets(Edge e, Facet start) const; +Starts at facet `start`. +\pre `start` is incident to `e`. +*/ +Facet_circulator incident_facets(Edge e, Facet start) const; /*! -Starts at facet of index `f` in `start`. -*/ -Facet_circulator incident_facets(Edge e, Cell_handle start, int f) -const; +Starts at facet of index `f` in `start`. +*/ +Facet_circulator incident_facets(Edge e, Cell_handle start, int f) +const; /*! -As above for edge `(i,j)` of `c`. -*/ -Facet_circulator incident_facets(Cell_handle c, int i, int j, -Facet start) const; +As above for edge `(i,j)` of `c`. +*/ +Facet_circulator incident_facets(Cell_handle c, int i, int j, +Facet start) const; /*! -As above for edge `(i,j)` of `c` and facet `(start,f)`. -*/ -Facet_circulator incident_facets(Cell_handle c, int i, int j, -Cell_handle start, int f) const; +As above for edge `(i,j)` of `c` and facet `(start,f)`. +*/ +Facet_circulator incident_facets(Cell_handle c, int i, int j, +Cell_handle start, int f) const; -/// @} +/// @} /// \name Traversal of the Incident Cells, Facets and Edges, and the Adjacent Vertices of a Given Vertex /// @{ /*! -Copies the `Cell_handle`s of all cells incident to `v` to the output -iterator `cells`. -Returns the resulting output iterator. -\pre `t.dimension() == 3`, `v != Vertex_handle()`, `t.is_vertex(v)`. -*/ -template -OutputIterator -incident_cells(Vertex_handle v, OutputIterator cells) const; +Copies the `Cell_handle`s of all cells incident to `v` to the output +iterator `cells`. +Returns the resulting output iterator. +\pre `t.dimension() == 3`, `v != Vertex_handle()`, `t.is_vertex(v)`. +*/ +template +OutputIterator +incident_cells(Vertex_handle v, OutputIterator cells) const; -/*! +/*! Try to lock and copy the `Cell_handle`s of all cells incident to `v` into -`cells`. +`cells`. Returns `true` in case of success. Otherwise, `cells` is emptied and the function -returns false. In any case, the locked cells are not unlocked by +returns false. In any case, the locked cells are not unlocked by `try_lock_and_get_incident_cells()`, leaving this choice to the user. -\pre `t.dimension() == 3`, `v != Vertex_handle()`, `t.is_vertex(v)`. +\pre `t.dimension() == 3`, `v != Vertex_handle()`, `t.is_vertex(v)`. */ bool try_lock_and_get_incident_cells(Vertex_handle v, std::vector& cells) const; /*! -Copies the `Cell_handle`s of all finite cells incident to `v` to the output -iterator `cells`. -Returns the resulting output iterator. -\pre `t.dimension() == 3`, `v != Vertex_handle()`, `t.is_vertex(v)`. -*/ -template -OutputIterator -finite_incident_cells(Vertex_handle v, OutputIterator cells) const; +Copies the `Cell_handle`s of all finite cells incident to `v` to the output +iterator `cells`. +Returns the resulting output iterator. +\pre `t.dimension() == 3`, `v != Vertex_handle()`, `t.is_vertex(v)`. +*/ +template +OutputIterator +finite_incident_cells(Vertex_handle v, OutputIterator cells) const; /*! -Copies all `Facet`s incident to `v` to the output iterator -`facets`. -Returns the resulting output iterator. -\pre `t.dimension() > 1`, `v != Vertex_handle()`, `t.is_vertex(v)`. -*/ -template -OutputIterator -incident_facets(Vertex_handle v, OutputIterator facets) const; +Copies all `Facet`s incident to `v` to the output iterator +`facets`. +Returns the resulting output iterator. +\pre `t.dimension() > 1`, `v != Vertex_handle()`, `t.is_vertex(v)`. +*/ +template +OutputIterator +incident_facets(Vertex_handle v, OutputIterator facets) const; /*! -Copies all finite `Facet`s incident to `v` to the output iterator -`facets`. -Returns the resulting output iterator. -\pre `t.dimension() > 1`, `v != Vertex_handle()`, `t.is_vertex(v)`. -*/ -template -OutputIterator -finite_incident_facets(Vertex_handle v, OutputIterator facets) const; +Copies all finite `Facet`s incident to `v` to the output iterator +`facets`. +Returns the resulting output iterator. +\pre `t.dimension() > 1`, `v != Vertex_handle()`, `t.is_vertex(v)`. +*/ +template +OutputIterator +finite_incident_facets(Vertex_handle v, OutputIterator facets) const; /*! -Copies all `Edge`s incident to `v` to the -output iterator `edges`. Returns the resulting output iterator. -\pre `t.dimension() > 0`, `v != Vertex_handle()`, `t.is_vertex(v)`. -*/ -template -OutputIterator -incident_edges(Vertex_handle v, OutputIterator edges) const; +Copies all `Edge`s incident to `v` to the +output iterator `edges`. Returns the resulting output iterator. +\pre `t.dimension() > 0`, `v != Vertex_handle()`, `t.is_vertex(v)`. +*/ +template +OutputIterator +incident_edges(Vertex_handle v, OutputIterator edges) const; /*! -Copies all finite `Edge`s incident to `v` to the -output iterator `edges`. Returns the resulting output iterator. -\pre `t.dimension() > 0`, `v != Vertex_handle()`, `t.is_vertex(v)`. -*/ -template -OutputIterator -finite_incident_edges(Vertex_handle v, OutputIterator edges) const; +Copies all finite `Edge`s incident to `v` to the +output iterator `edges`. Returns the resulting output iterator. +\pre `t.dimension() > 0`, `v != Vertex_handle()`, `t.is_vertex(v)`. +*/ +template +OutputIterator +finite_incident_edges(Vertex_handle v, OutputIterator edges) const; /*! -Copies the `Vertex_handle`s of all vertices adjacent to `v` to the -output iterator `vertices`. If `t.dimension() < 0`, then do -nothing. Returns the resulting output iterator. -\pre `v != Vertex_handle()`, `t.is_vertex(v)`. -*/ -template -OutputIterator -adjacent_vertices(Vertex_handle v, OutputIterator vertices) const; +Copies the `Vertex_handle`s of all vertices adjacent to `v` to the +output iterator `vertices`. If `t.dimension() < 0`, then do +nothing. Returns the resulting output iterator. +\pre `v != Vertex_handle()`, `t.is_vertex(v)`. +*/ +template +OutputIterator +adjacent_vertices(Vertex_handle v, OutputIterator vertices) const; /*! -Copies the `Vertex_handle`s of all finite vertices adjacent to `v` to the -output iterator `vertices`. If `t.dimension() < 0`, then do -nothing. Returns the resulting output iterator. -\pre `v != Vertex_handle()`, `t.is_vertex(v)`. -*/ -template -OutputIterator -finite_adjacent_vertices(Vertex_handle v, OutputIterator vertices) const; +Copies the `Vertex_handle`s of all finite vertices adjacent to `v` to the +output iterator `vertices`. If `t.dimension() < 0`, then do +nothing. Returns the resulting output iterator. +\pre `v != Vertex_handle()`, `t.is_vertex(v)`. +*/ +template +OutputIterator +finite_adjacent_vertices(Vertex_handle v, OutputIterator vertices) const; /*! -Returns the degree of a vertex, that is, the number of incident vertices. -The infinite vertex is counted. -\pre `v != Vertex_handle()`, `t.is_vertex(v)`. -*/ -size_type degree(Vertex_handle v) const; +Returns the degree of a vertex, that is, the number of incident vertices. +The infinite vertex is counted. +\pre `v != Vertex_handle()`, `t.is_vertex(v)`. +*/ +size_type degree(Vertex_handle v) const; -/// @} +/// @} -/// \name Traversal Between Adjacent Cells +/// \name Traversal Between Adjacent Cells /// @{ /*! -Returns the index of `c` in its \f$ i^{th}\f$ neighbor. -\pre \f$ i \in\{0, 1, 2, 3\}\f$. -*/ -int mirror_index(Cell_handle c, int i) const; +Returns the index of `c` in its \f$ i^{th}\f$ neighbor. +\pre \f$ i \in\{0, 1, 2, 3\}\f$. +*/ +int mirror_index(Cell_handle c, int i) const; /*! -Returns the vertex of the \f$ i^{th}\f$ neighbor of `c` that is opposite to -`c`. -\pre \f$ i \in\{0, 1, 2, 3\}\f$. -*/ -Vertex_handle mirror_vertex(Cell_handle c, int i) const; +Returns the vertex of the \f$ i^{th}\f$ neighbor of `c` that is opposite to +`c`. +\pre \f$ i \in\{0, 1, 2, 3\}\f$. +*/ +Vertex_handle mirror_vertex(Cell_handle c, int i) const; /*! -Returns the same facet seen from the other adjacent cell. -*/ -Facet mirror_facet(Facet f) const; +Returns the same facet seen from the other adjacent cell. +*/ +Facet mirror_facet(Facet f) const; -/// @} +/// @} -/// \name Checking +/// \name Checking /// The responsibility of keeping a valid triangulation belongs to the /// user when using advanced operations allowing a direct manipulation /// of cells and vertices. We provide the user with the following @@ -1710,82 +1710,82 @@ Facet mirror_facet(Facet f) const; /*! \cgalDebugFunction \cgalDebugBegin -Checks the combinatorial validity of the triangulation. Checks also the -validity of its geometric embedding (see -Section \ref Triangulation3secintro). -When `verbose` is set to `true`, -messages describing the first invalidity encountered are printed. +Checks the combinatorial validity of the triangulation. Checks also the +validity of its geometric embedding (see +Section \ref Triangulation3secintro). +When `verbose` is set to `true`, +messages describing the first invalidity encountered are printed. \cgalDebugEnd -*/ -bool -is_valid(bool verbose = false) const; +*/ +bool +is_valid(bool verbose = false) const; /*! \cgalDebugFunction \cgalDebugBegin -Checks the combinatorial validity of the cell by calling the +Checks the combinatorial validity of the cell by calling the `is_valid` method of the cell class. Also checks the -geometric validity of `c`, if `c` is finite. (See -Section \ref Triangulation3secintro.) +geometric validity of `c`, if `c` is finite. (See +Section \ref Triangulation3secintro.) -When `verbose` is set to `true`, messages are printed to give -a precise indication of the kind of invalidity encountered. +When `verbose` is set to `true`, messages are printed to give +a precise indication of the kind of invalidity encountered. \cgalDebugEnd -*/ -bool -is_valid(Cell_handle c, bool verbose = false) const; +*/ +bool +is_valid(Cell_handle c, bool verbose = false) const; /// @} /*! \name I/O -\cgal provides an interface to Geomview for a 3D-triangulation, -see Chapter \ref Chapter_Geomview on `Geomview_stream`. +\cgal provides an interface to Geomview for a 3D-triangulation, +see Chapter \ref Chapter_Geomview on `Geomview_stream`. \code #include \endcode -The information in the `iostream` is: the dimension, the number of -finite vertices, the non-combinatorial information about vertices -(point, etc; note that the infinite vertex is numbered 0), the number -of cells, the indices of the vertices of each cell, plus the -non-combinatorial information about each cell, then the indices of the -neighbors of each cell, where the index corresponds to the preceding -list of cells. When dimension \f$ <\f$ 3, the same information is stored -for faces of maximal dimension instead of cells. +The information in the `iostream` is: the dimension, the number of +finite vertices, the non-combinatorial information about vertices +(point, etc; note that the infinite vertex is numbered 0), the number +of cells, the indices of the vertices of each cell, plus the +non-combinatorial information about each cell, then the indices of the +neighbors of each cell, where the index corresponds to the preceding +list of cells. When dimension \f$ <\f$ 3, the same information is stored +for faces of maximal dimension instead of cells. */ /// @{ /*! -Reads the underlying combinatorial triangulation from `is` by -calling the corresponding input operator of the triangulation data -structure class (note that the infinite vertex is numbered 0), and the -non-combinatorial information by calling the corresponding input -operators of the vertex and the cell classes (such as point -coordinates), which are provided by overloading the stream operators -of the vertex and cell types. Assigns the resulting triangulation to -`t`. -*/ -istream& operator>> (istream& is, Triangulation_3 &t); +Reads the underlying combinatorial triangulation from `is` by +calling the corresponding input operator of the triangulation data +structure class (note that the infinite vertex is numbered 0), and the +non-combinatorial information by calling the corresponding input +operators of the vertex and the cell classes (such as point +coordinates), which are provided by overloading the stream operators +of the vertex and cell types. Assigns the resulting triangulation to +`t`. +*/ +istream& operator>> (istream& is, Triangulation_3 &t); /*! -Writes the triangulation `t` into `os`. -*/ -ostream& operator<< (ostream& os, const Triangulation_3 &t); +Writes the triangulation `t` into `os`. +*/ +ostream& operator<< (ostream& os, const Triangulation_3 &t); /// @} -/// \name Concurrency +/// \name Concurrency /// @{ -/*! +/*! Set the pointer to the lock data structure. -*/ +*/ void set_lock_data_structure(Lock_data_structure *lock_ds) const; -/// @} +/// @} }; /* end Triangulation_3 */ } /* end namespace CGAL */ diff --git a/Triangulation_3/doc/Triangulation_3/PackageDescription.txt b/Triangulation_3/doc/Triangulation_3/PackageDescription.txt index aad2132ba3e..61103aec56d 100644 --- a/Triangulation_3/doc/Triangulation_3/PackageDescription.txt +++ b/Triangulation_3/doc/Triangulation_3/PackageDescription.txt @@ -31,7 +31,7 @@ \cgalPkgSummaryEnd \cgalPkgShortInfoBegin \cgalPkgSince{2.1} -\cgalPkgDependsOn{\ref PkgTDS3} +\cgalPkgDependsOn{\ref PkgTDS3} \cgalPkgBib{cgal:pt-t3} \cgalPkgLicense{\ref licensesGPL "GPL" } \cgalPkgDemo{3D Triangulations,triangulation_3.zip} diff --git a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt index 3bc71ce6793..16fc4ac1d13 100644 --- a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt +++ b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt @@ -1,7 +1,7 @@ namespace CGAL { /*! -\mainpage User Manual +\mainpage User Manual \anchor Chapter_3D_Triangulations \anchor chapterTriangulation3 \cgalAutoToc @@ -20,7 +20,7 @@ partition of \f$ \mathbb{R}^3\f$. Its cells (\f$ 3\f$-faces) are such that two c either do not intersect or share a common facet (\f$ 2\f$-face), edge (\f$ 1\f$-face) or vertex (\f$ 0\f$-face). -\section Triangulation3secintro Representation +\section Triangulation3secintro Representation In order to deal only with tetrahedra, which is convenient for many applications, the @@ -53,9 +53,9 @@ Orientation of a cell (3-dimensional case). \cgalFigureEnd As in the underlying combinatorial triangulation (see -Chapter \ref chapterTDS3 "3D Triangulation Data Structure"), +Chapter \ref chapterTDS3 "3D Triangulation Data Structure"), edges (\f$ 1\f$-faces) and facets (\f$ 2\f$-faces) -are not explicitly +are not explicitly represented: a facet is given by a cell and an index (the facet `i` of a cell `c` is the facet of `c` that is opposite to the vertex with index `i`) and an edge is given by a cell and two @@ -73,9 +73,9 @@ obtained by linking the additional infinite vertex to each facet of the convex hull of the points.
  • dimension 2: when a triangulation only contains -coplanar points (which is the case when there are only three points), +coplanar points (which is the case when there are only three points), it consists of triangular faces. -
  • dimension 1: the triangulation contains only collinear +
  • dimension 1: the triangulation contains only collinear points (which is the case when there are only two points), it consists of edges.
  • dimension 0: the triangulation contains only one @@ -100,7 +100,7 @@ dimension 2, each cell has only one facet of index 3, and 3 edges A triangulation of \f$ \mathbb{R}^3\f$ is said to be *locally valid* iff (a)-(b) Its underlying combinatorial graph, the triangulation -data structure, is *locally valid* +data structure, is *locally valid* (see Section \ref TDS3secintro "Introduction" of Chapter \ref chapterTDS3 "3D Triangulation Data Structure") (c) Any cell has its vertices ordered according to positive @@ -120,7 +120,7 @@ When all the points are collinear, this condition becomes: The method `Triangulation_3::is_valid()` checks the local validity of a given triangulation. This does not always -ensure global validity \cgalCite{mnssssu-cgpvg-96}, \cgalCite{dlpt-ccpps-98} but it is +ensure global validity \cgalCite{mnssssu-cgpvg-96}, \cgalCite{dlpt-ccpps-98} but it is sufficient for practical cases. \section Triangulation_3Delaunay Delaunay Triangulation @@ -138,18 +138,18 @@ computes a unique triangulation even in these cases. This implementation is fully dynamic: it supports insertions of points, vertex removals and displacements of points. -\section Triangulation3secclassRegulartriangulation Regular Triangulation +\section Triangulation3secclassRegulartriangulation Regular Triangulation The class `Regular_triangulation_3` implements incremental regular triangulations, also known as weighted Delaunay triangulations. -Let\f$ {p}^{(w)}=(p,w_p), p\in\mathbb{R}^3, w_p\in\mathbb{R}\f$ and -\f$ {z}^{(w)}=(z,w_z), z\in\mathbb{R}^3, w_z\in\mathbb{R}\f$ be two weighted points. +Let\f$ {p}^{(w)}=(p,w_p), p\in\mathbb{R}^3, w_p\in\mathbb{R}\f$ and +\f$ {z}^{(w)}=(z,w_z), z\in\mathbb{R}^3, w_z\in\mathbb{R}\f$ be two weighted points. A weighted point \f$ {p}^{(w)}=(p,w_p)\f$ can also be seen as a sphere of center \f$ p\f$ and -radius \f$ \sqrt{w_p}\f$. +radius \f$ \sqrt{w_p}\f$. The power product between \f$ {p}^{(w)}\f$ and \f$ {z}^{(w)}\f$ is -defined as +defined as \f[ \Pi({p}^{(w)},{z}^{(w)}) = {\|{p-z}\|^2-w_p-w_z} \f] where \f$ \|{p-z}\|\f$ is the Euclidean distance between \f$ p\f$ and \f$ z\f$. @@ -169,7 +169,7 @@ called the power circle. The two weighted points on the line defined by these two points. -Let \f$ {S}^{(w)}\f$ be a set of weighted points in \f$ \mathbb{R}^3\f$. +Let \f$ {S}^{(w)}\f$ be a set of weighted points in \f$ \mathbb{R}^3\f$. A sphere \f$ {z}^{(w)}\f$ is said to be regular if \f$ \forall {p}^{(w)}\in{S}^{(w)}, \Pi{({p}^{(w)},{z}^{(w)})}\geq 0\f$. @@ -178,9 +178,9 @@ A triangulation of \f$ {S}^{(w)}\f$ is regular if the power spheres of all simplices are regular. The regular triangulation of -\f$ {S}^{(w)}\f$ is in fact the projection onto \f$ \mathbb{R}^3\f$ of the convex hull +\f$ {S}^{(w)}\f$ is in fact the projection onto \f$ \mathbb{R}^3\f$ of the convex hull of the four-dimensional points \f$ (p,\|p-O\|^2-w_p),\f$ for -\f$ {p}^{(w)}=(p,w_p)\in{S}^{(w)}\f$. +\f$ {p}^{(w)}=(p,w_p)\in{S}^{(w)}\f$. Note that all points of \f$ {S}^{(w)}\f$ do not necessarily appear as vertices of the regular triangulation. To know more about regular triangulations, see for @@ -192,7 +192,7 @@ Delaunay triangulation. The implementation of 3D regular triangulation supports insertions of weighted points, and vertex removals. Displacements are not supported in the current implementation. -\section Triangulation3secdesign Software Design +\section Triangulation3secdesign Software Design The main classes `Triangulation_3`, `Delaunay_triangulation_3` and `Regular_triangulation_3` are connected to each other by the @@ -225,17 +225,17 @@ Chapter \ref chapterTDS3 "3D Triangulation Data Structure". triangulation class, described in Section \ref Triangulation3seclocpol.
-Optionally, the main Delaunay and regular triangulations algorithms (insert, remove) +Optionally, the main Delaunay and regular triangulations algorithms (insert, remove) support multi-core shared-memory architectures to take advantage of available parallelism. -For this purpose, a model of the concept `SurjectiveLockDataStructure` can be -given as fourth template parameter; it defaults to +For this purpose, a model of the concept `SurjectiveLockDataStructure` can be +given as fourth template parameter; it defaults to `Spatial_lock_grid_3`. This data structure allows to lock points with coordinates (x, y, z) in a 3D domain. When a thread owns the lock on a point, no other thread can lock this point. Locking a facet (resp. a cell) -boils down to locking all its 3 (resp. 4) incident vertices. +boils down to locking all its 3 (resp. 4) incident vertices. See Section \ref Triangulation_3ParallelAlgorithms for more details. -\subsection Triangulation3secTraits The Geometric Traits Parameter +\subsection Triangulation3secTraits The Geometric Traits Parameter The first template parameter of the triangulation class `Triangulation_3` @@ -252,7 +252,7 @@ class of `Delaunay_triangulation_3` must define predicates to test for the In addition to the requirements described before, the geometric traits class of `Regular_triangulation_3` must define predicates to test for the -power distances and orientation tests for power spheres. +power distances and orientation tests for power spheres. It is described by the concept `RegularTriangulationTraits_3`, which refines `TriangulationTraits_3`. @@ -262,7 +262,7 @@ All kernels provided by \cgal can all be used as models for the geometric traits parameter. -\subsection Triangulation3sectds The Triangulation Data Structure Parameter +\subsection Triangulation3sectds The Triangulation Data Structure Parameter The second template parameter of the main classes (`Triangulation_3`, `Delaunay_triangulation_3` and `Regular_triangulation_3`) is a @@ -288,17 +288,17 @@ all the triangulation classes, so it need not be specified by the user unless he wants to use a different triangulation data structure or a different vertex or cell base class. -\subsection Triangulation3seclocpol The Location Policy Parameter +\subsection Triangulation3seclocpol The Location Policy Parameter The Delaunay triangulation class supports an optional feature which maintains -an additional data structure for fast point location queries. +an additional data structure for fast point location queries. The fast location policy should be used when the user inserts points in a random order or needs to do many unrelated queries. If the user is able to give a good hint to help the point location of its queries (and its newly inserted points), then it should prefer the default policy. In such a case where good hints are provided, the default policy save some memory (few percents), and is faster. -Notice that if points are not inserted one by one, but as a range, then a good hint is +Notice that if points are not inserted one by one, but as a range, then a good hint is automatically computed using spatial sort. Reading Section \ref Triangulation3seccomplexity on complexity and @@ -395,28 +395,28 @@ Section \ref TDS3secdesign "Software Design" provides more detailed information. \subsection Triangulation_3ParallelAlgorithms Parallel Algorithms -Parallel algorithms of `Delaunay_triangulation_3` and -`Regular_triangulation_3` are enabled +Parallel algorithms of `Delaunay_triangulation_3` and +`Regular_triangulation_3` are enabled if the `TriangulationDataStructure_3::Concurrency_tag` type is `Parallel_tag` and a -reference to a lock data structure instance is provided via the constructor or +reference to a lock data structure instance is provided via the constructor or by using `Triangulation_3::set_lock_data_structure`. This data structure -must be a model of the concept `SurjectiveLockDataStructure` and can be -optionally given as a template parameter of the triangulation; +must be a model of the concept `SurjectiveLockDataStructure` and can be +optionally given as a template parameter of the triangulation; it defaults to `Spatial_lock_grid_3`. -Note that the parallel Delaunay -triangulation must use the default compact location policy (and not the fast -one). If those conditions are fulfilled, the insertion/removal of a -range of points will be performed in parallel, and the individual +Note that the parallel Delaunay +triangulation must use the default compact location policy (and not the fast +one). If those conditions are fulfilled, the insertion/removal of a +range of points will be performed in parallel, and the individual insert/remove operations will be optionally thread-safe. -Parallel algorithms require the program to be linked against +Parallel algorithms require the program to be linked against the Intel TBB library. To control the number of threads used, the user may use the tbb::task_scheduler_init class. -See the TBB documentation +See the TBB documentation for more details. -\section Triangulation3secexamples Examples +\section Triangulation3secexamples Examples \subsection Triangulation_3BasicExample Basic Example @@ -431,7 +431,7 @@ cell. It uses the default parameter of the `Triangulation_3` class. The following two examples show how the user can plug his own vertex base in a triangulation. Changing the cell base is similar. -\subsubsection Triangulation3secexamplescolor Adding a Color +\subsubsection Triangulation3secexamplescolor Adding a Color When the user doesn't need to add a type in a vertex which depends on the `TriangulationDataStructure_3` (e.g. a `Vertex_handle` or @@ -457,10 +457,10 @@ The most efficient method to insert (weighted) points in a Delaunay (or regular) triangulation is to provide an iterator range over (weighted) points to the insert function. However, an iterator range of (weighted) points does not allow to set different information to each vertex. -To solve this problem, in the case the vertex type of the triangulation +To solve this problem, in the case the vertex type of the triangulation is a model of the concept `TriangulationVertexBaseWithInfo_3` -(such as `Triangulation_vertex_base_with_info_3`), we provide three examples -doing the same operation: set an unsigned integer as the information +(such as `Triangulation_vertex_base_with_info_3`), we provide three examples +doing the same operation: set an unsigned integer as the information of each vertex. The value of this unsigned integer is the initial order of the corresponding point given in the range. @@ -505,7 +505,7 @@ Note that you only need the iterator type if you combine the pre \cpp 11 `for`-l \cgalExample{Triangulation_3/for_loop.cpp} -\subsection Triangulation3secsimplex The Simplex Class +\subsection Triangulation3secsimplex The Simplex Class The triangulation defines a `Triangulation_3::Simplex` class that represents a simplex (vertex, edge, facet or cell). This example demonstrates how @@ -513,7 +513,7 @@ simplices can be stored in a set. \cgalExample{Triangulation_3/simplex.cpp} -\subsection Triangulation3exfastlocation Fast Point Location for Delaunay Triangulations +\subsection Triangulation3exfastlocation Fast Point Location for Delaunay Triangulations \cgalExample{Triangulation_3/fast_location_3.cpp} @@ -545,7 +545,7 @@ be hidden and do not result in vertices in the triangulation. \subsubsection Triangulation_3RegularTriangulationInfo Regular Triangulation with Custom Vertex This example shows that one must use the class `Regular_triangulation_vertex_base_3` as vertex base class, -if one has to specifiy the template parameter. +if one has to specifiy the template parameter. \cgalExample{Triangulation_3/regular_with_info_3.cpp} @@ -578,7 +578,7 @@ Result of the run of the draw_triangulation_3 program. A window shows the 3D tri \cgalFigureEnd -\section Triangulation3seccomplexity Complexity and Performance +\section Triangulation3seccomplexity Complexity and Performance In 3D, the worst case complexity of a triangulation is quadratic in the number of points. For Delaunay triangulations, this bound is reached in cases such as @@ -594,7 +594,7 @@ as points distributed on surfaces under some conditions. There are several algorithms provided in this package. We will focus here on the following ones and give practical numbers on their efficiency :
    -
  • construction of a triangulation from a range of points, +
  • construction of a triangulation from a range of points,
  • location of a point (using the `locate` function),
  • removal of a vertex (using the `remove` function).
@@ -632,170 +632,170 @@ Xeon 3GHz processor and 32GB of RAM (a recent desktop machine as of 2009). -Delaunay +Delaunay -Delaunay +Delaunay -Regular +Regular -Regular +Regular -%Fast location +%Fast location -No hidden points +No hidden points
-Construction from \f$ 10^2\f$ points +Construction from \f$ 10^2\f$ points -0.00054 +0.00054 -0.000576 +0.000576 -0.000948 +0.000948 -0.000955 +0.000955 -Construction from \f$ 10^3\f$ points +Construction from \f$ 10^3\f$ points -0.00724 +0.00724 -0.00748 +0.00748 -0.0114 +0.0114 0.0111 -Construction from \f$ 10^4\f$ points +Construction from \f$ 10^4\f$ points -0.0785 +0.0785 -0.0838 +0.0838 -0.122 +0.122 -0.117 +0.117 -Construction from \f$ 10^5\f$ points +Construction from \f$ 10^5\f$ points -0.827 +0.827 -0.878 +0.878 -1.25 +1.25 -1.19 +1.19 -Construction from \f$ 10^6\f$ points +Construction from \f$ 10^6\f$ points -8.5 +8.5 -9.07 +9.07 -12.6 +12.6 -12.2 +12.2 -Construction from \f$ 10^7\f$ points +Construction from \f$ 10^7\f$ points -87.4 +87.4 -92.5 +92.5 -129 +129 -125 +125
-Point location in \f$ 10^2\f$ points +Point location in \f$ 10^2\f$ points -9.93e-07 +9.93e-07 -1.06e-06 +1.06e-06 -7.19e-06 +7.19e-06 -6.99e-06 +6.99e-06 -Point location in \f$ 10^3\f$ points +Point location in \f$ 10^3\f$ points -2.25e-06 +2.25e-06 -1.93e-06 +1.93e-06 -1.73e-05 +1.73e-05 -1.76e-05 +1.76e-05 -Point location in \f$ 10^4\f$ points +Point location in \f$ 10^4\f$ points -4.79e-06 +4.79e-06 -3.09e-06 +3.09e-06 -3.96e-05 +3.96e-05 -3.76e-05 +3.76e-05 -Point location in \f$ 10^5\f$ points +Point location in \f$ 10^5\f$ points -2.98e-05 +2.98e-05 -6.12e-06 +6.12e-06 -1.06e-04 +1.06e-04 -1.06e-04 +1.06e-04 -Point location in \f$ 10^6\f$ points +Point location in \f$ 10^6\f$ points -1e-04 +1e-04 -9.65e-06 +9.65e-06 -2.7e-04 +2.7e-04 -2.67e-04 +2.67e-04 -Point location in \f$ 10^7\f$ points +Point location in \f$ 10^7\f$ points -2.59e-04 +2.59e-04 -1.33e-05 +1.33e-05 -6.25e-04 +6.25e-04 -6.25e-04 +6.25e-04
-Vertex removal +Vertex removal -1e-04 +1e-04 -1.03e-04 +1.03e-04 -1.42e-04 +1.42e-04 -1.38e-04 +1.38e-04
@@ -809,16 +809,16 @@ in \cgalCite{msri52:liu-snoeyink-05}. \subsection Triangulation_3ParallelPerformance Parallel Performance Figure \cgalFigureRef{Triangulation3figparallelspeedup} shows insertion -and removal speed-ups obtained using the parallel version of the -triangulation algorithms of \cgal 4.5. The machine used is a PC running -Windows 7 64-bits with two 6-core +and removal speed-ups obtained using the parallel version of the +triangulation algorithms of \cgal 4.5. The machine used is a PC running +Windows 7 64-bits with two 6-core Intel Xeon CPU X5660 clocked at 2.80 GHz -with 32GB of RAM. The program has been compiled with +with 32GB of RAM. The program has been compiled with Microsoft Visual C++ 2012 in Release mode. \cgalFigureBegin{Triangulation3figparallelspeedup,DT3_parallel_benchmark.png} Speed-up obtained for the insertion of 1M points randomly generated inside -a cube (red), and the removal of 100K of them (blue), compared +a cube (red), and the removal of 100K of them (blue), compared to the sequential version of the algorithm. \cgalFigureEnd @@ -856,48 +856,48 @@ points, as measured empirically using `Memory_sizer` for large triangulations -Delaunay +Delaunay -Delaunay +Delaunay -Regular +Regular -Regular +Regular -%Fast location +%Fast location -No hidden points +No hidden points
-32bit +32bit -274 +274 -291 +291 -336 +336 -282 +282
-64bit +64bit -519 +519 -553 +553 -635 +635 -527 +527
@@ -960,15 +960,15 @@ also be found in \cgalCite{cgal:dp-eegpd-03}. -Random +Random -Ellipsoid +Ellipsoid -Buddha +Buddha -Molecule +Molecule -Dryer +Dryer @@ -981,76 +981,76 @@ also be found in \cgalCite{cgal:dp-eegpd-03}. -%Handle +%Handle -Number of points +Number of points -100000 +100000 -100000 +100000 -542548 +542548 -525296 +525296 -49787 +49787
-`Simple_cartesian` +`Simple_cartesian` -0.69 +0.69 -0.627 +0.627 -4.21 +4.21 -3.8 +3.8 -\f$ \infty \f$-loop +\f$ \infty \f$-loop
-`Exact_predicates_inexact_constructions_kernel` +`Exact_predicates_inexact_constructions_kernel` -0.824 +0.824 -0.749 +0.749 -4.99 +4.99 -4.64 +4.64 -1.68 +1.68
-`Exact_predicates_exact_constructions_kernel` +`Exact_predicates_exact_constructions_kernel` -4.59 +4.59 -3.85 +3.85 -30.1 +30.1 -26.4 +26.4 -4.57 +4.57
-`Simple_cartesian` +`Simple_cartesian` -492 +492 -534 +534 -1120 +1120 -1030 +1030 -75.2 +75.2
@@ -1058,7 +1058,7 @@ Number of points Running times (seconds) for various kernels and data sets. \cgalFigureCaptionEnd - + \cgalFigureBegin{Triangulation3figdatasets,api1_01.png,b35-1.png,HD.png} Data sets used in the benchmark of \cgalFigureRef{Triangulation3figkernelsanddatasets}. \cgalFigureEnd @@ -1105,7 +1105,7 @@ in \cgalCite{cgal:dt-pvrdr-06}, which allowed to release this functionality in \cgal 3.2. In 2006, Nico Kruithof wrote the `Triangulation_simplex_3` class -that can store simplices of any dimension and improved the internal +that can store simplices of any dimension and improved the internal organization of the code. As of March 2007, Christophe Delage made the iterator range insert methods and @@ -1141,6 +1141,6 @@ The authors wish to thank Lutz Kettner for inspiring discussions about the design of \cgal. Jean-Daniel Boissonnat is also acknowledged \cgalCite{bdty-tcgal-00}. -*/ +*/ } /* namespace CGAL */ diff --git a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt index 275ccbd62ec..770a6f6db74 100644 --- a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt @@ -58,8 +58,8 @@ if ( CGAL_FOUND ) endif() else() - + message(STATUS "This program requires the CGAL library, and will not be compiled.") - + endif() diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 74bec003c40..21f28bfd86e 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -59,46 +59,46 @@ struct Incrementer { Incrementer() {} void increment( SCI& sci ) { sci.walk_to_next(); } }; // struct Incrementer - + } // namespace internal // provides an iterator over the cells intersected by a line segment. /* - * The `Triangulation_segment_traverser_3` iterates over the cells - * of a `Triangulation_3` by following a straight line segment \f$ st \f$. + * The `Triangulation_segment_traverser_3` iterates over the cells + * of a `Triangulation_3` by following a straight line segment \f$ st \f$. * - * This class is closely related to `Triangulation_3::locate(...)`. - * However, unlike this `locate(...)` method, all the cells traversed - * by the `Triangulation_segment_traverser_3` intersect the interior of the line - * segment \f$ st \f$. + * This class is closely related to `Triangulation_3::locate(...)`. + * However, unlike this `locate(...)` method, all the cells traversed + * by the `Triangulation_segment_traverser_3` intersect the interior of the line + * segment \f$ st \f$. * - * Traversal starts from a cell containing \f$ s \f$ and it ends in a cell containing - * \f$ t \f$. - * If \f$ st \f$ is coplanar with a facet or collinear with an edge, at most one of the - * incident cells is traversed. - * If \f$ st \f$ intersects an edge or vertex, at most two incident cells are traversed: - * the cells intersected by \f$ st \f$ strictly in their interior. + * Traversal starts from a cell containing \f$ s \f$ and it ends in a cell containing + * \f$ t \f$. + * If \f$ st \f$ is coplanar with a facet or collinear with an edge, at most one of the + * incident cells is traversed. + * If \f$ st \f$ intersects an edge or vertex, at most two incident cells are traversed: + * the cells intersected by \f$ st \f$ strictly in their interior. * - * If \f$ s \f$ lies on the convex hull, traversal starts in an incident cell inside - * the convex hull. Similarly, if \f$ t \f$ lies on the convex hull, traversal ends in - * an adjacent cell inside the convex hull. + * If \f$ s \f$ lies on the convex hull, traversal starts in an incident cell inside + * the convex hull. Similarly, if \f$ t \f$ lies on the convex hull, traversal ends in + * an adjacent cell inside the convex hull. * - * Both \f$ s \f$ and \f$ t \f$ may lie outside the convex hull of the triangulation, - * but they must lie within the affine hull of the triangulation. In either case, the - * finite facet of any infinite cells traversed must intersect \f$ st \f$. + * Both \f$ s \f$ and \f$ t \f$ may lie outside the convex hull of the triangulation, + * but they must lie within the affine hull of the triangulation. In either case, the + * finite facet of any infinite cells traversed must intersect \f$ st \f$. * - * The traverser may be applied to any triangulation of dimension > 0. - * However, for triangulations of dimension 1, the functionality is somewhat trivial. + * The traverser may be applied to any triangulation of dimension > 0. + * However, for triangulations of dimension 1, the functionality is somewhat trivial. * - * The traverser becomes invalid whenever the triangulation is changed. + * The traverser becomes invalid whenever the triangulation is changed. * - * \tparam Tr_ is the triangulation type to traverse. + * \tparam Tr_ is the triangulation type to traverse. * * \cgalModels{ForwardIterator} * - * \sa `Triangulation_3` - * \sa `Forward_circulator_base` + * \sa `Triangulation_3` + * \sa `Forward_circulator_base` */ template < class Tr_, class Inc = internal::Incrementer > class Triangulation_segment_cell_iterator_3 @@ -136,7 +136,7 @@ public: typedef std::ptrdiff_t difference_type; //< defines the signed integral type that can hold the distance between two iterators. typedef std::forward_iterator_tag iterator_category; //< defines the iterator category. // \} - + // describes the iterator type when applied to another type of triangulation or incrementer. template < class Tr2, class Inc2 > struct Rebind { typedef Triangulation_segment_cell_iterator_3 Other; }; @@ -172,44 +172,44 @@ public: // \{ // constructs an iterator. /* \param tr the triangulation to iterate though. This triangulation must have dimension > 0. - * \param s the source vertex. This vertex must be initialized and cannot be the infinite vertex. - * \param t the target vertex. This vertex must be initialized and cannot be the infinite vertex. - * It cannot equal `s`. + * \param s the source vertex. This vertex must be initialized and cannot be the infinite vertex. + * \param t the target vertex. This vertex must be initialized and cannot be the infinite vertex. + * It cannot equal `s`. */ - Triangulation_segment_cell_iterator_3( const Tr* tr, Vertex_handle s, Vertex_handle t ); + Triangulation_segment_cell_iterator_3( const Tr* tr, Vertex_handle s, Vertex_handle t ); // constructs an iterator. /* \param tr the triangulation to iterate though. This triangulation must have dimension > 0. - * \param s the source vertex. This vertex must be initialized and cannot be the infinite vertex. - * \param t the target point. This point must be initialized and it cannot be be at the same location as `s`. - * If `tr` has dimension < 3, `t` must lie inside the affine hull of `tr`. + * \param s the source vertex. This vertex must be initialized and cannot be the infinite vertex. + * \param t the target point. This point must be initialized and it cannot be be at the same location as `s`. + * If `tr` has dimension < 3, `t` must lie inside the affine hull of `tr`. */ - Triangulation_segment_cell_iterator_3( const Tr* tr, Vertex_handle s, const Point& t ); + Triangulation_segment_cell_iterator_3( const Tr* tr, Vertex_handle s, const Point& t ); // constructs an iterator. /* \param tr the triangulation to iterate though. This triangulation must have dimension > 0. - * \param s the source point. This point must be initialized and it cannot be be at the same location as `t`. - * \param t the target vertex. This vertex must be initialized and cannot be the infinite vertex. - * If `tr` has dimension < 3, `s` must lie inside the affine hull of `tr`. - * \param hint the starting point to search for `s`. + * \param s the source point. This point must be initialized and it cannot be be at the same location as `t`. + * \param t the target vertex. This vertex must be initialized and cannot be the infinite vertex. + * If `tr` has dimension < 3, `s` must lie inside the affine hull of `tr`. + * \param hint the starting point to search for `s`. */ - Triangulation_segment_cell_iterator_3( const Tr* tr, const Point& s, Vertex_handle t, Cell_handle hint = Cell_handle() ); + Triangulation_segment_cell_iterator_3( const Tr* tr, const Point& s, Vertex_handle t, Cell_handle hint = Cell_handle() ); // constructs an iterator. /* \param tr the triangulation to iterate though. This triangulation must have dimension > 0. - * \param s the source point. This point must be initialized. If `tr` has dimension < 3, `s` must lie inside - * the affine hull of `tr`. - * \param t the target point. This point must be initialized and it cannot be be at the same location as `s`. - * If `tr` has dimension < 3, `t` must lie inside the affine hull of `tr`. - * \param hint the starting point to search for `s`. + * \param s the source point. This point must be initialized. If `tr` has dimension < 3, `s` must lie inside + * the affine hull of `tr`. + * \param t the target point. This point must be initialized and it cannot be be at the same location as `s`. + * If `tr` has dimension < 3, `t` must lie inside the affine hull of `tr`. + * \param hint the starting point to search for `s`. */ Triangulation_segment_cell_iterator_3( const Tr* tr, const Point& s, const Point& t, Cell_handle hint = Cell_handle() ); - + // constructs an iterator. /* \param tr the triangulation to iterate though. This triangulation must have dimension > 0. - * \param S the segment to be traversed. If `tr` has dimension < 3, `S` must lie inside - * the affine hull of `tr`. `S` must not be degenerate, i.e. its source and target must not be equal. - * \param hint the starting point to search for `S`. + * \param S the segment to be traversed. If `tr` has dimension < 3, `S` must lie inside + * the affine hull of `tr`. `S` must not be degenerate, i.e. its source and target must not be equal. + * \param hint the starting point to search for `S`. */ Triangulation_segment_cell_iterator_3( const Tr* tr, const Segment& S, Cell_handle hint = Cell_handle() ); // \} @@ -224,7 +224,7 @@ public: virtual #endif ~Triangulation_segment_cell_iterator_3() {} - + public: // \name Accessors @@ -239,15 +239,15 @@ public: // gives the target point of the segment follwoed. /* \return the target point. - */ + */ const Point& target() const { return _target; } // gives a handle to the current cell. /* By invariance, this cell is intersected by the segment - * between `source()` and `target()`. - * \return a handle to the current cell. - * \sa `cell()`. - */ + * between `source()` and `target()`. + * \return a handle to the current cell. + * \sa `cell()`. + */ Cell_handle handle() { return std::get<0>(_cur); @@ -255,20 +255,20 @@ public: // gives the previous cell. /* This cell is uninitialized until the iterator leaves the initial - * cell. - * By invariance, once initialized, this cell must be intersected by the segment - * between `source()` and `target()`. - * \return the previous cell. - * \sa `handle()`. - */ + * cell. + * By invariance, once initialized, this cell must be intersected by the segment + * between `source()` and `target()`. + * \return the previous cell. + * \sa `handle()`. + */ Cell_handle previous() const { return prev_cell(); } // provides a dereference operator. - /* \return a pointer to the current cell. - */ + /* \return a pointer to the current cell. + */ Cell* operator->() { return &*std::get<0>(_cur); @@ -276,46 +276,46 @@ public: // provides an indirection operator. /* \return the current cell. - */ + */ Cell& operator*() { return *std::get<0>(_cur); } // provides a conversion operator. - /* \return a handle to the current cell. - */ + /* \return a handle to the current cell. + */ operator const Cell_handle() const { return std::get<0>(_cur); } // provides a conversion operator. - /* \return the simplex through wich the current cell was entered. - */ + /* \return the simplex through wich the current cell was entered. + */ operator const Simplex() const { return _cur; } // checks whether the iterator has reached the final cell, which contains the `target()`. /* If the `target()` lies on a facet, edge, or vertex, the final cell is the cell containing - * the interior of the segment between `source()` and `target()`. - * \return true iff the current cell contains the `target()`. - */ + * the interior of the segment between `source()` and `target()`. + * \return true iff the current cell contains the `target()`. + */ bool has_next() const { return this->cell() != Cell_handle(); } // gives the simplex through which the current cell was entered. - /* For the first cell, containing the `source()` \f$ s \f$, + /* For the first cell, containing the `source()` \f$ s \f$, * this indicates the location of \f$ s \f$ in this cell. - */ + */ void entry( Locate_type& lt, int& li, int& lj ) const { lt = this->lt(); li = this->li(); lj = this->lj(); } // gives the simplex through which the previous cell was exited. - /* \pre the current cell is not the initial cell. - */ + /* \pre the current cell is not the initial cell. + */ void exit( Locate_type& lt, int& li, int& lj ) const { lt = prev_lt(); li = prev_li(); lj = prev_lj(); @@ -329,63 +329,63 @@ public: // \name Mutators // \{ // provides the increment postfix operator. - /* After incrementing the iterator, the current cell intersects the segment - * between `source()` and `target()` closer to the `target()` than the previous cell. - * \sa `operator++(int)`. + /* After incrementing the iterator, the current cell intersects the segment + * between `source()` and `target()` closer to the `target()` than the previous cell. + * \sa `operator++(int)`. * \pre The current cell does not contain the `target()`. */ SCI& operator++(); - + // provides the increment prefix operator. - /* After incrementing the iterator, the current cell intersects the segment - * between `source()` and `target()` closer to the `target()` than the previous cell. - * than the previous cell. - * \sa `operator++()`. + /* After incrementing the iterator, the current cell intersects the segment + * between `source()` and `target()` closer to the `target()` than the previous cell. + * than the previous cell. + * \sa `operator++()`. * \pre The current cell does not contain the `target()`. */ SCI operator++( int ); // iterates to the final cell, which contains the `target()`. - /* \return the final cell. + /* \return the final cell. */ Cell_handle complete(); // \} - + public: // \name Comparison // \{ // compares this iterator with `sci`. /* \param sci the other iterator. - * \return true iff the other iterator iterates the same triangulation along the same line segment - * and has the same current cell. - * \sa `operator!=( const SCI& t )`. + * \return true iff the other iterator iterates the same triangulation along the same line segment + * and has the same current cell. + * \sa `operator!=( const SCI& t )`. */ bool operator==( const SCI& sci ) const; - + // compares this iterator with `sci`. /* \param sci the other iterator. - * \return `false` iff the other iterator iterates the same triangulation along the same line segment - * and has the same current cell. - * \sa `operator==( const SCI& t ) const`. + * \return `false` iff the other iterator iterates the same triangulation along the same line segment + * and has the same current cell. + * \sa `operator==( const SCI& t ) const`. */ bool operator!=( const SCI& sci ) const; // compares the current cell with `ch`. /* \param ch a handle to the other cell. - * \return true iff the current cell is the same as the one pointed to by `ch`. - * \sa `operator!=( const Cell_handle& ch ) const`. - * \sa `operator==( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_cell_iterator_3 t )`. + * \return true iff the current cell is the same as the one pointed to by `ch`. + * \sa `operator!=( const Cell_handle& ch ) const`. + * \sa `operator==( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_cell_iterator_3 t )`. */ bool operator==( const Cell_handle& ch ) const { return ch == std::get<0>(_cur); } - + // compares the current cell with `ch`. /* \param ch a handle to the other cell. - * \return `false` iff the current cell is the same as the one pointed to by `ch`. - * \sa `operator==( const Cell_handle& ch )`. - * \sa `operator!=( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_cell_iterator_3 t )`. + * \return `false` iff the current cell is the same as the one pointed to by `ch`. + * \sa `operator==( const Cell_handle& ch )`. + * \sa `operator!=( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_cell_iterator_3 t )`. */ bool operator!=( const Cell_handle& ch ) const { @@ -393,21 +393,21 @@ public: } // \} - bool operator==( Nullptr_t CGAL_triangulation_assertion_code(n) ) const; - bool operator!=( Nullptr_t n ) const; + bool operator==( Nullptr_t CGAL_triangulation_assertion_code(n) ) const; + bool operator!=( Nullptr_t n ) const; protected: // \internal \name Protected Member Functions // \{ // walks to the next cell. /* \sa `complete()`. - */ + */ void walk_to_next(); - + // increments the iterator. /* This method may perform more actions based on the superclass. * \sa `complete()`. - */ + */ void increment() { typedef typename Incrementer::SCI Expected; #ifdef CGAL_TST_ASSUME_CORRECT_TYPES @@ -429,7 +429,7 @@ private: std::pair walk_to_next_3(const Simplex& prev, const Simplex& cur) const; void walk_to_next_3_inf( int inf ); - + // walk_to_next(), if the triangulation is 2D. void walk_to_next_2(); void walk_to_next_2_inf( int inf ); @@ -481,23 +481,23 @@ private: int const& prev_lj() const { return std::get<3>(_prev); } }; // class Triangulation_segment_cell_iterator_3 - + // compares a handle to a cell to a traverser. /* \param ch the handle to a cell. - * \param t the traverser. - * \return true iff the cell currently traversed by `t` is the same as the one pointed to by `ch`. - * \sa `operator!=( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_cell_iterator_3 t )`. - * \sa `Triangulation_segment_cell_iterator_3::operator==( const Cell_handle& ch )`. + * \param t the traverser. + * \return true iff the cell currently traversed by `t` is the same as the one pointed to by `ch`. + * \sa `operator!=( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_cell_iterator_3 t )`. + * \sa `Triangulation_segment_cell_iterator_3::operator==( const Cell_handle& ch )`. */ template < class Tr, class Inc > inline bool operator==( typename Tr::Cell_handle ch, Triangulation_segment_cell_iterator_3 tci ) { return tci == ch; } // compares a handle to a cell to a traverser. /* \param ch the handle to a cell. - * \param t the traverser. - * \return `false` iff the cell currently traversed by `t` is the same as the one pointed to by `ch`. - * \sa `operator==( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_cell_iterator_3 t )`. - * \sa `Triangulation_segment_cell_iterator_3::operator!=( const Cell_handle& ch )`. + * \param t the traverser. + * \return `false` iff the cell currently traversed by `t` is the same as the one pointed to by `ch`. + * \sa `operator==( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_cell_iterator_3 t )`. + * \sa `Triangulation_segment_cell_iterator_3::operator!=( const Cell_handle& ch )`. */ template < class Tr, class Inc > inline bool operator!=( typename Tr::Cell_handle ch, Triangulation_segment_cell_iterator_3 tci ) { return tci != ch; } @@ -622,7 +622,7 @@ private: case Locate_type::EDGE: _curr_simplex = Edge(cell, li, lj); break; - case Locate_type::FACET: + case Locate_type::FACET: _curr_simplex = Facet(cell, li); break; //the 3 cases below correspond to the case when _cell_iterator @@ -885,7 +885,7 @@ public: } // provides a dereference operator. - /* \return a pointer to the current cell. + /* \return a pointer to the current cell. */ const Simplex_3* operator->() { return &_curr_simplex; } diff --git a/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h index 7168ffe5aa5..d10f242eb83 100644 --- a/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h @@ -37,7 +37,7 @@ Triangulation_segment_cell_iterator_3( const Tr* tr, Vertex_handle s, Vertex_han _target = t->point(); _s_vertex = s; _t_vertex = t; - + Cell_handle c = s->cell(); // If a vertex of an infinite cell, we start inside the convex hull. int inf; @@ -246,7 +246,7 @@ template < class Tr, class Inc > void Triangulation_segment_cell_iterator_3:: walk_to_next() { CGAL_triangulation_precondition( has_next() ); - + // Check if the target is in the current cell. int ti; if( cell()->has_vertex( _t_vertex, ti ) ) { @@ -620,7 +620,7 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre CGAL_triangulation_assertion( pos == 6 ); prev_after_walk = Simplex( std::get<0>(cur), Tr::CELL, -1, -1 ); CGAL_triangulation_assertion( (! regular_case) || inside ); - break; + break; case 3: prev_after_walk = Simplex( std::get<0>(cur), Tr::FACET, 6-pos, -1 ); @@ -687,7 +687,7 @@ walk_to_next_3_inf( int inf ) o[li] = COPLANAR; continue; } - + // Skip the previous cell. Cell_handle next = cell()->neighbor(li); if( next == prev_cell() ) { @@ -954,7 +954,7 @@ walk_to_next_2() } case Tr::FACET: { int li = 0; - + Orientation o[3]; bool calc[3] = { false, false, false }; diff --git a/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp b/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp index 8caa8a077b2..96126c5708c 100644 --- a/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp @@ -19,7 +19,7 @@ typedef DT::Segment_cell_iterator Segment_cell_iterator; int main(int argc, char* argv[]) { const std::vector points = { { -2, 0, 0 }, - { 2, 0, 0 }, + { 2, 0, 0 }, { 0, 1, -1 }, { 0, -1, -1 }, { 0, 0, 1 }, @@ -35,10 +35,10 @@ int main(int argc, char* argv[]) std::vector vertices; vertices.reserve(points.size()); - + DT dt; for(auto p: points) vertices.push_back(dt.insert(p)); - + Cell_handle c; assert( dt.is_valid() ); assert( dt.is_cell(vertices[0], vertices[2], vertices[3], vertices[4], c)); diff --git a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp index c5cf3bf0b2d..3bb4a766245 100644 --- a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp @@ -28,7 +28,7 @@ bool test(const DT& dt, const Big_tuple& tuple); int main(int, char* []) { const std::vector points = { { -2, 0, 0 }, - { 2, 0, 0 }, + { 2, 0, 0 }, { 0, 1, -1 }, { 0, -1, -1 }, { 0, 0, 1 }, @@ -83,7 +83,7 @@ bool test(const DT& dt, const Big_tuple& tuple) << p2 << " )\n#\n"; Segment_simplex_iterator st = dt.segment_traverser_simplices_begin(p1, p2); Segment_simplex_iterator stend = dt.segment_traverser_simplices_end(); - + unsigned int nb_cells = 0, nb_facets = 0, nb_edges = 0, nb_vertex = 0; unsigned int nb_collinear = 0; diff --git a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp index 4766765176c..18a856b26a4 100644 --- a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp @@ -14,7 +14,7 @@ // // $URL$ // $Id$ -// +// // // Author(s) : Jane Tournois