mirror of https://github.com/CGAL/cgal
revised is_valid code and doc for Triangulation class
This commit is contained in:
parent
f4bc57b8ef
commit
ba7c89c860
|
|
@ -38,6 +38,14 @@ check all is_valid function, precise in the doc what they are doing.
|
||||||
details)", and that we re document the same function in the class documentation
|
details)", and that we re document the same function in the class documentation
|
||||||
with details on what exactly is performed by the implementation.
|
with details on what exactly is performed by the implementation.
|
||||||
OD: seems reasonable
|
OD: seems reasonable
|
||||||
|
SAM: I've changed my mind a little. We need some easy mandatory checks in
|
||||||
|
concepts T...DSFullCell and T...DSVertex so that we can rely on these tests in
|
||||||
|
the implementation of T.._data_structure, instead of having to re-implement them.
|
||||||
|
So : the concepts lists simple validity checks taht must be present, and refers
|
||||||
|
to the documentation of the models for possible additional validity checks
|
||||||
|
that are implemented.
|
||||||
|
--> This scheme is done (code&doc) for TDS TDSFullCell and TDSVertex and Triangulation.
|
||||||
|
--> ALL DONE.
|
||||||
|
|
||||||
small feature with iterator "all tuples"
|
small feature with iterator "all tuples"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -477,22 +477,20 @@ defined by the infinite full cell \ccc{c} must contain \ccc{p}.}
|
||||||
\begin{ccDebug}
|
\begin{ccDebug}
|
||||||
\ccHeading{Validity check}
|
\ccHeading{Validity check}
|
||||||
|
|
||||||
\ccMethod{bool is_valid(bool verbose = true) const;}
|
\ccMethod{bool is_valid(bool verbose=false) const;}
|
||||||
{Partially checks whether \ccVar\ is a triangulation. This function returns
|
{Partially checks whether \ccVar\ is a triangulation. This function returns
|
||||||
\ccc{true} if the combinatorial triangulation data structure's \ccc{is_valid()}
|
\ccc{true} if the combinatorial triangulation data structure's \ccc{is_valid()}
|
||||||
test returns \ccc{true} and if some geometric tests are passed with success.
|
test returns \ccc{true} and if some geometric tests are passed with success: It
|
||||||
%\note{is it really necessary to have the following :
|
is checked that the orientation of each finite full cell is positive and that
|
||||||
%For each infinite full cell, it is checked that the index of the infinite
|
the orientation of each infinite full cell is consistent with their finite
|
||||||
%vertex is 0. }
|
adjacent full cells.
|
||||||
For each finite full cell, it is checked that its orientation is
|
The \ccc{verbose} parameter is not used.%
|
||||||
positive.
|
|
||||||
\ccc{verbose} parameter is not used.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
\ccMethod{bool are_incident_full_cells_valid(Vertex_const_handle v, bool
|
\ccMethod{bool are_incident_full_cells_valid(Vertex_const_handle v, bool
|
||||||
verbose = true) const;} {Returns \ccc{true} if and only if all
|
verbose = false) const;} {Returns \ccc{true} if and only if all
|
||||||
finite full cells incident to \ccc{v} have positive orientation.
|
finite full cells incident to \ccc{v} have positive orientation.
|
||||||
\ccc{verbose} parameter is not used.
|
The \ccc{verbose} parameter is not used.%
|
||||||
}
|
}
|
||||||
|
|
||||||
\end{ccDebug}
|
\end{ccDebug}
|
||||||
|
|
|
||||||
|
|
@ -372,7 +372,7 @@ public:
|
||||||
bool is_infinite(Full_cell_const_handle s) const
|
bool is_infinite(Full_cell_const_handle s) const
|
||||||
{
|
{
|
||||||
CGAL_precondition(Full_cell_const_handle() != s);
|
CGAL_precondition(Full_cell_const_handle() != s);
|
||||||
for ( int i=0; i<= current_dimension(); ++i)
|
for(int i(0); i <= current_dimension(); ++i)
|
||||||
if (is_infinite(s->vertex(i))) return true;
|
if (is_infinite(s->vertex(i))) return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -439,7 +439,8 @@ public:
|
||||||
template< typename OutputIterator >
|
template< typename OutputIterator >
|
||||||
OutputIterator incident_upper_faces( Vertex_const_handle v, const int d,
|
OutputIterator incident_upper_faces( Vertex_const_handle v, const int d,
|
||||||
OutputIterator out)
|
OutputIterator out)
|
||||||
{
|
{ // FIXME: uncomment this function, since it uses a comparator specific to
|
||||||
|
// *geometric* triangulation (taking infinite vertex into account)
|
||||||
internal::Triangulation::Compare_vertices_for_upper_face<Self> cmp(*this);
|
internal::Triangulation::Compare_vertices_for_upper_face<Self> cmp(*this);
|
||||||
return tds().incident_upper_faces(v, d, out, cmp);
|
return tds().incident_upper_faces(v, d, out, cmp);
|
||||||
}
|
}
|
||||||
|
|
@ -498,8 +499,8 @@ public:
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - VALIDITY
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - VALIDITY
|
||||||
|
|
||||||
bool is_valid(bool = true, int = 0) const;
|
bool is_valid(bool = false, int = 0) const;
|
||||||
bool are_incident_full_cells_valid(Vertex_const_handle, bool = true, int = 0) const;
|
bool are_incident_full_cells_valid(Vertex_const_handle, bool = false, int = 0) const;
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POINT LOCATION
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POINT LOCATION
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue