First_vertex_placement.h
1 /* This file is part of the Gudhi Library. The Gudhi library
2  * (Geometric Understanding in Higher Dimensions) is a generic C++
3  * library for computational topology.
4  *
5  * Author(s): David Salinas
6  *
7  * Copyright (C) 2014 Inria
8  *
9  * This program is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program. If not, see <http://www.gnu.org/licenses/>.
21  */
22 
23 #ifndef CONTRACTION_POLICIES_FIRST_VERTEX_PLACEMENT_H_
24 #define CONTRACTION_POLICIES_FIRST_VERTEX_PLACEMENT_H_
25 
26 #include <gudhi/Contraction/policies/Placement_policy.h>
27 
28 namespace Gudhi {
29 
30 namespace contraction {
31 
35 template< typename EdgeProfile>
36 class First_vertex_placement : public Placement_policy<EdgeProfile> {
37  public:
38  typedef typename EdgeProfile::Point Point;
39  typedef typename EdgeProfile::Edge_handle Edge_handle;
40 
41  typedef typename Placement_policy<EdgeProfile>::Placement_type Placement_type;
42 
43  Placement_type operator()(const EdgeProfile& profile) const override {
44  return Placement_type(profile.p0());
45  }
46 };
47 
48 } // namespace contraction
49 
50 } // namespace Gudhi
51 
52 #endif // CONTRACTION_POLICIES_FIRST_VERTEX_PLACEMENT_H_
Places the contracted point onto the first point of the edge.
Definition: First_vertex_placement.h:36
Definition: SimplicialComplexForAlpha.h:26
Policy to specify where the merged point had to be placed after an edge contraction.
Definition: Placement_policy.h:37
GUDHI  Version 2.2.0  - C++ library for Topological Data Analysis (TDA) and Higher Dimensional Geometry Understanding.  - Copyright : GPL v3 Generated on Thu Jun 14 2018 15:00:54 for GUDHI by Doxygen 1.8.13