11 #ifndef SKELETON_BLOCKER_GEOMETRIC_COMPLEX_H_
12 #define SKELETON_BLOCKER_GEOMETRIC_COMPLEX_H_
14 #include <gudhi/Skeleton_blocker_complex.h>
15 #include <gudhi/Skeleton_blocker/Skeleton_blocker_sub_complex.h>
16 #include <gudhi/Debug_utils.h>
20 namespace skeleton_blocker {
27 template<
typename SkeletonBlockerGeometricDS>
49 template<
typename Po
intIterator>
60 template<
typename SimpleHandleOutputIterator,
typename Po
intIterator>
62 SimpleHandleOutputIterator simplex_begin, SimpleHandleOutputIterator simplex_end,
63 PointIterator points_begin, PointIterator points_end,
64 bool is_flag_complex =
false)
76 template<
typename SimpleHandleOutputIterator>
78 SimpleHandleOutputIterator simplex_begin, SimpleHandleOutputIterator simplex_end,
79 bool is_flag_complex =
false)
94 (*this)[ad].point() =
point;
102 assert(this->contains_vertex(v));
103 return (*
this)[v].point();
110 assert(this->contains_vertex(v));
111 return (*
this)[v].point();
114 const Point&
point(Root_vertex_handle global_v)
const {
116 assert(this->contains_vertex(local_v));
117 return (*
this)[local_v].point();
120 Point&
point(Root_vertex_handle global_v) {
122 assert(this->contains_vertex(local_v));
123 return (*
this)[local_v].point();
126 typedef Skeleton_blocker_link_complex<Skeleton_blocker_geometric_complex> Geometric_link;
134 add_points_to_link(
link);
144 add_points_to_link(
link);
154 add_points_to_link(
link);
182 void add_points_to_link(Geometric_link&
link)
const {
184 Root_vertex_handle v_root(
link.get_id(v));
185 link.point(v) = (*this).point(v_root);
191 template<
typename SkeletonBlockerGeometricComplex,
typename SimpleHandleOutputIterator,
typename Po
intIterator>
192 SkeletonBlockerGeometricComplex make_complex_from_top_faces(
193 SimpleHandleOutputIterator simplex_begin,
194 SimpleHandleOutputIterator simplex_end,
195 PointIterator points_begin,
196 PointIterator points_end,
197 bool is_flag_complex =
false) {
198 typedef SkeletonBlockerGeometricComplex SBGC;
199 SkeletonBlockerGeometricComplex complex;
200 unsigned current = 0;
202 make_complex_from_top_faces<SBGC>(simplex_begin, simplex_end, is_flag_complex);
203 for (
auto point = points_begin; point != points_end; ++point)
205 complex.point(
typename SBGC::Vertex_handle(current++)) =
typename SBGC::Point(*point);
211 namespace skbl = skeleton_blocker;
215 #endif // SKELETON_BLOCKER_GEOMETRIC_COMPLEX_H_
Skeleton_blocker_geometric_complex(SimpleHandleOutputIterator simplex_begin, SimpleHandleOutputIterator simplex_end, bool is_flag_complex=false)
Constructor with a list of simplices. Points of every vertex are the point constructed with default c...
Definition: Skeleton_blocker_geometric_complex.h:77
Geometric_link link(const Simplex &simplex) const
Definition: Skeleton_blocker_geometric_complex.h:141
Abstract_link abstract_link(Edge_handle edge) const
Definition: Skeleton_blocker_geometric_complex.h:177
Skeleton_blocker_geometric_complex(int num_vertices, PointIterator begin, PointIterator end)
Definition: Skeleton_blocker_geometric_complex.h:50
Class representing the link of a simplicial complex encoded by a skeleton/blockers pair....
Definition: Skeleton_blocker_link_complex.h:31
Abstract_link abstract_link(Vertex_handle v) const
Definition: Skeleton_blocker_geometric_complex.h:163
Class that represents a geometric complex that can be simplified. The class allows access to points o...
Definition: Skeleton_blocker_geometric_complex.h:29
const Point & point(Vertex_handle v) const
Returns the Point associated to the vertex v.
Definition: Skeleton_blocker_geometric_complex.h:101
Abstract_link abstract_link(const Simplex &simplex) const
Definition: Skeleton_blocker_geometric_complex.h:170
Definition: SkeletonBlockerDS.h:56
boost::graph_traits< Graph >::edge_descriptor Edge_handle
Handle to an edge of the complex.
Definition: Skeleton_blocker_complex.h:114
Concept for template class of Skeleton_blocker_geometric_complex . It must specify a GeometryTrait wh...
Definition: SkeletonBlockerGeometricDS.h:28
Vertex_handle add_vertex(const Point &point)
Add a vertex to the complex with its associated point.
Definition: Skeleton_blocker_geometric_complex.h:92
GeometryTrait::Point Point
Definition: SkeletonBlockerGeometricDS.h:37
Vertex_handle add_vertex()
Add a vertex to the complex with a default constructed associated point.
Definition: Skeleton_blocker_geometric_complex.h:85
Geometric_link link(Vertex_handle v) const
Definition: Skeleton_blocker_geometric_complex.h:131
Handle type for the vertices of a cell complex.
Definition: VertexHandle.h:15
GeometryTrait GT
Definition: SkeletonBlockerGeometricDS.h:32
Abstract Simplicial Complex represented with a skeleton/blockers pair.
Definition: Skeleton_blocker_complex.h:51
Geometric_link link(Edge_handle edge) const
Definition: Skeleton_blocker_geometric_complex.h:151
The type of vertices that are stored the boost graph. A Vertex must be Default Constructible and Equa...
Definition: SkeletonBlockerDS.h:67
Skeleton_blocker_geometric_complex(SimpleHandleOutputIterator simplex_begin, SimpleHandleOutputIterator simplex_end, PointIterator points_begin, PointIterator points_end, bool is_flag_complex=false)
Constructor with a list of simplices.
Definition: Skeleton_blocker_geometric_complex.h:61
Abstract simplex used in Skeleton blockers data-structure.
Definition: Skeleton_blocker_simplex.h:38
Vertex_handle add_vertex()
Adds a vertex to the simplicial complex and returns its Vertex_handle.
Definition: Skeleton_blocker_complex.h:372
Root_vertex_handle and Vertex_handle are similar to global and local vertex descriptor used in boost ...
Definition: SkeletonBlockerDS.h:47
Point & point(Vertex_handle v)
Returns the Point associated to the vertex v.
Definition: Skeleton_blocker_geometric_complex.h:109
GUDHI
Version 3.3.0
- C++ library for Topological Data Analysis (TDA) and Higher Dimensional Geometry Understanding.
- Copyright : MIT
|
Generated on Tue Aug 11 2020 11:58:59 for GUDHI by
Doxygen 1.8.18
|