23 #ifndef CONTRACTION_POLICIES_CONTRACTION_VISITOR_H_ 24 #define CONTRACTION_POLICIES_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;
63 virtual void on_collected(
const Profile &profile, boost::optional< FT > cost) { }
68 virtual void on_selected(
const Profile &profile, boost::optional< FT > cost,
int initial_count,
int current_count) { }
73 virtual void on_contracting(
const Profile &profile, boost::optional< Point > placement) { }
79 virtual void on_contracted(
const Profile &profile, boost::optional< Point > placement) { }
91 #endif // CONTRACTION_POLICIES_CONTRACTION_VISITOR_H_ 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:73
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:63
virtual void on_started(ComplexType &complex)
Called before the edge contraction process starts.
Definition: Contraction_visitor.h:53
Definition: SimplicialComplexForAlpha.h:26
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:84
virtual void on_stop_condition_reached()
Called when the algorithm stops.
Definition: Contraction_visitor.h:58
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:68
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:79