Changes according to reviews (with Olivier)

This commit is contained in:
Clement Jamin 2014-03-20 18:15:38 +01:00
parent 5e351fe56e
commit efe8aabd90
11 changed files with 42 additions and 36 deletions

View File

@ -23,7 +23,7 @@ structure. `TriangulationDataStructure` must be a model of the concept
be defined by specifying only the first parameter, or by using the
tag `CGAL::Default` as
the second parameter. In both cases, `TriangulationDataStructure` defaults to
`Triangulation_data_structure<Maximal_dimension<TriangulationTraits::Point_d>::type, Triangulation_vertex<TriangulationTraits>, Triangulation_full_cell<TriangulationTraits>>`.
`Triangulation_data_structure<TriangulationTraits::Dimension, Triangulation_vertex<TriangulationTraits>, Triangulation_full_cell<TriangulationTraits>>`.
The class `Delaunay_triangulation<DelaunayTriangulationTraits, TriangulationDataStructure>` inherits all the types
defined in the base class `Triangulation<DelaunayTriangulationTraits, TriangulationDataStructure>`. Additionally, it

View File

@ -22,7 +22,7 @@ structure. `TriangulationDataStructure` must be a model of the concept
be defined by specifying only the first parameter, or by using the
tag `CGAL::Default` as
the second parameter. In both cases, `TriangulationDataStructure` defaults to
`Triangulation_data_structure<Maximal_dimension<TriangulationTraits::Point_d>::type, Triangulation_vertex<TriangulationTraits>, Triangulation_full_cell<TriangulationTraits>>`.
`Triangulation_data_structure<TriangulationTraits::Dimension, Triangulation_vertex<TriangulationTraits>, Triangulation_full_cell<TriangulationTraits>>`.
Input/Output
--------------

View File

@ -73,9 +73,7 @@ The `is_valid` method is only minimally defined in the
precisely here, for the model `Triangulation_ds_full_cell`.
\cgalAdvanced Implements the validity checks required by the concept
`TriangulationDSFullCell`. In addition, it is checked that there is no
`NULL` handle to vertices in the middle of non-`NULL` ones, that is,
that the internal memory layout is not corrupted.
`TriangulationDSFullCell`.
*/
bool is_valid(bool verbose=false) const;

View File

@ -60,10 +60,8 @@ typedef Data Data;
/*!
Sets the maximum possible dimension of the cell to `dmax`.
The parameter `t` is passed to the `Data` constructor.
*/
template< typename T> Triangulation_full_cell(int dmax, const T
& t);
template< typename T> Triangulation_full_cell(int dmax);
/// @}

View File

@ -63,10 +63,10 @@ Triangulation_face(Full_cell_handle c);
/*!
Setup the `Face` knowing
the maximal dimension `ad`. Sets the `Face`'s full cell to the
the maximal dimension `md`. Sets the `Face`'s full cell to the
default-constructed one.
*/
Triangulation_face(const int ad);
Triangulation_face(const int md);
/// @}

View File

