From 7e417a80188b8ed4051f73f26e9899f94c33dc1e Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Thu, 6 Oct 2016 17:13:24 +0000 Subject: fix cpplint git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/subsampling_and_spatialsearching@1663 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 78cab9749df2feaf6d47bf253d4449b043e026e7 --- .../example/example_choose_n_farthest_points.cpp | 14 +++++++------- src/Subsampling/example/example_pick_n_random_points.cpp | 14 +++++++------- src/Subsampling/example/example_sparsify_point_set.cpp | 14 +++++++------- src/Subsampling/test/test_choose_n_farthest_points.cpp | 9 ++++----- 4 files changed, 25 insertions(+), 26 deletions(-) (limited to 'src') diff --git a/src/Subsampling/example/example_choose_n_farthest_points.cpp b/src/Subsampling/example/example_choose_n_farthest_points.cpp index 4bcb0eb9..533aba74 100644 --- a/src/Subsampling/example/example_choose_n_farthest_points.cpp +++ b/src/Subsampling/example/example_choose_n_farthest_points.cpp @@ -6,16 +6,16 @@ #include #include -int main (void) -{ - typedef CGAL::Epick_d > K; - typedef typename K::Point_d Point_d; - +int main(void) { + typedef CGAL::Epick_d > K; + typedef typename K::Point_d Point_d; + CGAL::Random rd; std::vector points; - for (int i = 0 ; i < 500 ; ++i) - points.push_back(Point_d(rd.get_double(-1.,1),rd.get_double(-1.,1),rd.get_double(-1.,1),rd.get_double(-1.,1))); + for (int i = 0; i < 500; ++i) + points.push_back(Point_d(rd.get_double(-1., 1), rd.get_double(-1., 1), + rd.get_double(-1., 1), rd.get_double(-1., 1))); K k; std::vector results; diff --git a/src/Subsampling/example/example_pick_n_random_points.cpp b/src/Subsampling/example/example_pick_n_random_points.cpp index 7b4379e4..1e38e405 100644 --- a/src/Subsampling/example/example_pick_n_random_points.cpp +++ b/src/Subsampling/example/example_pick_n_random_points.cpp @@ -6,16 +6,16 @@ #include #include -int main (void) -{ - typedef CGAL::Epick_d > K; - typedef typename K::Point_d Point_d; - +int main(void) { + typedef CGAL::Epick_d > K; + typedef typename K::Point_d Point_d; + CGAL::Random rd; std::vector points; - for (int i = 0 ; i < 500 ; ++i) - points.push_back(Point_d(rd.get_double(-1.,1),rd.get_double(-1.,1),rd.get_double(-1.,1),rd.get_double(-1.,1))); + for (int i = 0; i < 500; ++i) + points.push_back(Point_d(rd.get_double(-1., 1), rd.get_double(-1., 1), + rd.get_double(-1., 1), rd.get_double(-1., 1))); K k; std::vector results; diff --git a/src/Subsampling/example/example_sparsify_point_set.cpp b/src/Subsampling/example/example_sparsify_point_set.cpp index ad68b4c1..b35a18d9 100644 --- a/src/Subsampling/example/example_sparsify_point_set.cpp +++ b/src/Subsampling/example/example_sparsify_point_set.cpp @@ -6,16 +6,16 @@ #include #include -int main (void) -{ - typedef CGAL::Epick_d > K; - typedef typename K::Point_d Point_d; - +int main(void) { + typedef CGAL::Epick_d > K; + typedef typename K::Point_d Point_d; + CGAL::Random rd; std::vector points; - for (int i = 0 ; i < 500 ; ++i) - points.push_back(Point_d(rd.get_double(-1.,1),rd.get_double(-1.,1),rd.get_double(-1.,1),rd.get_double(-1.,1))); + for (int i = 0; i < 500; ++i) + points.push_back(Point_d(rd.get_double(-1., 1), rd.get_double(-1., 1), + rd.get_double(-1., 1), rd.get_double(-1., 1))); K k; std::vector results; diff --git a/src/Subsampling/test/test_choose_n_farthest_points.cpp b/src/Subsampling/test/test_choose_n_farthest_points.cpp index f79a4dfb..d064899a 100644 --- a/src/Subsampling/test/test_choose_n_farthest_points.cpp +++ b/src/Subsampling/test/test_choose_n_farthest_points.cpp @@ -35,10 +35,9 @@ #include -typedef CGAL::Epick_d K; -typedef typename K::FT FT; -typedef typename K::Point_d Point_d; - +typedef CGAL::Epick_d K; +typedef typename K::FT FT; +typedef typename K::Point_d Point_d; BOOST_AUTO_TEST_CASE(test_choose_farthest_point) { std::vector< Point_d > points, landmarks; @@ -52,6 +51,6 @@ BOOST_AUTO_TEST_CASE(test_choose_farthest_point) { landmarks.clear(); K k; Gudhi::subsampling::choose_n_farthest_points(k, points, 100, std::back_inserter(landmarks)); - + BOOST_CHECK(landmarks.size() == 100); } -- cgit v1.2.3