First_vertex_placement.h
1 /* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT.
2  * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details.
3  * Author(s): David Salinas
4  *
5  * Copyright (C) 2014 Inria
6  *
7  * Modification(s):
8  * - YYYY/MM Author: Description of the modification
9  */
10 
11 #ifndef CONTRACTION_POLICIES_FIRST_VERTEX_PLACEMENT_H_
12 #define CONTRACTION_POLICIES_FIRST_VERTEX_PLACEMENT_H_
13 
14 #include <gudhi/Contraction/policies/Placement_policy.h>
15 
16 namespace Gudhi {
17 
18 namespace contraction {
19 
23 template< typename EdgeProfile>
24 class First_vertex_placement : public Placement_policy<EdgeProfile> {
25  public:
26  typedef typename EdgeProfile::Point Point;
27  typedef typename EdgeProfile::Edge_handle Edge_handle;
28 
29  typedef typename Placement_policy<EdgeProfile>::Placement_type Placement_type;
30 
31  Placement_type operator()(const EdgeProfile& profile) const override {
32  return Placement_type(profile.p0());
33  }
34 };
35 
36 } // namespace contraction
37 
38 } // namespace Gudhi
39 
40 #endif // CONTRACTION_POLICIES_FIRST_VERTEX_PLACEMENT_H_
Places the contracted point onto the first point of the edge.
Definition: First_vertex_placement.h:24
Policy to specify where the merged point had to be placed after an edge contraction.
Definition: Placement_policy.h:25
Gudhi namespace.
Definition: SimplicialComplexForAlpha.h:14