11 #ifndef SKELETON_BLOCKER_SKELETON_BLOCKER_SIMPLE_TRAITS_H_
12 #define SKELETON_BLOCKER_SKELETON_BLOCKER_SIMPLE_TRAITS_H_
14 #include <gudhi/Skeleton_blocker/Skeleton_blocker_simplex.h>
21 namespace skeleton_blocker {
39 typedef int boost_vertex_handle;
43 boost_vertex_handle vertex;
46 return !(this->vertex == other.vertex);
50 return this->vertex == other.vertex;
54 return this->vertex < other.vertex;
57 friend std::ostream& operator<<(std::ostream& o,
64 struct Vertex_handle {
70 operator int()
const {
71 return static_cast<int> (vertex);
76 bool operator==(
const Vertex_handle& other)
const {
77 return this->vertex == other.vertex;
80 bool operator!=(
const Vertex_handle& other)
const {
81 return this->vertex != other.vertex;
84 bool operator<(
const Vertex_handle& other)
const {
85 return this->vertex < other.vertex;
88 friend std::ostream& operator<<(std::ostream& o,
const Vertex_handle & v) {
96 Root_vertex_handle id_;
99 virtual ~Graph_vertex() { }
109 bool is_active()
const {
113 void set_id(Root_vertex_handle i) {
117 Root_vertex_handle get_id()
const {
121 virtual std::string to_string()
const {
122 std::ostringstream res;
127 friend std::ostream& operator<<(std::ostream& o,
const Graph_vertex & v) {
134 Root_vertex_handle a_;
135 Root_vertex_handle b_;
152 void setId(Root_vertex_handle a, Root_vertex_handle b) {
157 Root_vertex_handle first()
const {
161 Root_vertex_handle second()
const {
165 friend std::ostream& operator<<(std::ostream& o,
const Graph_edge & v) {
166 o <<
"(" << v.a_ <<
"," << v.b_ <<
" - id = " << v.index();
174 namespace skbl = skeleton_blocker;
178 #endif // SKELETON_BLOCKER_SKELETON_BLOCKER_SIMPLE_TRAITS_H_