23 #ifndef GUDHI_CONTRACTION_VISITOR_H_
24 #define GUDHI_CONTRACTION_VISITOR_H_
26 #include "gudhi/Contraction/Edge_profile.h"
27 #include "boost/optional.hpp"
31 namespace contraction {
38 template <
typename EdgeProfile>
42 typedef EdgeProfile Profile;
44 typedef typename Profile::Complex Complex;
45 typedef Complex ComplexType;
46 typedef typename ComplexType::Point Point;
65 virtual void on_collected (
const Profile &profile, boost::optional< FT > cost){}
70 virtual void on_selected (
const Profile &profile, boost::optional< FT > cost,
int initial_count,
int current_count){}
76 virtual void on_contracting(
const Profile &profile, boost::optional< Point > placement){
85 virtual void on_contracted(
const Profile &profile, boost::optional< Point > placement){
virtual void on_contracting(const Profile &profile, boost::optional< Point > placement)
Called when an edge is about to be contracted and replaced by a vertex whose position is *placement...
Definition: Contraction_visitor.h:76
virtual void on_collected(const Profile &profile, boost::optional< FT > cost)
Called during the collecting phase (when a cost is assigned to the edges), for each edge collected...
Definition: Contraction_visitor.h:65
virtual void on_started(ComplexType &complex)
Called before the edge contraction process starts.
Definition: Contraction_visitor.h:54
Interface for a visitor of the edge contraction process.
Definition: Contraction_visitor.h:39
virtual void on_non_valid(const Profile &profile)
Called for each selected edge which cannot be contracted because the ValidContractionPredicate is fal...
Definition: Contraction_visitor.h:93
virtual void on_stop_condition_reached()
Called when the algorithm stops.
Definition: Contraction_visitor.h:59
virtual void on_selected(const Profile &profile, boost::optional< FT > cost, int initial_count, int current_count)
Called during the processing phase (when edges are contracted), for each edge that is selected...
Definition: Contraction_visitor.h:70
virtual void on_contracted(const Profile &profile, boost::optional< Point > placement)
Called when after an edge has been contracted onto a new point placement. A possibility would to remo...
Definition: Contraction_visitor.h:85