blob: 772e33aab843990c8d700da5bdb269375cc87413 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT.
* See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details.
* Author(s): David Salinas
*
* Copyright (C) 2014 Inria
*
* Modification(s):
* - YYYY/MM Author: Description of the modification
*/
#ifndef SKELETON_BLOCKER_SKELETON_BLOCKER_SIMPLE_GEOMETRIC_TRAITS_H_
#define SKELETON_BLOCKER_SKELETON_BLOCKER_SIMPLE_GEOMETRIC_TRAITS_H_
#include <gudhi/Skeleton_blocker/Skeleton_blocker_simple_traits.h>
#include <string>
#include <sstream>
namespace Gudhi {
namespace skeleton_blocker {
/**
* @extends SkeletonBlockerGeometricDS
* @ingroup skbl
* @brief Simple traits that is a model of SkeletonBlockerGeometricDS and
* can be passed as a template argument to Skeleton_blocker_geometric_complex
*/
template<typename GeometryTrait>
struct Skeleton_blocker_simple_geometric_traits :
public Skeleton_blocker_simple_traits {
public:
typedef GeometryTrait GT;
typedef typename GT::Point Point;
typedef typename Skeleton_blocker_simple_traits::Root_vertex_handle Root_vertex_handle;
typedef typename Skeleton_blocker_simple_traits::Graph_vertex Simple_vertex;
/**
* @brief Vertex with a point attached.
*/
class Simple_geometric_vertex : public Simple_vertex {
template<class ComplexGeometricTraits> friend class Skeleton_blocker_geometric_complex;
private:
Point point_;
Point& point() {
return point_;
}
const Point& point() const {
return point_;
}
};
class Simple_geometric_edge :
public Skeleton_blocker_simple_traits::Graph_edge {
int index_;
public:
Simple_geometric_edge()
: Skeleton_blocker_simple_traits::Graph_edge(),
index_(-1) { }
/**
* @brief Allows to modify the index of the edge.
* The indices of the edge are used to store heap information
* in the edge contraction algorithm.
*/
int& index() {
return index_;
}
int index() const {
return index_;
}
};
typedef Simple_geometric_vertex Graph_vertex;
typedef Skeleton_blocker_simple_traits::Graph_edge Graph_edge;
};
} // namespace skeleton_blocker
namespace skbl = skeleton_blocker;
} // namespace Gudhi
#endif // SKELETON_BLOCKER_SKELETON_BLOCKER_SIMPLE_GEOMETRIC_TRAITS_H_
|