Gudhi  1.2.0
 All Classes Functions Variables Typedefs Friends Groups Pages
Skeleton_blocker_simple_geometric_traits.h
1 /* This file is part of the Gudhi Library. The Gudhi library
2  * (Geometric Understanding in Higher Dimensions) is a generic C++
3  * library for computational topology.
4  *
5  * Author(s): David Salinas
6  *
7  * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France)
8  *
9  * This program is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program. If not, see <http://www.gnu.org/licenses/>.
21  */
22 #ifndef SKELETON_BLOCKER_SKELETON_BLOCKER_SIMPLE_GEOMETRIC_TRAITS_H_
23 #define SKELETON_BLOCKER_SKELETON_BLOCKER_SIMPLE_GEOMETRIC_TRAITS_H_
24 
25 #include <gudhi/Skeleton_blocker/Skeleton_blocker_simple_traits.h>
26 
27 #include <string>
28 #include <sstream>
29 
30 namespace Gudhi {
31 
32 namespace skbl {
33 
40 template<typename GeometryTrait>
43  public:
44  typedef GeometryTrait GT;
45  typedef typename GT::Point Point;
47  typedef typename Skeleton_blocker_simple_traits::Graph_vertex Simple_vertex;
48 
52  class Simple_geometric_vertex : public Simple_vertex {
53  template<class ComplexGeometricTraits> friend class Skeleton_blocker_geometric_complex;
54  private:
55  Point point_;
56 
57  Point& point() {
58  return point_;
59  }
60  const Point& point() const {
61  return point_;
62  }
63  };
64 
65  class Simple_geometric_edge :
66  public Skeleton_blocker_simple_traits::Graph_edge {
67  int index_;
68  public:
69  Simple_geometric_edge()
70  : Skeleton_blocker_simple_traits::Graph_edge(),
71  index_(-1) {
72  }
78  int& index() {
79  return index_;
80  }
81  int index() const {
82  return index_;
83  }
84  };
85 
86  typedef Simple_geometric_vertex Graph_vertex;
87  typedef Skeleton_blocker_simple_traits::Graph_edge Graph_edge;
88 };
89 
90 } // namespace skbl
91 
92 } // namespace Gudhi
93 
94 #endif // SKELETON_BLOCKER_SKELETON_BLOCKER_SIMPLE_GEOMETRIC_TRAITS_H_
Vertex with a point attached.
Definition: Skeleton_blocker_simple_geometric_traits.h:52
Global and local handle similar to boost subgraphs. Vertices are stored in a vector. For the root simplicial complex, the local and global descriptors are the same. For a subcomplex L and one of its vertices 'v', the local descriptor of 'v' is its position in the vertex vector of the subcomplex L whereas its global descriptor is the position of 'v' in the vertex vector of the root simplicial complex.
Definition: Skeleton_blocker_simple_traits.h:49
Class that represents a geometric complex that can be simplified. The class allows access to points o...
Definition: Skeleton_blocker_geometric_complex.h:39
GeometryTrait::Point Point
Definition: SkeletonBlockerGeometricDS.h:36
GeometryTrait GT
Definition: SkeletonBlockerGeometricDS.h:31
Simple traits that is a model of SkeletonBlockerDS and can be passed as a template argument to Skelet...
Definition: Skeleton_blocker_simple_traits.h:40
Simple traits that is a model of SkeletonBlockerGeometricDS and can be passed as a template argument ...
Definition: Skeleton_blocker_simple_geometric_traits.h:41