From 3bbae2e625ee99b5d6d4eab7c06acfa1246ad3ea Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 11 Apr 2017 08:10:47 +0000 Subject: Move Euclidean_distance in Gudhi namespace Fix cpplints git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@2331 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: bc5609c2df490db50e82b56a5e6d899dc6370182 --- .../example/example_one_skeleton_rips_from_points.cpp | 2 +- src/Rips_complex/example/example_rips_complex_from_off_file.cpp | 2 +- src/Rips_complex/test/test_rips_complex.cpp | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Rips_complex') diff --git a/src/Rips_complex/example/example_one_skeleton_rips_from_points.cpp b/src/Rips_complex/example/example_one_skeleton_rips_from_points.cpp index 3fd69ebc..a1db8910 100644 --- a/src/Rips_complex/example/example_one_skeleton_rips_from_points.cpp +++ b/src/Rips_complex/example/example_one_skeleton_rips_from_points.cpp @@ -27,7 +27,7 @@ int main() { // Init of a Rips complex from points // ---------------------------------------------------------------------------- double threshold = 12.0; - Rips_complex rips_complex_from_points(points, threshold, Euclidean_distance()); + Rips_complex rips_complex_from_points(points, threshold, Gudhi::Euclidean_distance()); Simplex_tree stree; rips_complex_from_points.create_complex(stree, 1); diff --git a/src/Rips_complex/example/example_rips_complex_from_off_file.cpp b/src/Rips_complex/example/example_rips_complex_from_off_file.cpp index a1e4e255..de2e4ea4 100644 --- a/src/Rips_complex/example/example_rips_complex_from_off_file.cpp +++ b/src/Rips_complex/example/example_rips_complex_from_off_file.cpp @@ -32,7 +32,7 @@ int main(int argc, char **argv) { // Init of a Rips complex from an OFF file // ---------------------------------------------------------------------------- Gudhi::Points_off_reader off_reader(off_file_name); - Rips_complex rips_complex_from_file(off_reader.get_point_cloud(), threshold, Euclidean_distance()); + Rips_complex rips_complex_from_file(off_reader.get_point_cloud(), threshold, Gudhi::Euclidean_distance()); std::streambuf* streambufffer; std::ofstream ouput_file_stream; diff --git a/src/Rips_complex/test/test_rips_complex.cpp b/src/Rips_complex/test/test_rips_complex.cpp index ae68ba0d..fc2179f2 100644 --- a/src/Rips_complex/test/test_rips_complex.cpp +++ b/src/Rips_complex/test/test_rips_complex.cpp @@ -60,7 +60,7 @@ BOOST_AUTO_TEST_CASE(RIPS_DOC_OFF_file) { rips_threshold << "==========" << std::endl; Gudhi::Points_off_reader off_reader(off_file_name); - Rips_complex rips_complex_from_file(off_reader.get_point_cloud(), rips_threshold, Euclidean_distance()); + Rips_complex rips_complex_from_file(off_reader.get_point_cloud(), rips_threshold, Gudhi::Euclidean_distance()); const int DIMENSION_1 = 1; Simplex_tree st; @@ -89,10 +89,10 @@ BOOST_AUTO_TEST_CASE(RIPS_DOC_OFF_file) { std::cout << vertex << ","; vp.push_back(off_reader.get_point_cloud().at(vertex)); } - std::cout << ") - distance =" << Euclidean_distance()(vp.at(0), vp.at(1)) << + std::cout << ") - distance =" << Gudhi::Euclidean_distance()(vp.at(0), vp.at(1)) << " - filtration =" << st.filtration(f_simplex) << std::endl; BOOST_CHECK(vp.size() == 2); - BOOST_CHECK(are_almost_the_same(st.filtration(f_simplex), Euclidean_distance()(vp.at(0), vp.at(1)))); + BOOST_CHECK(are_almost_the_same(st.filtration(f_simplex), Gudhi::Euclidean_distance()(vp.at(0), vp.at(1)))); } } @@ -341,7 +341,7 @@ BOOST_AUTO_TEST_CASE(Rips_create_complex_throw) { rips_threshold << "==========" << std::endl; Gudhi::Points_off_reader off_reader(off_file_name); - Rips_complex rips_complex_from_file(off_reader.get_point_cloud(), rips_threshold, Euclidean_distance()); + Rips_complex rips_complex_from_file(off_reader.get_point_cloud(), rips_threshold, Gudhi::Euclidean_distance()); Simplex_tree stree; std::vector simplex = {0, 1, 2}; -- cgit v1.2.3