From c3bdde667d7249dc3325cf76c2813272df4adf8f Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Mon, 15 Oct 2018 18:56:59 +0000 Subject: Add num_vertices method git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/toplex_map@3951 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: f91b42722e47c05da799ac40038f9f12eb70f974 --- src/Toplex_map/include/gudhi/Lazy_Toplex_map.h | 4 ++++ src/Toplex_map/include/gudhi/Toplex_map.h | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Toplex_map/include/gudhi/Lazy_Toplex_map.h b/src/Toplex_map/include/gudhi/Lazy_Toplex_map.h index 9aa163f9..434fea47 100644 --- a/src/Toplex_map/include/gudhi/Lazy_Toplex_map.h +++ b/src/Toplex_map/include/gudhi/Lazy_Toplex_map.h @@ -57,6 +57,10 @@ public: /** \brief Number of maximal simplices. */ std::size_t num_maximal_simplices() const; + /** \brief Number of vertices. */ + std::size_t num_vertices() const{ + return t0.size(); + } std::unordered_map gamma0_lbounds; private: diff --git a/src/Toplex_map/include/gudhi/Toplex_map.h b/src/Toplex_map/include/gudhi/Toplex_map.h index 4c6c4b02..565415e1 100644 --- a/src/Toplex_map/include/gudhi/Toplex_map.h +++ b/src/Toplex_map/include/gudhi/Toplex_map.h @@ -74,7 +74,12 @@ public: /** \brief Number of maximal simplices. */ std::size_t num_maximal_simplices() const; - std::set unitary_collapse(const Toplex_map::Vertex k, const Toplex_map::Vertex d); + /** \brief Number of vertices. */ + std::size_t num_vertices() const{ + return t0.size(); + } + + std::set unitary_collapse(const Toplex_map::Vertex k, const Toplex_map::Vertex d); protected: /** \internal Gives an index in order to look for a simplex quickly. */ -- cgit v1.2.3