Loading...
Searching...
No Matches
index_mapper.h
Go to the documentation of this file.
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): Hannah Schreiber
4 *
5 * Copyright (C) 2022 Inria
6 *
7 * Modification(s):
8 * - YYYY/MM Author: Description of the modification
9 */
10
17
18#ifndef PM_INDEX_MAPPER_H
19#define PM_INDEX_MAPPER_H
20
21namespace Gudhi {
22namespace persistence_matrix {
23
24// Note: this would be a good candidate for std::optional instead of a mixin as its only role for now
25// is to store a map. If this does not change later.
26
34struct Dummy_index_mapper {
35 friend void swap([[maybe_unused]] Dummy_index_mapper& d1, [[maybe_unused]] Dummy_index_mapper& d2) noexcept {}
36};
37
46template <class Map>
47struct Index_mapper {
48 using Index_map = Map;
49
50 Index_map map_;
51
52 friend void swap(Index_mapper& mapper1, Index_mapper& mapper2) noexcept { mapper1.map_.swap(mapper2.map_); }
53};
54
55} // namespace persistence_matrix
56} // namespace Gudhi
57
58#endif // PM_INDEX_MAPPER_H
Persistence matrix namespace.
Definition FieldOperators.h:18
Gudhi namespace.
Definition SimplicialComplexForAlpha.h:14