diff options
author | mcarrier <mcarrier@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-07-03 18:25:45 +0000 |
---|---|---|
committer | mcarrier <mcarrier@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-07-03 18:25:45 +0000 |
commit | 9f799012e531d4ea7cd85b815911d6271031c0e9 (patch) | |
tree | b47a60226c075ce82c8e2732fa6066b30872bc7f /src/Nerve_GIC/test/test_GIC.cpp | |
parent | 2e0fed6817558aa0e887eb228642f7ebdd302d4c (diff) |
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/Nerve_GIC@2579 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: 697cb9e3146f0b068c6df4e74d972958e793d94b
Diffstat (limited to 'src/Nerve_GIC/test/test_GIC.cpp')
-rw-r--r-- | src/Nerve_GIC/test/test_GIC.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/Nerve_GIC/test/test_GIC.cpp b/src/Nerve_GIC/test/test_GIC.cpp index 6b6621fd..cff49372 100644 --- a/src/Nerve_GIC/test/test_GIC.cpp +++ b/src/Nerve_GIC/test/test_GIC.cpp @@ -35,12 +35,13 @@ BOOST_AUTO_TEST_CASE(check_nerve) { - Gudhi::graph_induced_complex::Graph_induced_complex GIC; + using Point = std::vector<float>; + Gudhi::graph_induced_complex::Graph_induced_complex<Point> GIC; std::string cloud_file_name("data/cloud"); GIC.read_point_cloud(cloud_file_name); std::string graph_file_name("data/graph"); GIC.set_graph_from_file(graph_file_name); std::string cover_file_name("data/cover"); GIC.set_cover_from_file(cover_file_name); GIC.set_color_from_coordinate(); - GIC.find_Nerve_simplices(); Simplex_tree stree; GIC.create_complex(stree); + GIC.find_Nerve_simplices(); Gudhi::graph_induced_complex::Simplex_tree stree; GIC.create_complex(stree); BOOST_CHECK(stree.num_vertices() == 3); BOOST_CHECK((stree.num_simplices()-stree.num_vertices()) == 0); @@ -49,11 +50,12 @@ BOOST_AUTO_TEST_CASE(check_nerve) { BOOST_AUTO_TEST_CASE(check_GICMAP) { - Gudhi::graph_induced_complex::Graph_induced_complex GIC; + using Point = std::vector<float>; + Gudhi::graph_induced_complex::Graph_induced_complex<Point> GIC; std::string cloud_file_name("data/cloud"); GIC.read_point_cloud(cloud_file_name); GIC.set_color_from_coordinate(); std::string graph_file_name("data/graph"); GIC.set_graph_from_file(graph_file_name); std::string cover_file_name("data/cover"); GIC.set_cover_from_file(cover_file_name); - GIC.find_GICMAP_simplices_with_functional_minimal_cover(); Simplex_tree stree; GIC.create_complex(stree); + GIC.find_GICMAP_simplices_with_functional_minimal_cover(); Gudhi::graph_induced_complex::Simplex_tree stree; GIC.create_complex(stree); BOOST_CHECK(stree.num_vertices() == 3); BOOST_CHECK((stree.num_simplices()-stree.num_vertices()) == 2); @@ -62,11 +64,12 @@ BOOST_AUTO_TEST_CASE(check_GICMAP) { BOOST_AUTO_TEST_CASE(check_GICcover) { - Gudhi::graph_induced_complex::Graph_induced_complex GIC; + using Point = std::vector<float>; + Gudhi::graph_induced_complex::Graph_induced_complex<Point> GIC; std::string cloud_file_name("data/cloud"); GIC.read_point_cloud(cloud_file_name); GIC.set_color_from_coordinate(); std::string graph_file_name("data/graph"); GIC.set_graph_from_file(graph_file_name); std::string cover_file_name("data/cover"); GIC.set_cover_from_file(cover_file_name); - GIC.find_GIC_simplices(); Simplex_tree stree; GIC.create_complex(stree); + GIC.find_GIC_simplices(); Gudhi::graph_induced_complex::Simplex_tree stree; GIC.create_complex(stree); BOOST_CHECK(stree.num_vertices() == 3); BOOST_CHECK((stree.num_simplices()-stree.num_vertices()) == 4); @@ -76,11 +79,12 @@ BOOST_AUTO_TEST_CASE(check_GICcover) { BOOST_AUTO_TEST_CASE(check_GICvoronoi) { - Gudhi::graph_induced_complex::Graph_induced_complex GIC; + using Point = std::vector<float>; + Gudhi::graph_induced_complex::Graph_induced_complex<Point> GIC; std::string cloud_file_name("data/cloud"); GIC.read_point_cloud(cloud_file_name); GIC.set_color_from_coordinate(); std::string graph_file_name("data/graph"); GIC.set_graph_from_file(graph_file_name); - GIC.set_cover_from_Voronoi(2); - GIC.find_GIC_simplices(); Simplex_tree stree; GIC.create_complex(stree); + GIC.set_cover_from_Voronoi(Gudhi::Euclidean_distance(),2); + GIC.find_GIC_simplices(); Gudhi::graph_induced_complex::Simplex_tree stree; GIC.create_complex(stree); BOOST_CHECK(stree.num_vertices() == 2); BOOST_CHECK((stree.num_simplices()-stree.num_vertices()) == 1); |