summaryrefslogtreecommitdiff
path: root/src/Subsampling
diff options
context:
space:
mode:
authorskachano <skachano@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-10-05 09:56:06 +0000
committerskachano <skachano@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-10-05 09:56:06 +0000
commit9f0861b57c2479ffece89e2e4e949a66ef9b47ed (patch)
treef4a0d082e7c52026c44ce212dce036fb469c5551 /src/Subsampling
parent404297f53b222f34a436638117ffb1affca18e7b (diff)
Changed unsigned to std::size_t
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/subsampling_and_spatialsearching@1643 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 7282a69d4d3bde59727b42b309ddb6b7e1a5a548
Diffstat (limited to 'src/Subsampling')
-rw-r--r--src/Subsampling/include/gudhi/choose_n_farthest_points.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Subsampling/include/gudhi/choose_n_farthest_points.h b/src/Subsampling/include/gudhi/choose_n_farthest_points.h
index d0f7377a..a4719f56 100644
--- a/src/Subsampling/include/gudhi/choose_n_farthest_points.h
+++ b/src/Subsampling/include/gudhi/choose_n_farthest_points.h
@@ -56,27 +56,27 @@ namespace subsampling {
typename OutputIterator>
void choose_n_farthest_points( Kernel const &k,
Point_container const &input_pts,
- unsigned final_size,
- unsigned starting_point,
+ std::size_t final_size,
+ std::size_t starting_point,
OutputIterator output_it)
{
typename Kernel::Squared_distance_d sqdist = k.squared_distance_d_object();
- int nb_points = boost::size(input_pts);
+ std::size_t nb_points = boost::size(input_pts);
assert(nb_points >= final_size);
- unsigned current_number_of_landmarks = 0; // counter for landmarks
+ std::size_t current_number_of_landmarks = 0; // counter for landmarks
double curr_max_dist = 0; // used for defining the furhest point from L
const double infty = std::numeric_limits<double>::infinity(); // infinity (see next entry)
std::vector< double > dist_to_L(nb_points, infty); // vector of current distances to L from input_pts
- int curr_max_w = starting_point;
+ std::size_t curr_max_w = starting_point;
for (current_number_of_landmarks = 0; current_number_of_landmarks != final_size; current_number_of_landmarks++) {
// curr_max_w at this point is the next landmark
*output_it++ = input_pts[curr_max_w];
// std::cout << curr_max_w << "\n";
- unsigned i = 0;
+ std::size_t i = 0;
for (auto& p : input_pts) {
double curr_dist = sqdist(p, *(std::begin(input_pts) + curr_max_w));
if (curr_dist < dist_to_L[i])