diff options
Diffstat (limited to 'src/Toplex_map')
-rw-r--r-- | src/Toplex_map/include/gudhi/Lazy_Toplex_map.h | 4 | ||||
-rw-r--r-- | src/Toplex_map/test/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/Toplex_map/test/toplex_map_unit_test.cpp | 11 |
3 files changed, 12 insertions, 4 deletions
diff --git a/src/Toplex_map/include/gudhi/Lazy_Toplex_map.h b/src/Toplex_map/include/gudhi/Lazy_Toplex_map.h index 50785b5a..396961fe 100644 --- a/src/Toplex_map/include/gudhi/Lazy_Toplex_map.h +++ b/src/Toplex_map/include/gudhi/Lazy_Toplex_map.h @@ -64,8 +64,8 @@ private: std::size_t size_lbound = 0; std::size_t size = 0; - const double alpha = 2; //time - const double betta = 4; //memory + const double alpha = 4; //time + const double betta = 8; //memory }; template <typename Input_vertex_range> diff --git a/src/Toplex_map/test/CMakeLists.txt b/src/Toplex_map/test/CMakeLists.txt index 5ed55e97..8bf5cf14 100644 --- a/src/Toplex_map/test/CMakeLists.txt +++ b/src/Toplex_map/test/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 2.6) project(Toplex_map_tests) +add_executable(chrono chrono.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 95ee7a02..c12ad094 100644 --- a/src/Toplex_map/test/toplex_map_unit_test.cpp +++ b/src/Toplex_map/test/toplex_map_unit_test.cpp @@ -28,10 +28,17 @@ BOOST_AUTO_TEST_CASE(toplexmap) { K.insert_simplex(sigma6); K.insert_simplex(sigma7); BOOST_CHECK(K.membership(sigma4)); - BOOST_CHECK(!K.maximality(sigma5)); + BOOST_CHECK(!K.maximality(sigma3)); BOOST_CHECK(!K.membership(sigma5)); - K.contraction(4,5); + K.insert_simplex(sigma5); + std::vector<Vertex> sigma9 = {1, 2, 3}; + std::vector<Vertex> sigma10 = {2, 7}; + auto r = K.contraction(4,5); + sigma9.emplace_back(r); + sigma10.emplace_back(r); BOOST_CHECK(!K.membership(sigma6)); + BOOST_CHECK(K.membership(sigma9)); + BOOST_CHECK(K.membership(sigma10)); } |