Middle_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_MIDDLE_PLACEMENT_H_
12 #define CONTRACTION_POLICIES_MIDDLE_PLACEMENT_H_
13 
14 #include <gudhi/Contraction/policies/Placement_policy.h>
15 
16 namespace Gudhi {
17 
18 namespace contraction {
19 
20 template< typename EdgeProfile>
21 class Middle_placement : public Placement_policy<EdgeProfile> {
22  public:
23  typedef typename EdgeProfile::Point Point;
24  typedef typename EdgeProfile::Edge_handle Edge_handle;
25  typedef typename EdgeProfile::Graph_vertex Graph_vertex;
26 
27  typedef typename Placement_policy<EdgeProfile>::Placement_type Placement_type;
28 
29  Placement_type operator()(const EdgeProfile& profile) const override {
30  // todo compute the middle
31  return Placement_type(profile.p0());
32  }
33 };
34 
35 } // namespace contraction
36 
37 } // namespace Gudhi
38 
39 #endif // CONTRACTION_POLICIES_MIDDLE_PLACEMENT_H_
GUDHIdev  Version 3.5.0  - C++ library for Topological Data Analysis (TDA) and Higher Dimensional Geometry Understanding.  - Copyright : MIT Generated on Tue Aug 16 2022 14:01:50 for GUDHIdev by Doxygen 1.9.1