11 #ifndef CONTRACTION_POLICIES_CONTRACTION_VISITOR_H_
12 #define CONTRACTION_POLICIES_CONTRACTION_VISITOR_H_
14 #include <gudhi/Contraction/Edge_profile.h>
15 #include <boost/optional.hpp>
19 namespace contraction {
26 template <
typename EdgeProfile>
30 typedef EdgeProfile Profile;
32 typedef typename Profile::Complex Complex;
33 typedef Complex ComplexType;
34 typedef typename ComplexType::Point Point;
51 virtual void on_collected(
const Profile &profile, boost::optional< FT > cost) { }
56 virtual void on_selected(
const Profile &profile, boost::optional< FT > cost,
int initial_count,
int current_count) { }
61 virtual void on_contracting(
const Profile &profile, boost::optional< Point > placement) { }
67 virtual void on_contracted(
const Profile &profile, boost::optional< Point > placement) { }
Interface for a visitor of the edge contraction process.
Definition: Contraction_visitor.h:27
virtual void on_stop_condition_reached()
Called when the algorithm stops.
Definition: Contraction_visitor.h:46
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:67
virtual void on_started(ComplexType &complex)
Called before the edge contraction process starts.
Definition: Contraction_visitor.h:41
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:61
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:72
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:56
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:51
Gudhi namespace.
Definition: SimplicialComplexForAlpha.h:14