Loading...
Searching...
No Matches
persistence_matrix_options.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
16
17#ifndef PM_OPTIONS_INCLUDED
18#define PM_OPTIONS_INCLUDED
19
20#include <cstdint> // std::uint8_t
21
23
24namespace Gudhi {
25namespace persistence_matrix {
26
46
58
77template <Column_types col_type = Column_types::INTRUSIVE_SET,
78 bool is_z2_only = true,
79 class FieldOperators = persistence_fields::Zp_field_operators<> >
81 using Field_coeff_operators = FieldOperators;
82 using Dimension = int;
83 using Index = unsigned int;
84
85 static const bool is_z2 = is_z2_only;
86 static const Column_types column_type = col_type;
87
88 static const Column_indexation_types column_indexation_type = Column_indexation_types::CONTAINER;
89
90 static const bool has_column_compression = false;
91 static const bool has_column_and_row_swaps = false;
92
93 static const bool has_map_column_container = false;
94 static const bool has_removable_columns = false;
95
96 static const bool has_row_access = false;
97 static const bool has_intrusive_rows = true;
98 static const bool has_removable_rows = false;
99
100 static const bool is_of_boundary_type = true;
101
102 static const bool has_matrix_maximal_dimension_access = false;
103 static const bool has_column_pairings = false;
104 static const bool has_vine_update = false;
105 static const bool can_retrieve_representative_cycles = false;
106};
107
108// TODO: The following structures are the one used by the other modules or debug tests.
109// They will probably be removed once the module was properly integrated.
110
116template <Column_types column_type = Column_types::INTRUSIVE_LIST>
117struct Zigzag_options : Default_options<column_type, true> {
118 static const bool has_row_access = true;
119 static const bool has_column_pairings = false;
120 static const bool has_vine_update = true;
121 static const bool is_of_boundary_type = false;
122 static const bool has_map_column_container = true;
123 static const bool has_removable_columns = true;
124 static const bool has_removable_rows = true;
125};
126
132template <Column_types col_type = Column_types::INTRUSIVE_SET>
134 static const bool has_column_pairings = true;
135 static const bool can_retrieve_representative_cycles = true;
136};
137
143template <Column_types column_type = Column_types::INTRUSIVE_SET>
144struct Multi_persistence_options : Default_options<column_type, true> {
145 static const bool has_column_pairings = true;
146 static const bool has_vine_update = true;
147};
148
156template <Column_types column_type = Column_types::INTRUSIVE_LIST,
157 bool is_z2_only = true,
159struct Cohomology_persistence_options : Default_options<column_type, is_z2_only, FieldOperators> {
160 static const bool has_row_access = true;
161 static const bool has_column_compression = true;
162 static const bool has_removable_rows = true;
163};
164
168template <typename T>
169class RangeTraits
170{
171 private:
172 static auto check_begin(...) -> std::false_type;
173 template <typename U>
174 static auto check_begin(const U& x) -> decltype(x.begin(), std::true_type{});
175
176 static auto check_size(...) -> std::false_type;
177 template <typename U>
178 static auto check_size(const U& x) -> decltype(x.size(), std::true_type{});
179
180 public:
181 static constexpr bool has_begin = decltype(check_begin(std::declval<T>()))::value;
182 static constexpr bool has_size = decltype(check_size(std::declval<T>()))::value;
183};
184
185} // namespace persistence_matrix
186} // namespace Gudhi
187
188#endif // PM_OPTIONS_INCLUDED
Contains the Gudhi::persistence_fields::Zp_field_operators class.
Class defining operators for the field for any prime number .
Definition Zp_field_operators.h:41
Concept of the field operator classes needed for the class Matrix.
Definition FieldOperators.h:31
Column_indexation_types
List if indexation schemes. See description of indexation schemes for more details about the meaning ...
Definition persistence_matrix_options.h:53
Column_types
List of column types.
Definition persistence_matrix_options.h:32
@ IDENTIFIER
Definition persistence_matrix_options.h:56
@ POSITION
Definition persistence_matrix_options.h:55
@ CONTAINER
Definition persistence_matrix_options.h:54
@ LIST
Definition persistence_matrix_options.h:33
@ INTRUSIVE_SET
Definition persistence_matrix_options.h:44
@ INTRUSIVE_LIST
Definition persistence_matrix_options.h:43
@ UNORDERED_SET
Definition persistence_matrix_options.h:42
@ VECTOR
Definition persistence_matrix_options.h:37
@ SET
Definition persistence_matrix_options.h:34
@ SMALL_VECTOR
Definition persistence_matrix_options.h:40
@ NAIVE_VECTOR
Definition persistence_matrix_options.h:39
@ HEAP
Definition persistence_matrix_options.h:35
Persistence matrix namespace.
Definition FieldOperators.h:18
Gudhi namespace.
Definition SimplicialComplexForAlpha.h:14
Options used by the cohomology module.
Definition persistence_matrix_options.h:159
Default option structure for Matrix class. See the PersistenceMatrixOptions concept for a more detail...
Definition persistence_matrix_options.h:80
Options used by the Multipersistence module.
Definition persistence_matrix_options.h:144
Options needed to use the representative cycles.
Definition persistence_matrix_options.h:133
Options used for the Zigzag persistence module.
Definition persistence_matrix_options.h:117