Loading...
Searching...
No Matches
Contraction_visitor.h
/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT.
* See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details.
* Author(s): David Salinas
*
* Copyright (C) 2014 Inria
*
* Modification(s):
* - YYYY/MM Author: Description of the modification
*/
#ifndef CONTRACTION_POLICIES_CONTRACTION_VISITOR_H_
#define CONTRACTION_POLICIES_CONTRACTION_VISITOR_H_
#include <gudhi/Contraction/Edge_profile.h>
#include <boost/optional.hpp>
namespace Gudhi {
namespace contraction {
template <typename EdgeProfile>
class Contraction_visitor { // : public Dummy_complex_visitor<typename EdgeProfile::Vertex_handle> {
public:
// typedef typename ComplexType::GeometryTrait GT;
typedef EdgeProfile Profile;
typedef double FT;
typedef typename Profile::Complex Complex;
typedef Complex ComplexType;
typedef typename ComplexType::Point Point;
virtual ~Contraction_visitor() { }
virtual void on_started(ComplexType & complex) { }
virtual void on_stop_condition_reached() { }
virtual void on_collected(const Profile &profile, boost::optional< FT > cost) { }
virtual void on_selected(const Profile &profile, boost::optional< FT > cost, int initial_count, int current_count) { }
virtual void on_contracting(const Profile &profile, boost::optional< Point > placement) { }
virtual void on_contracted(const Profile &profile, boost::optional< Point > placement) { }
virtual void on_non_valid(const Profile &profile) { }
};
} // namespace contraction
} // namespace Gudhi
#endif // CONTRACTION_POLICIES_CONTRACTION_VISITOR_H_
Gudhi::contraction::Contraction_visitor
Interface for a visitor of the edge contraction process.
Definition Contraction_visitor.h:27
Gudhi::contraction::Contraction_visitor::on_stop_condition_reached
virtual void on_stop_condition_reached()
Called when the algorithm stops.
Definition Contraction_visitor.h:46
Gudhi::contraction::Contraction_visitor::on_contracted
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
Gudhi::contraction::Contraction_visitor::on_started
virtual void on_started(ComplexType &complex)
Called before the edge contraction process starts.
Definition Contraction_visitor.h:41
Gudhi::contraction::Contraction_visitor::on_contracting
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
Gudhi::contraction::Contraction_visitor::on_non_valid
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
Gudhi::contraction::Contraction_visitor::on_selected
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
Gudhi::contraction::Contraction_visitor::on_collected
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
Gudhi namespace.
Definition SimplicialComplexForAlpha.h:14