From ad4a82843c8268a9e9d12e607a13ee323831b597 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Thu, 6 Oct 2016 15:13:10 +0000 Subject: Fix cpplint git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/subsampling_and_spatialsearching@1660 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 8a8a944168adfddbf848c122fb9d9cf78b75d36c --- src/Subsampling/include/gudhi/pick_n_random_points.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/Subsampling/include/gudhi/pick_n_random_points.h b/src/Subsampling/include/gudhi/pick_n_random_points.h index b8f4900a..52842a54 100644 --- a/src/Subsampling/include/gudhi/pick_n_random_points.h +++ b/src/Subsampling/include/gudhi/pick_n_random_points.h @@ -20,8 +20,10 @@ * along with this program. If not, see . */ -#ifndef PICK_RANDOM_POINTS_H_ -#define PICK_RANDOM_POINTS_H_ +#ifndef PICK_N_RANDOM_POINTS_H_ +#define PICK_N_RANDOM_POINTS_H_ + +#include #include @@ -30,7 +32,7 @@ #include // shuffle #include // iota #include -#include +#include namespace Gudhi { @@ -62,13 +64,13 @@ namespace subsampling { std::random_device rd; std::mt19937 g(rd()); - + std::shuffle(landmarks.begin(), landmarks.end(), g); landmarks.resize(final_size); for (int l: landmarks) *output_it++ = points[l]; - + #ifdef GUDHI_SUBS_PROFILING t.end(); std::cerr << "Random landmark choice took " << t.num_seconds() @@ -76,8 +78,8 @@ namespace subsampling { #endif } -} // namesapce subsampling - +} // namespace subsampling + } // namespace Gudhi -#endif // PICK_RANDOM_POINTS_H_ +#endif // PICK_N_RANDOM_POINTS_H_ -- cgit v1.2.3