@ -267,7 +267,7 @@ full cells are also good.
The argument `tp` is a predicate, i.e.\ a function or a functor providing
`operator()`, that takes as argument a `Facet`
whose defining `Full_cell` is good.
whose `Full_cell` is good.
The predicate must return `true`
if the traversal of that `Facet` leads to a good full cell.
@ -330,8 +330,7 @@ Returns a handle to the `i`-th `Vertex` of the `Full_cell` `c`.
Vertex_handle vertex(Full_cell_handle c, const int i) const;
/*!
Returns the index of the vertex mirror of the `i`-th vertex of `c`.
Equivalently, returns the index of `c` as a neighbor of its `i`-th neighbor.
Returns the index of `c` as a neighbor of its `i`-th neighbor.
\pre \f$0 \leq i \leq \f$`tds`.`current_dimension`()
and `c!=Full_cell_handle()`.
@ -339,8 +338,7 @@ and `c!=Full_cell_handle()`.
int mirror_index(Full_cell_handle c, int i) const;
/*!
Returns the vertex mirror of the `i`-th vertex of `c`.
Equivalently, returns the vertex of the `i`-th neighbor of `c`
Returns the vertex of the `i`-th neighbor of `c`
that is not vertex of `c`.
\pre \f$0 \leq i \leq \f$`tds`.`current_dimension`()
@ -472,7 +470,7 @@ does not, with `f=(c,i)`.
\f$ H\f$ the union of full cells in \f$ C\f$ is simply connected and its
boundary \f$ \partial H\f$ is a
combinatorial triangulation of the sphere \f$ \mathcal S^{d-1}\f$.
All vertices of the triangulation are on \f$ \partial H\f$.
All vertices of cells of \f$ C\f$ are on \f$ \partial H\f$.
\cgalFigureBegin{triangulationfiginserthole,insert-in-hole.png}
Insertion in a hole, \f$ d=2\f$
@ -504,9 +502,9 @@ full cell is such that, if `f` was a full cell of maximal dimension in the
initial complex, then `(f,v)`, in this order, is the corresponding full cell
in the updated triangulation. A handle to `v` is returned
(see Figure \cgalFigureRef{triangulationfiginsertincreasedim}).
\pre `tds`.
\pre
If the current dimension is -2 (empty triangulation), then `star`
has to be omitted, otherwise
can be omitted (it is ignored), otherwise
the current dimension must be strictly less than the maximal dimension
and `star` must be a vertex of `tds`.
@ -629,6 +627,9 @@ neighbors as its number of facets (`current_dimension()+1`).
vertices with each of its neighbor.
</UL>
When `verbose` is set to `true`, messages are printed to give
a precise indication on the kind of invalidity encountered.
Returns `true` if all the tests pass, `false` if any test fails. See
the documentation for the models of this concept to see the additionnal (if
any) validity checks that they implement.

View File

@ -19,8 +19,8 @@
\cgalPkgShortInfoEnd
\cgalPkgDescriptionEnd
A triangulation is a pure simplicial complex which is connected and has no
singularities. Its faces are such that two of them either do not
A triangulation is a pure manifold simplicial complex which is connected and has no
boundaries. Its faces are such that two of them either do not
intersect or share a common face.
The basic triangulation class of \cgal is primarily designed to

View File

@ -41,6 +41,12 @@ In the sequel, we will call these maximal simplices <I>full cells</I>.
A <I>face</I> of a simplex is a subset of it.
A <I>proper face</I> of a simplex is a strict subset of it.
\cgalModifBegin
A complex has <i>no boundaries</i> if any proper face of a simplex is also a
proper face of another simplex. A pure complex is <i>manifold</i> if all faces
of dimension \f$ d-1 \f$ are proper faces of exactly two simplices.
\cgalModifEnd
If the vertices are embedded into Euclidean space \f$ \R^d\f$, we deal with
<I>finite simplicial complexes</I> which have slightly different simplices
and additional requirements:
@ -56,8 +62,8 @@ entry</A> for more about simplicial complexes.
## What's in this package? ##
This \cgal package deals with pure simplicial complexes which are connected
and have no singularities, which
This \cgal package deals with pure manifold simplicial complexes which are connected
and have no boundaries, which
we will simply call in the sequel <I>triangulations</I>. It provides three main classes
for creating and manipulating triangulations.
@ -65,9 +71,12 @@ The class `CGAL::Triangulation_data_structure<Dimensionality, TriangulationDSVer
class are not embedded in Euclidean space but are only of combinatorial
nature.
The class `CGAL::Triangulation<TriangulationTraits, TriangulationDataStructure>` embeds an abstract
triangulation in Euclidean space, thus forming a geometric
triangulation. Methods are
\cgalModifBegin
The class `CGAL::Triangulation<TriangulationTraits, TriangulationDataStructure>`
describes an embedded triangulation that has as vertices a given set of points
and which fills the convex hull of these points.
\cgalModifEnd
Methods are
provided for the insertion of points in the triangulation, the
traversal of various elements of the triangulation, as well as the localization of a
query point inside the triangulation.
@ -332,6 +341,10 @@ The template parameter `TriangulationTraits` must be a model of the concept
`TriangulationTraits` which provides the geometric `Point` type as well
as various geometric predicates used by the `Triangulation` class.
\cgalModifBegin
The dimension of the predicates provided by `TriangulationTraits` must match
the dimension of the `TriangulationDataStructure`.
\cgalModifEnd
\cgalModifBegin
The template parameter `TriangulationDataStructure` must be a model of the concept
@ -451,6 +464,8 @@ triangulation, and sorts the points with spatial sort to insert a
set of points. Thus the theoretical complexity are
\f$ O(n\log n)\f$ for inserting \f$ n\f$ random points and \f$ O(n^{\frac{1}{d}})\f$
for inserting one point in a triangulation of \f$ n\f$ random points.
In the worst case, the expected complexity is
\f$ O(n^{\lceil\frac{d}{2}\rceil}+n\log n)\f$.
The actual timing are the following:

View File

@ -28,7 +28,9 @@ int main()
// collect faces of dimension 1 (edges) incident to the infinite vertex
std::cout << "There are " << edges.size()
<< " vertices on the convex hull." << std::endl;
#include "triangulation1.cpp"
#include "triangulation2.cpp"
#include "triangulation1.cpp" // See below
#include "triangulation2.cpp"
return 0;
}

View File

@ -1140,10 +1140,6 @@ Triangulation_data_structure<Dim, Vb, Fcb>
CGAL_precondition( Vertex_handle() != star );
CGAL_expensive_precondition(is_vertex(star));
}
else
{
CGAL_precondition( Vertex_handle() == star );
}
set_current_dimension(prev_cur_dim + 1);
Vertex_handle v = new_vertex();

View File

@ -57,14 +57,10 @@ public:
typedef typename Base::template Rebind_TDS<TDS2>::Other TDSFullCell2;
typedef Triangulation_full_cell<TriangulationTraits, Data_, TDSFullCell2> Other;
};
Triangulation_full_cell(const int d)
: Base(d), data_() {}
template< typename T >
Triangulation_full_cell(const int d, const T & t)
: Base(d), data_(t) {}
Triangulation_full_cell(const Self & s)
: Base(s), data_(s.data_) {}