From 6485e6957ef3c9310f618db6caaf2858cc56db66 Mon Sep 17 00:00:00 2001 From: fgodi Date: Mon, 8 Jan 2018 10:57:04 +0000 Subject: test name git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/toplex_map@3115 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 4d65b9218d81a3f7e32dd873ba8eb0d5e6524095 --- src/Toplex_map/doc/Intro_Toplex_map.h | 5 +++++ src/Toplex_map/include/gudhi/Fake_simplex_tree.h | 12 ---------- src/Toplex_map/test/CMakeLists.txt | 2 +- src/Toplex_map/test/toplex_map_unit_test.cpp | 28 ++---------------------- 4 files changed, 8 insertions(+), 39 deletions(-) (limited to 'src/Toplex_map') diff --git a/src/Toplex_map/doc/Intro_Toplex_map.h b/src/Toplex_map/doc/Intro_Toplex_map.h index 6f4c1a1b..e3f18b32 100644 --- a/src/Toplex_map/doc/Intro_Toplex_map.h +++ b/src/Toplex_map/doc/Intro_Toplex_map.h @@ -49,6 +49,11 @@ namespace Gudhi { * * \image html map.png * + * The performances are a lot better than in simplex tree as soon you use maximal simplices and not simplices, + * here the construction of a strong witness complex of a point set with growing parameter : + * + * \image html graph.png + * */ /** @} */ // end defgroup toplex_map diff --git a/src/Toplex_map/include/gudhi/Fake_simplex_tree.h b/src/Toplex_map/include/gudhi/Fake_simplex_tree.h index ea5ac618..abd815f9 100644 --- a/src/Toplex_map/include/gudhi/Fake_simplex_tree.h +++ b/src/Toplex_map/include/gudhi/Fake_simplex_tree.h @@ -31,18 +31,6 @@ struct Visitor { class Fake_simplex_tree : public Filtered_toplex_map { public: - /** Vertex is the type of vertices. - * \ingroup toplex_map */ - typedef Toplex_map::Vertex Vertex; - - /** Simplex is the type of simplices. - * \ingroup toplex_map */ - typedef Toplex_map::Simplex Simplex; - - /** The type of the pointers to maximal simplices. - * \ingroup toplex_map */ - typedef Toplex_map::Simplex_ptr Simplex_ptr; - /** The type of the sets of Simplex_ptr. * \ingroup toplex_map */ typedef Toplex_map::Simplex_ptr_set Simplex_ptr_set; diff --git a/src/Toplex_map/test/CMakeLists.txt b/src/Toplex_map/test/CMakeLists.txt index 25fcabac..5ed55e97 100644 --- a/src/Toplex_map/test/CMakeLists.txt +++ b/src/Toplex_map/test/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.6) project(Toplex_map_tests) -add_executable ( ToplexMapUT test.cpp ) +add_executable ( ToplexMapUT toplex_map_unit_test.cpp ) target_link_libraries(ToplexMapUT ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) diff --git a/src/Toplex_map/test/toplex_map_unit_test.cpp b/src/Toplex_map/test/toplex_map_unit_test.cpp index 3f4d96c2..b7a9251c 100644 --- a/src/Toplex_map/test/toplex_map_unit_test.cpp +++ b/src/Toplex_map/test/toplex_map_unit_test.cpp @@ -1,5 +1,4 @@ #include -#include #include #include @@ -9,6 +8,8 @@ using namespace Gudhi; +typedef Toplex_map::Vertex Vertex; + std::vector sigma1 = {1, 2, 3, 4}; std::vector sigma2 = {5, 2, 3, 6}; std::vector sigma3 = {5}; @@ -33,18 +34,6 @@ BOOST_AUTO_TEST_CASE(toplexmap) { BOOST_CHECK(!K.membership(sigma6)); } -BOOST_AUTO_TEST_CASE(ltoplexmap) { - Lazy_Toplex_map K; - K.insert_simplex(sigma1); - K.insert_simplex(sigma2); - K.insert_simplex(sigma3); - K.insert_simplex(sigma6); - K.insert_simplex(sigma7); - BOOST_CHECK(K.membership(sigma4)); - BOOST_CHECK(!K.membership(sigma5)); - K.contraction(4,5); - BOOST_CHECK(!K.membership(sigma6)); -} BOOST_AUTO_TEST_CASE(ftoplexmap) { Filtered_toplex_map K; @@ -56,16 +45,3 @@ BOOST_AUTO_TEST_CASE(ftoplexmap) { BOOST_CHECK(K.filtration(sigma3)==1.); } -/* -BOOST_AUTO_TEST_CASE(toplexmap_candidates) { - Toplex_map K; - K.insert_simplex(sigma1); - K.insert_simplex(sigma2); - K.remove_simplex(sigma1); - K.remove_simplex(sigma2); - auto c = K.candidates(); - BOOST_CHECK(c.count(get_key(sigma1))); - BOOST_CHECK(c.count(get_key(sigma2))); - BOOST_CHECK(c.size()==2); -} -*/ -- cgit v1.2.3