22 #ifndef GUDHI_COMPLEXVISITOR_H_
23 #define GUDHI_COMPLEXVISITOR_H_
26 #include "gudhi/Skeleton_blocker/Skeleton_blocker_simplex.h"
37 template <
typename Vertex_handle>
42 virtual void on_add_vertex(Vertex_handle) = 0;
43 virtual void on_remove_vertex(Vertex_handle) = 0;
45 virtual void on_add_edge(Vertex_handle a,Vertex_handle b) = 0;
46 virtual void on_remove_edge(Vertex_handle a,Vertex_handle b) = 0;
62 virtual void on_swaped_edge(Vertex_handle a,Vertex_handle b,Vertex_handle x)=0;
73 template <
typename Vertex_handle>
76 void on_add_vertex(Vertex_handle) {}
77 void on_remove_vertex(Vertex_handle){}
78 void on_add_edge(Vertex_handle a,Vertex_handle b){}
79 void on_remove_edge(Vertex_handle a,Vertex_handle b){}
83 void on_delete_blocker(
const Skeleton_blocker_simplex<Vertex_handle>*){}
94 template <
typename Vertex_handle>
97 void on_add_vertex(Vertex_handle v) {
98 std::cerr <<
"on_add_vertex:"<<v<<std::endl;
100 void on_remove_vertex(Vertex_handle v){
101 std::cerr <<
"on_remove_vertex:"<<v<<std::endl;
103 void on_add_edge(Vertex_handle a,Vertex_handle b){
104 std::cerr <<
"on_add_edge:"<<a<<
","<<b<<std::endl;
106 void on_remove_edge(Vertex_handle a,Vertex_handle b){
107 std::cerr <<
"on_remove_edge:"<<a<<
","<<b<<std::endl;
110 std::cerr <<
"on_changed_edge:"<<a<<
","<<b<<std::endl;
113 std::cerr <<
"on_swaped_edge:"<<a<<
","<<b<<
","<<x<<std::endl;
116 std::cerr <<
"on_add_blocker:"<<b<<std::endl;
118 void on_delete_blocker(
const Skeleton_blocker_simplex<Vertex_handle>* b){
119 std::cerr <<
"on_delete_blocker:"<<b<<std::endl;
virtual void on_swaped_edge(Vertex_handle a, Vertex_handle b, Vertex_handle x)=0
Called when performing an edge contraction when an edge bx is replaced by an edge ax (not already pre...
void on_changed_edge(Vertex_handle a, Vertex_handle b)
Called when an edge changes, during the contraction of an edge.
Definition: Skeleton_blocker_complex_visitor.h:80
A visitor that prints the visit information.
Definition: Skeleton_blocker_complex_visitor.h:95
A dummy visitor of a simplicial complex that does nothing.
Definition: Skeleton_blocker_complex_visitor.h:74
void on_swaped_edge(Vertex_handle a, Vertex_handle b, Vertex_handle x)
Called when performing an edge contraction when an edge bx is replaced by an edge ax (not already pre...
Definition: Skeleton_blocker_complex_visitor.h:81
virtual void on_changed_edge(Vertex_handle a, Vertex_handle b)=0
Called when an edge changes, during the contraction of an edge.
Abstract simplex used in Skeleton blockers data-structure.
Definition: Skeleton_blocker_simplex.h:48
Interface for a visitor of a simplicial complex.
Definition: Skeleton_blocker_complex_visitor.h:38
void on_swaped_edge(Vertex_handle a, Vertex_handle b, Vertex_handle x)
Called when performing an edge contraction when an edge bx is replaced by an edge ax (not already pre...
Definition: Skeleton_blocker_complex_visitor.h:112
void on_changed_edge(Vertex_handle a, Vertex_handle b)
Called when an edge changes, during the contraction of an edge.
Definition: Skeleton_blocker_complex_visitor.h:109