summaryrefslogtreecommitdiff
path: root/src/Subsampling
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-10-06 15:13:10 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-10-06 15:13:10 +0000
commitad4a82843c8268a9e9d12e607a13ee323831b597 (patch)
treebed87564e7edc9fefb87d281f95d230443fd5892 /src/Subsampling
parent2a0a8a03e256b8899eee9b73d5f783ef450e61fc (diff)
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
Diffstat (limited to 'src/Subsampling')
-rw-r--r--src/Subsampling/include/gudhi/pick_n_random_points.h18
1 files 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 <http://www.gnu.org/licenses/>.
*/
-#ifndef PICK_RANDOM_POINTS_H_
-#define PICK_RANDOM_POINTS_H_
+#ifndef PICK_N_RANDOM_POINTS_H_
+#define PICK_N_RANDOM_POINTS_H_
+
+#include <gudhi/Clock.h>
#include <boost/range/size.hpp>
@@ -30,7 +32,7 @@
#include <algorithm> // shuffle
#include <numeric> // iota
#include <iterator>
-#include <gudhi/Clock.h>
+#include <vector>
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_