mirror of https://github.com/CGAL/cgal
fix conversion warnings
This commit is contained in:
parent
97205e2c3c
commit
9275058449
|
|
@ -65,8 +65,8 @@ public:
|
||||||
std::size_t squareYmin = (j < square ? 0 : j - square);
|
std::size_t squareYmin = (j < square ? 0 : j - square);
|
||||||
std::size_t squareYmax = (std::min) (grid.height()-1, j + square);
|
std::size_t squareYmax = (std::min) (grid.height()-1, j + square);
|
||||||
|
|
||||||
int NB_echo_sup=0;
|
std::size_t NB_echo_sup=0;
|
||||||
int NB_echo_total=0;
|
std::size_t NB_echo_total=0;
|
||||||
|
|
||||||
for(std::size_t k = squareXmin; k <= squareXmax; k++){
|
for(std::size_t k = squareXmin; k <= squareXmax; k++){
|
||||||
for(std::size_t l = squareYmin; l <= squareYmax; l++){
|
for(std::size_t l = squareYmin; l <= squareYmax; l++){
|
||||||
|
|
@ -75,9 +75,9 @@ public:
|
||||||
|
|
||||||
if(grid.indices(k,l).size()>0){
|
if(grid.indices(k,l).size()>0){
|
||||||
|
|
||||||
for(int t=0; t<(int)grid.indices(k,l).size();t++){
|
for(std::size_t t=0; t<grid.indices(k,l).size();t++){
|
||||||
|
|
||||||
int ip = grid.indices(k,l)[t];
|
std::size_t ip = grid.indices(k,l)[t];
|
||||||
if(get(echo_map, begin[ip]) > 1)
|
if(get(echo_map, begin[ip]) > 1)
|
||||||
NB_echo_sup++;
|
NB_echo_sup++;
|
||||||
}
|
}
|
||||||
|
|
@ -100,8 +100,8 @@ public:
|
||||||
|
|
||||||
}
|
}
|
||||||
for(std::size_t i = 0; i < (std::size_t)(end - begin); i++){
|
for(std::size_t i = 0; i < (std::size_t)(end - begin); i++){
|
||||||
int I= grid.x(i);
|
std::size_t I= grid.x(i);
|
||||||
int J= grid.y(i);
|
std::size_t J= grid.y(i);
|
||||||
echo_scatter.push_back((double)Scatter(I,J));
|
echo_scatter.push_back((double)Scatter(I,J));
|
||||||
}
|
}
|
||||||
this->compute_mean_max (echo_scatter, this->mean, this->max);
|
this->compute_mean_max (echo_scatter, this->mean, this->max);
|
||||||
|
|
|
||||||
|
|
@ -142,8 +142,8 @@ public:
|
||||||
|
|
||||||
elevation_attribute.reserve(end - begin);
|
elevation_attribute.reserve(end - begin);
|
||||||
for (std::size_t i = 0; i < (std::size_t)(end - begin); i++){
|
for (std::size_t i = 0; i < (std::size_t)(end - begin); i++){
|
||||||
int I = grid.x(i);
|
std::size_t I = grid.x(i);
|
||||||
int J = grid.y(i);
|
std::size_t J = grid.y(i);
|
||||||
elevation_attribute.push_back ((double)(get(point_map, begin[i]).z()-dtm(I,J)));
|
elevation_attribute.push_back ((double)(get(point_map, begin[i]).z()-dtm(I,J)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -99,9 +99,9 @@ public:
|
||||||
if(CGAL::sqrt(pow((double)k-i,2)+pow((double)l-j,2))
|
if(CGAL::sqrt(pow((double)k-i,2)+pow((double)l-j,2))
|
||||||
<=(double)0.5*radius_neighbors/grid_resolution
|
<=(double)0.5*radius_neighbors/grid_resolution
|
||||||
&& (grid.indices(k,l).size()>0))
|
&& (grid.indices(k,l).size()>0))
|
||||||
for(int t=0; t<(int)grid.indices(k,l).size();t++)
|
for(std::size_t t=0; t<grid.indices(k,l).size();t++)
|
||||||
{
|
{
|
||||||
int ip = grid.indices(k,l)[t];
|
std::size_t ip = grid.indices(k,l)[t];
|
||||||
hori.push_back (get(point_map, begin[ip]).z());
|
hori.push_back (get(point_map, begin[ip]).z());
|
||||||
}
|
}
|
||||||
if (hori.empty())
|
if (hori.empty())
|
||||||
|
|
@ -135,8 +135,8 @@ public:
|
||||||
}
|
}
|
||||||
for (std::size_t i = 0; i < (std::size_t)(end - begin);i++)
|
for (std::size_t i = 0; i < (std::size_t)(end - begin);i++)
|
||||||
{
|
{
|
||||||
int I= grid.x(i);
|
std::size_t I= grid.x(i);
|
||||||
int J= grid.y(i);
|
std::size_t J= grid.y(i);
|
||||||
vertical_dispersion.push_back((double)Dispersion(I,J));
|
vertical_dispersion.push_back((double)Dispersion(I,J));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ public:
|
||||||
void k_neighbors (const Point& query, const std::size_t k, OutputIterator output) const
|
void k_neighbors (const Point& query, const std::size_t k, OutputIterator output) const
|
||||||
{
|
{
|
||||||
CGAL_assertion (m_tree != NULL);
|
CGAL_assertion (m_tree != NULL);
|
||||||
Knn search (*m_tree, query, k, 0, true, m_distance);
|
Knn search (*m_tree, query, (unsigned int)k, 0, true, m_distance);
|
||||||
for (typename Knn::iterator it = search.begin(); it != search.end(); ++ it)
|
for (typename Knn::iterator it = search.begin(); it != search.end(); ++ it)
|
||||||
*(output ++) = it->first;
|
*(output ++) = it->first;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ class Planimetric_grid
|
||||||
typedef typename Kernel::Point_3 Point_3;
|
typedef typename Kernel::Point_3 Point_3;
|
||||||
typedef typename Kernel::Iso_cuboid_3 Iso_cuboid_3;
|
typedef typename Kernel::Iso_cuboid_3 Iso_cuboid_3;
|
||||||
|
|
||||||
typedef Image<std::vector<int> > Image_indices;
|
typedef Image<std::vector<std::size_t> > Image_indices;
|
||||||
typedef Image<bool> Image_bool;
|
typedef Image<bool> Image_bool;
|
||||||
|
|
||||||
Image_indices m_grid;
|
Image_indices m_grid;
|
||||||
|
|
@ -77,7 +77,7 @@ public:
|
||||||
/*!
|
/*!
|
||||||
\brief Returns the indices of points lying in the given indexed cell.
|
\brief Returns the indices of points lying in the given indexed cell.
|
||||||
*/
|
*/
|
||||||
const std::vector<int>& indices(std::size_t x, std::size_t y) const { return m_grid(x,y); }
|
const std::vector<std::size_t>& indices(std::size_t x, std::size_t y) const { return m_grid(x,y); }
|
||||||
/*!
|
/*!
|
||||||
\brief Returns `true` if the indexed cell is to be used for classification.
|
\brief Returns `true` if the indexed cell is to be used for classification.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -205,7 +205,8 @@ public:
|
||||||
|
|
||||||
/// \cond SKIP_IN_MANUAL
|
/// \cond SKIP_IN_MANUAL
|
||||||
|
|
||||||
double classification_value (std::size_t class_type, int pt_index) const
|
double classification_value (const std::size_t& class_type,
|
||||||
|
const std::size_t& pt_index) const
|
||||||
{
|
{
|
||||||
double out = 0.;
|
double out = 0.;
|
||||||
if (m_multiplicative)
|
if (m_multiplicative)
|
||||||
|
|
@ -267,7 +268,7 @@ public:
|
||||||
for (std::size_t s = 0; s < m_input.size(); s++)
|
for (std::size_t s = 0; s < m_input.size(); s++)
|
||||||
{
|
{
|
||||||
|
|
||||||
int nb_class_best=0;
|
std::size_t nb_class_best=0;
|
||||||
|
|
||||||
double val_class_best = (std::numeric_limits<double>::max)();
|
double val_class_best = (std::numeric_limits<double>::max)();
|
||||||
std::vector<double> values;
|
std::vector<double> values;
|
||||||
|
|
@ -336,7 +337,7 @@ public:
|
||||||
mean[j] += values[j][neighbors[n]];
|
mean[j] += values[j][neighbors[n]];
|
||||||
}
|
}
|
||||||
|
|
||||||
int nb_class_best=0;
|
std::size_t nb_class_best=0;
|
||||||
double val_class_best = (std::numeric_limits<double>::max)();
|
double val_class_best = (std::numeric_limits<double>::max)();
|
||||||
for(std::size_t k = 0; k < mean.size(); ++ k)
|
for(std::size_t k = 0; k < mean.size(); ++ k)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -254,9 +254,9 @@ public Q_SLOTS:
|
||||||
disable_everything();
|
disable_everything();
|
||||||
enable_computation();
|
enable_computation();
|
||||||
|
|
||||||
ui_widget.numberOfScalesSpinBox->setValue(item->nb_scales());
|
ui_widget.numberOfScalesSpinBox->setValue((int)(item->nb_scales()));
|
||||||
ui_widget.number_of_trials->setValue(item->number_of_trials());
|
ui_widget.number_of_trials->setValue((int)(item->number_of_trials()));
|
||||||
ui_widget.smoothingDoubleSpinBox->setValue(item->smoothing());
|
ui_widget.smoothingDoubleSpinBox->setValue((int)(item->smoothing()));
|
||||||
|
|
||||||
// Clear class types
|
// Clear class types
|
||||||
for (std::size_t i = 0; i < class_rows.size(); ++ i)
|
for (std::size_t i = 0; i < class_rows.size(); ++ i)
|
||||||
|
|
@ -658,7 +658,7 @@ public Q_SLOTS:
|
||||||
void add_new_class (const ClassRow& class_row)
|
void add_new_class (const ClassRow& class_row)
|
||||||
{
|
{
|
||||||
class_rows.push_back (class_row);
|
class_rows.push_back (class_row);
|
||||||
int position = class_rows.size();
|
int position = static_cast<int>(class_rows.size());
|
||||||
|
|
||||||
ui_widget.gridLayout_3->addWidget (class_rows.back().label, position, 0);
|
ui_widget.gridLayout_3->addWidget (class_rows.back().label, position, 0);
|
||||||
ui_widget.gridLayout_3->addWidget (class_rows.back().color_button, position, 1);
|
ui_widget.gridLayout_3->addWidget (class_rows.back().color_button, position, 1);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue