summaryrefslogtreecommitdiff
path: root/src/Toplex_map
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-10-12 12:54:03 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-10-12 12:54:03 +0000
commit4b619ec130bfa6cff47fbde47a732d890327f465 (patch)
tree92cde5af06f4dee7419dd696f64d118ed51eee5e /src/Toplex_map
parent004ff4cfc01d1c8128a2b39092dbfbc25149069d (diff)
Bad comment for lazy num_maximal_simplices
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/toplex_map@3948 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: f0926058af8b0cfc77c9346feda6f6c4db2c9828
Diffstat (limited to 'src/Toplex_map')
-rw-r--r--src/Toplex_map/include/gudhi/Lazy_Toplex_map.h4
-rw-r--r--src/Toplex_map/test/toplex_map_unit_test.cpp24
2 files changed, 26 insertions, 2 deletions
diff --git a/src/Toplex_map/include/gudhi/Lazy_Toplex_map.h b/src/Toplex_map/include/gudhi/Lazy_Toplex_map.h
index ea10d390..0cae967e 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 @@ public:
* \ingroup toplex_map */
Vertex contraction(const Vertex x, const Vertex y);
- /** \brief Number of simplices stored.
- * \ingroup toplex_map */
+ /** \brief Number of maximal simplices.
+ * \ingroup toplex_map */
std::size_t num_maximal_simplices() const;
std::unordered_map<Vertex, std::size_t> gamma0_lbounds;
diff --git a/src/Toplex_map/test/toplex_map_unit_test.cpp b/src/Toplex_map/test/toplex_map_unit_test.cpp
index 2c584c5d..c1540eb5 100644
--- a/src/Toplex_map/test/toplex_map_unit_test.cpp
+++ b/src/Toplex_map/test/toplex_map_unit_test.cpp
@@ -55,6 +55,30 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(common_toplex_map_functionnalities, Toplex_map, li
}
+BOOST_AUTO_TEST_CASE(toplex_map_num_maximal_simplices) {
+ using Vertex = Gudhi::Toplex_map::Vertex;
+
+ Gudhi::Toplex_map K;
+ K.insert_simplex({1, 2, 3, 4});
+ K.insert_simplex({5, 2, 3, 6});
+ K.insert_simplex({4, 5, 3});
+ K.insert_simplex({4, 5, 9});
+
+ std::cout << K.num_maximal_simplices();
+ BOOST_CHECK(K.num_maximal_simplices() == 4);
+
+ K.insert_simplex({5, 2, 7});
+
+ std::cout << K.num_maximal_simplices();
+ BOOST_CHECK(K.num_maximal_simplices() == 5);
+
+ auto r = K.contraction(4,5);
+
+ std::cout << K.num_maximal_simplices();
+ BOOST_CHECK(K.num_maximal_simplices() == 4);
+
+}
+
BOOST_AUTO_TEST_CASE(toplex_map_maximality) {
using Vertex = Gudhi::Toplex_map::Vertex;