boundary_cell_position_to_id_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-24 Inria
6 *
7 * Modification(s):
8 * - YYYY/MM Author: Description of the modification
9 */
10
18#ifndef PM_ID_POS_MAPPER_H
19#define PM_ID_POS_MAPPER_H
20
21#include <unordered_map>
22
23namespace Gudhi {
24namespace persistence_matrix {
25
33struct Dummy_pos_mapper {
34 friend void swap([[maybe_unused]] Dummy_pos_mapper& d1, [[maybe_unused]] Dummy_pos_mapper& d2) {}
35};
36
46template<typename ID_index, typename Pos_index>
47struct Cell_position_to_ID_mapper {
48 using Index_map = std::unordered_map<Pos_index,ID_index>; //TODO: test other map types
49
50 Index_map map_;
51
52 friend void swap(Cell_position_to_ID_mapper& mapper1, Cell_position_to_ID_mapper& mapper2) {
53 mapper1.map_.swap(mapper2.map_);
54 }
55};
56
57} // namespace persistence_matrix
58} // namespace Gudhi
59
60#endif // PM_ID_POS_MAPPER_H
Gudhi namespace.
Definition: SimplicialComplexForAlpha.h:14