mirror of https://github.com/CGAL/cgal
int -> size_type/std::size_t
This commit is contained in:
parent
623bd3e119
commit
c79a1ebbf6
|
|
@ -122,7 +122,7 @@ The following method allows one to insert several points. It returns the
|
|||
number of inserted points.
|
||||
|
||||
\ccMethod{template < class InputIterator >
|
||||
int
|
||||
size_type
|
||||
insert(InputIterator first, InputIterator last);}
|
||||
{Inserts the points in the iterator range $\left[\right.$\ccc{first},
|
||||
\ccc{last}$\left.\right)$. Returns the number of inserted points.
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ constructed handle.}
|
|||
The following method allows one to insert several points.
|
||||
|
||||
\ccMethod{template < class InputIterator >
|
||||
int
|
||||
size_type
|
||||
insert(InputIterator first, InputIterator last);}
|
||||
{Inserts the weighted points in the range $\left[\right.$\ccc{first},
|
||||
\ccc{last}$\left.\right)$.
|
||||
|
|
|
|||
|
|
@ -637,7 +637,7 @@ The optional argument \ccc{start} is used as a starting place for the search.}
|
|||
\textit{locate()} above.}
|
||||
|
||||
\ccMethod{template < class InputIterator >
|
||||
int
|
||||
size_type
|
||||
insert(InputIterator first, InputIterator last);}
|
||||
{Inserts the points in the range $\left[\right.$\ccc{first},
|
||||
\ccc{last}$\left.\right)$. Returns the number of inserted points.
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ int main()
|
|||
|
||||
Triangulation T(L.begin(), L.end());
|
||||
|
||||
int n = T.number_of_vertices();
|
||||
Triangulation::size_type n = T.number_of_vertices();
|
||||
|
||||
// insertion from a vector :
|
||||
std::vector<Point> V(3);
|
||||
|
|
|
|||
|
|
@ -202,10 +202,10 @@ public:
|
|||
}
|
||||
|
||||
template < class InputIterator >
|
||||
int
|
||||
size_type
|
||||
insert(InputIterator first, InputIterator last)
|
||||
{
|
||||
int n = number_of_vertices();
|
||||
size_type n = number_of_vertices();
|
||||
|
||||
std::vector<Point> points (first, last);
|
||||
spatial_sort (points.begin(), points.end(), geom_traits());
|
||||
|
|
@ -357,9 +357,9 @@ public:
|
|||
OutputItCells fit);
|
||||
|
||||
template < typename InputIterator >
|
||||
int remove(InputIterator first, InputIterator beyond)
|
||||
size_type remove(InputIterator first, InputIterator beyond)
|
||||
{
|
||||
int n = number_of_vertices();
|
||||
size_type n = number_of_vertices();
|
||||
while (first != beyond) {
|
||||
remove(*first);
|
||||
++first;
|
||||
|
|
@ -1130,7 +1130,7 @@ is_delaunay_after_displacement(Vertex_handle v, const Point &p) const
|
|||
Point ant = v->point();
|
||||
v->set_point(p);
|
||||
|
||||
int size;
|
||||
std::size_t size;
|
||||
|
||||
// are incident cells well-oriented
|
||||
std::vector<Cell_handle> cells;
|
||||
|
|
@ -1155,7 +1155,7 @@ is_delaunay_after_displacement(Vertex_handle v, const Point &p) const
|
|||
facets.reserve(128);
|
||||
this->incident_facets(v, std::back_inserter(facets));
|
||||
size = facets.size();
|
||||
for(int i=0; i<size; i++)
|
||||
for(std::size_t i=0; i<size; i++)
|
||||
{
|
||||
const Facet &f = facets[i];
|
||||
Cell_handle c = f.first;
|
||||
|
|
|
|||
|
|
@ -145,10 +145,10 @@ public:
|
|||
}
|
||||
|
||||
template < class InputIterator >
|
||||
int
|
||||
size_type
|
||||
insert(InputIterator first, InputIterator last)
|
||||
{
|
||||
int n = number_of_vertices();
|
||||
size_type n = number_of_vertices();
|
||||
|
||||
std::vector<Weighted_point> points(first, last);
|
||||
spatial_sort (points.begin(), points.end(), geom_traits());
|
||||
|
|
@ -283,9 +283,9 @@ public:
|
|||
void remove (Vertex_handle v);
|
||||
|
||||
template < typename InputIterator >
|
||||
int remove(InputIterator first, InputIterator beyond)
|
||||
size_type remove(InputIterator first, InputIterator beyond)
|
||||
{
|
||||
int n = number_of_vertices();
|
||||
size_type n = number_of_vertices();
|
||||
while (first != beyond) {
|
||||
remove (*first);
|
||||
++first;
|
||||
|
|
|
|||
|
|
@ -621,9 +621,9 @@ public:
|
|||
Hidden_points_visitor &hider);
|
||||
|
||||
template < class InputIterator >
|
||||
int insert(InputIterator first, InputIterator last)
|
||||
size_type insert(InputIterator first, InputIterator last)
|
||||
{
|
||||
int n = number_of_vertices();
|
||||
size_type n = number_of_vertices();
|
||||
|
||||
std::vector<Point> points (first, last);
|
||||
spatial_sort (points.begin(), points.end(), geom_traits());
|
||||
|
|
@ -932,7 +932,7 @@ protected:
|
|||
faces_pt.push_back(fc);
|
||||
fc = fc->neighbor((fc->index(inserted) + 1)%3);
|
||||
} while(fc != done);
|
||||
int ss = faces_pt.size();
|
||||
std::size_t ss = faces_pt.size();
|
||||
for(int k=0; k<ss; k++)
|
||||
{
|
||||
Cell_handle f = faces_pt[k];
|
||||
|
|
@ -1364,14 +1364,15 @@ operator<< (std::ostream& os, const Triangulation_3<GT, Tds> &tr)
|
|||
// when dimension < 3 : the same with faces of maximal dimension
|
||||
{
|
||||
typedef Triangulation_3<GT, Tds> Triangulation;
|
||||
typedef typename Triangulation::size_type size_type;
|
||||
typedef typename Triangulation::Vertex_handle Vertex_handle;
|
||||
typedef typename Triangulation::Vertex_iterator Vertex_iterator;
|
||||
typedef typename Triangulation::Cell_iterator Cell_iterator;
|
||||
typedef typename Triangulation::Edge_iterator Edge_iterator;
|
||||
typedef typename Triangulation::Facet_iterator Facet_iterator;
|
||||
|
||||
|
||||
// outputs dimension and number of vertices
|
||||
int n = tr.number_of_vertices();
|
||||
size_type n = tr.number_of_vertices();
|
||||
if (is_ascii(os))
|
||||
os << tr.dimension() << std::endl << n << std::endl;
|
||||
else
|
||||
|
|
@ -3973,7 +3974,7 @@ move_if_no_collision(Vertex_handle v, const Point &p,
|
|||
return v;
|
||||
}
|
||||
|
||||
int n_vertices = tds().number_of_vertices();
|
||||
size_type n_vertices = tds().number_of_vertices();
|
||||
|
||||
if((lt == OUTSIDE_AFFINE_HULL) && (dim == 1) && (n_vertices == 3)) {
|
||||
v->set_point(p);
|
||||
|
|
@ -4058,8 +4059,8 @@ move_if_no_collision(Vertex_handle v, const Point &p,
|
|||
faces_pt.push_back(fc);
|
||||
fc = fc->neighbor((fc->index(inserted) + 1)%3);
|
||||
} while(fc != done);
|
||||
int ss = faces_pt.size();
|
||||
for(int k=0; k<ss; k++)
|
||||
std::size_t ss = faces_pt.size();
|
||||
for(std::size_t k=0; k<ss; k++)
|
||||
{
|
||||
Cell_handle f = faces_pt[k];
|
||||
int i = f->index(inserted);
|
||||
|
|
@ -4077,9 +4078,9 @@ move_if_no_collision(Vertex_handle v, const Point &p,
|
|||
// verify if p and two static vertices are collinear in this case
|
||||
std::vector<Cell_handle> ics;
|
||||
incident_cells(infinite_vertex(), std::back_inserter(ics));
|
||||
int size = ics.size();
|
||||
std::size_t size = ics.size();
|
||||
Cell_handle finf;
|
||||
for (int i=0; i<size; i++) {
|
||||
for (std::size_t i=0; i<size; i++) {
|
||||
finf = ics[i];
|
||||
if(!finf->has_vertex(v)) break;
|
||||
}
|
||||
|
|
@ -4243,8 +4244,8 @@ move_if_no_collision(Vertex_handle v, const Point &p,
|
|||
std::vector<Cell_handle> cells_pt;
|
||||
cells_pt.reserve(64);
|
||||
incident_cells(inserted, std::back_inserter(cells_pt));
|
||||
int size = cells_pt.size();
|
||||
for(int i=0; i<size; i++) {
|
||||
std::size_t size = cells_pt.size();
|
||||
for(std::size_t i=0; i<size; i++) {
|
||||
Cell_handle c = cells_pt[i];
|
||||
c->set_vertex(c->index(inserted), v);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1277,13 +1277,14 @@ operator<<(std::ostream& os, const Triangulation_data_structure_3<Vb,Cb> &tds)
|
|||
// when dimension < 3 : the same with faces of maximal dimension
|
||||
{
|
||||
typedef Triangulation_data_structure_3<Vb,Cb> Tds;
|
||||
typedef typename Tds::size_type size_type;
|
||||
typedef typename Tds::Vertex_handle Vertex_handle;
|
||||
typedef typename Tds::Vertex_iterator Vertex_iterator;
|
||||
|
||||
std::map<Vertex_handle, int> V;
|
||||
|
||||
// outputs dimension and number of vertices
|
||||
int n = tds.number_of_vertices();
|
||||
size_type n = tds.number_of_vertices();
|
||||
|
||||
if (is_ascii(os))
|
||||
os << tds.dimension() << std::endl << n << std::endl;
|
||||
|
|
@ -1297,7 +1298,7 @@ operator<<(std::ostream& os, const Triangulation_data_structure_3<Vb,Cb> &tds)
|
|||
return os;
|
||||
|
||||
// index the vertices
|
||||
int i = 0;
|
||||
size_type i = 0;
|
||||
for (Vertex_iterator it=tds.vertices_begin(); it != tds.vertices_end(); ++it)
|
||||
V[it] = i++;
|
||||
|
||||
|
|
@ -1871,7 +1872,7 @@ print_cells(std::ostream& os, const std::map<Vertex_handle, int> &V ) const
|
|||
switch ( dimension() ) {
|
||||
case 3:
|
||||
{
|
||||
int m = number_of_cells();
|
||||
size_type m = number_of_cells();
|
||||
if(is_ascii(os))
|
||||
os << m << std::endl;
|
||||
else
|
||||
|
|
@ -1913,7 +1914,7 @@ print_cells(std::ostream& os, const std::map<Vertex_handle, int> &V ) const
|
|||
}
|
||||
case 2:
|
||||
{
|
||||
int m = number_of_facets();
|
||||
size_type m = number_of_facets();
|
||||
if(is_ascii(os))
|
||||
os << m << std::endl;
|
||||
else
|
||||
|
|
@ -1957,7 +1958,7 @@ print_cells(std::ostream& os, const std::map<Vertex_handle, int> &V ) const
|
|||
}
|
||||
case 1:
|
||||
{
|
||||
int m = number_of_edges();
|
||||
size_type m = number_of_edges();
|
||||
if(is_ascii(os))
|
||||
os << m << std::endl;
|
||||
else
|
||||
|
|
@ -3266,7 +3267,7 @@ copy_tds(const Tds & tds, Vertex_handle vert )
|
|||
|
||||
clear();
|
||||
|
||||
int n = tds.number_of_vertices();
|
||||
size_type n = tds.number_of_vertices();
|
||||
set_dimension(tds.dimension());
|
||||
|
||||
// Number of pointers to cell/vertex to copy per cell.
|
||||
|
|
@ -3288,7 +3289,7 @@ copy_tds(const Tds & tds, Vertex_handle vert )
|
|||
std::map< Vertex_handle, Vertex_handle > V;
|
||||
std::map< Cell_handle, Cell_handle > F;
|
||||
|
||||
for (i=0; i <= n-1; ++i)
|
||||
for (size_type i=0; i <= n-1; ++i)
|
||||
V[ TV[i] ] = create_vertex(TV[i]);
|
||||
|
||||
// Create the cells.
|
||||
|
|
|
|||
|
|
@ -125,9 +125,9 @@ public:
|
|||
int li, int lj);
|
||||
|
||||
template < class InputIterator >
|
||||
int insert(InputIterator first, InputIterator last)
|
||||
size_type insert(InputIterator first, InputIterator last)
|
||||
{
|
||||
int n = number_of_vertices();
|
||||
size_type n = number_of_vertices();
|
||||
|
||||
std::vector<Point> points (first, last);
|
||||
spatial_sort (points.begin(), points.end(), geom_traits());
|
||||
|
|
@ -157,9 +157,9 @@ public:
|
|||
void remove(Vertex_handle v);
|
||||
|
||||
template < typename InputIterator >
|
||||
int remove(InputIterator first, InputIterator beyond)
|
||||
size_type remove(InputIterator first, InputIterator beyond)
|
||||
{
|
||||
int n = number_of_vertices();
|
||||
size_type n = number_of_vertices();
|
||||
while (first != beyond) {
|
||||
remove(*first);
|
||||
++first;
|
||||
|
|
@ -539,7 +539,7 @@ move_point(Vertex_handle v, const Point & p)
|
|||
CGAL_triangulation_precondition(v != Vertex_handle());
|
||||
Vertex_handle old, ret;
|
||||
|
||||
for (int l = 0; l < maxlevel; ++l) {
|
||||
for (std::size_t l = 0; l < maxlevel; ++l) {
|
||||
Vertex_handle u = v->up();
|
||||
Vertex_handle w = hierarchy[l]->move_point(v, p);
|
||||
if (l == 0) {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#define CGAL_TEST_CLS_ITERATOR_C
|
||||
|
||||
template < class Triangulation >
|
||||
int
|
||||
typename Triangulation::size_type
|
||||
_test_vertex_iterator( const Triangulation &T )
|
||||
{
|
||||
typedef typename Triangulation::size_type size_type;
|
||||
|
|
|
|||
|
|
@ -874,7 +874,7 @@ _test_cls_triangulation_3(const Triangulation &)
|
|||
assert(3*nb_f_facets == f_facets.size());
|
||||
assert(3*nb_f_facets == f_cells.size());
|
||||
|
||||
int nb_f_vertices = T2[k]->number_of_vertices();
|
||||
typename Cls::size_type nb_f_vertices = T2[k]->number_of_vertices();
|
||||
|
||||
// Euler relation
|
||||
assert(nb_f_vertices - nb_f_edges + nb_f_facets == 1);
|
||||
|
|
@ -943,7 +943,7 @@ _test_cls_triangulation_3(const Triangulation &)
|
|||
assert(3*nb_f_facets == f_facets.size());
|
||||
assert(4*nb_f_cells == f_cells.size());
|
||||
|
||||
int nb_f_vertices = T3[k]->number_of_vertices();
|
||||
typename Cls::size_type nb_f_vertices = T3[k]->number_of_vertices();
|
||||
|
||||
// Euler relation
|
||||
assert(nb_f_vertices - nb_f_edges + nb_f_facets - nb_f_cells == 1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue