summaryrefslogtreecommitdiff
path: root/src/Nerve_GIC/test
diff options
context:
space:
mode:
authormcarrier <mcarrier@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-10-23 22:35:13 +0000
committermcarrier <mcarrier@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-10-23 22:35:13 +0000
commit5af08954aa1996da2006a30db875ceb2395bd243 (patch)
treed3b44fa0ee96e6b82ef793f5fec99369f0decaa3 /src/Nerve_GIC/test
parent87b5938f411856e42ead118d4b6121174c77aad5 (diff)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/Nerve_GIC@2802 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: e5795ee2fb4837e4df98a9d62b741a263d15a776
Diffstat (limited to 'src/Nerve_GIC/test')
-rw-r--r--src/Nerve_GIC/test/data/cloud3
-rw-r--r--src/Nerve_GIC/test/test_GIC.cpp35
2 files changed, 12 insertions, 26 deletions
diff --git a/src/Nerve_GIC/test/data/cloud b/src/Nerve_GIC/test/data/cloud
index 82fc5c79..4a0c170d 100644
--- a/src/Nerve_GIC/test/data/cloud
+++ b/src/Nerve_GIC/test/data/cloud
@@ -1,4 +1,5 @@
-OFF
+nOFF
+3
3 0 0
0 0 0
2 1 0
diff --git a/src/Nerve_GIC/test/test_GIC.cpp b/src/Nerve_GIC/test/test_GIC.cpp
index 0b4b6ea7..e8c6ed4a 100644
--- a/src/Nerve_GIC/test/test_GIC.cpp
+++ b/src/Nerve_GIC/test/test_GIC.cpp
@@ -36,37 +36,22 @@
BOOST_AUTO_TEST_CASE(check_nerve) {
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_simplices(); Gudhi::Simplex_tree<> stree; GIC.create_complex(stree);
+ Gudhi::cover_complex::Cover_complex<Point> N; N.set_type("Nerve");
+ std::string cloud_file_name("data/cloud"); N.read_point_cloud(cloud_file_name);
+ std::string graph_file_name("data/graph"); N.set_graph_from_file(graph_file_name);
+ std::string cover_file_name("data/cover"); N.set_cover_from_file(cover_file_name);
+ N.find_simplices(); Gudhi::Simplex_tree<> stree; N.create_complex(stree);
BOOST_CHECK(stree.num_vertices() == 3);
BOOST_CHECK((stree.num_simplices()-stree.num_vertices()) == 0);
BOOST_CHECK(stree.dimension() == 0);
}
-BOOST_AUTO_TEST_CASE(check_funcGIC) {
-
- 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_simplices(); Gudhi::Simplex_tree<> stree; GIC.create_complex(stree);
-
- BOOST_CHECK(stree.num_vertices() == 3);
- BOOST_CHECK((stree.num_simplices()-stree.num_vertices()) == 2);
- BOOST_CHECK(stree.dimension() == 1);
-}
-
-BOOST_AUTO_TEST_CASE(check_regGIC) {
+BOOST_AUTO_TEST_CASE(check_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();
+ Gudhi::cover_complex::Cover_complex<Point> GIC; GIC.set_type("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.find_simplices(); Gudhi::Simplex_tree<> stree; GIC.create_complex(stree);
@@ -80,8 +65,8 @@ BOOST_AUTO_TEST_CASE(check_regGIC) {
BOOST_AUTO_TEST_CASE(check_voronoiGIC) {
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();
+ Gudhi::cover_complex::Cover_complex<Point> GIC; GIC.set_type("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);
GIC.set_cover_from_Voronoi(Gudhi::Euclidean_distance(),2);
GIC.find_simplices(); Gudhi::Simplex_tree<> stree; GIC.create_complex(stree);