From 54c6bc50795f53ff1a1227c098f0d4fe84a8d885 Mon Sep 17 00:00:00 2001 From: salinasd Date: Tue, 16 Dec 2014 14:18:30 +0000 Subject: doc + problem test git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@356 636b058d-ea47-450e-bf9e-a15bfbe3eedb --- .../include/gudhi/Skeleton_blocker_complex.h | 44 ++++++++++++++++++---- 1 file changed, 37 insertions(+), 7 deletions(-) (limited to 'src/Skeleton_blocker/include/gudhi/Skeleton_blocker_complex.h') diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_complex.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_complex.h index c0a0a2eb..81ff0231 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_complex.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_complex.h @@ -74,19 +74,35 @@ class Skeleton_blocker_complex public: - + /** + * @brief The type of stored vertex node, specified by the template SkeletonBlockerDS + */ typedef typename SkeletonBlockerDS::Graph_vertex Graph_vertex; + + /** + * @brief The type of stored edge node, specified by the template SkeletonBlockerDS + */ typedef typename SkeletonBlockerDS::Graph_edge Graph_edge; typedef typename SkeletonBlockerDS::Root_vertex_handle Root_vertex_handle; + + /** + * @brief The type of an handle to a vertex of the complex. + */ typedef typename SkeletonBlockerDS::Vertex_handle Vertex_handle; typedef typename Root_vertex_handle::boost_vertex_handle boost_vertex_handle; + /** + * @brief A ordered set of integers that represents a simplex. + */ typedef Skeleton_blocker_simplex Simplex_handle; typedef Skeleton_blocker_simplex Root_simplex_handle; + /** + * @brief Handle to a blocker of the complex. + */ typedef Simplex_handle* Blocker_handle; @@ -118,12 +134,12 @@ protected: public: /** - * Handle to an edge of the complex. + * @brief Handle to an edge of the complex. */ typedef typename boost::graph_traits::edge_descriptor Edge_handle; - +protected: typedef std::multimap BlockerMap; typedef typename std::multimap::value_type BlockerPair; typedef typename std::multimap::iterator BlockerMapIterator; @@ -166,6 +182,9 @@ public: /** @name Constructors, Destructors */ //@{ + /** + *@brief constructs a simplicial complex with a given number of vertices and a visitor. + */ Skeleton_blocker_complex(int num_vertices_ = 0,Visitor* visitor_=NULL):visitor(visitor_){ clear(); for (int i=0; i& simplices,Visitor* visitor_=NULL): num_vertices_(0),num_blockers_(0), @@ -330,6 +348,8 @@ public: } } +/** +*/ Skeleton_blocker_complex& operator=(const Skeleton_blocker_complex& copy){ clear(); visitor = NULL; @@ -370,6 +390,9 @@ public: skeleton.clear(); } +/** +*@brief allows to change the visitor. +*/ void set_visitor(Visitor* other_visitor){ visitor = other_visitor; } @@ -445,11 +468,15 @@ public: if (visitor) visitor->on_remove_vertex(address); } +/** +*/ bool contains_vertex(Vertex_handle u) const{ if (u.vertex<0 || u.vertex>=boost::num_vertices(skeleton)) return false; return (*this)[u].is_active(); } +/** +*/ bool contains_vertex(Root_vertex_handle u) const{ boost::optional address = get_address(u); return address && (*this)[*address].is_active(); @@ -923,8 +950,9 @@ public: * @brief Compute the local vertices of 's' in the current complex * If one of them is not present in the complex then the return value is uninitialized. * - * xxx rename get_address et place un using dans sub_complex + * */ + //xxx rename get_address et place un using dans sub_complex boost::optional get_simplex_address(const Root_simplex_handle& s) const { boost::optional res; @@ -1126,6 +1154,7 @@ private: public: typedef Triangle_around_vertex_iterator Superior_triangle_around_vertex_iterator; + typedef boost::iterator_range < Triangle_around_vertex_iterator > Complex_triangle_around_vertex_range; /** @@ -1320,6 +1349,7 @@ public: */ //@{ public: + std::string to_string() const{ std::ostringstream stream; stream<