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-24 Inria
6  *
7  * Modification(s):
8  * - YYYY/MM Author: Description of the modification
9  */
10 
17 #ifndef PM_OPTIONS_INCLUDED
18 #define PM_OPTIONS_INCLUDED
19 
21 
22 namespace Gudhi {
23 namespace persistence_matrix {
24 
30 enum Column_types {
31  LIST,
32  SET,
33  HEAP,
35  VECTOR,
41 };
42 
52  IDENTIFIER
53 };
54 
73 template <Column_types col_type = Column_types::INTRUSIVE_SET,
74  bool is_z2_only = true,
75  class FieldOperators = persistence_fields::Zp_field_operators<> >
77 {
79  using dimension_type = int;
80  using index_type = unsigned int;
81 
82  static const bool is_z2 = is_z2_only;
83  static const Column_types column_type = col_type;
84 
85  static const Column_indexation_types column_indexation_type = Column_indexation_types::CONTAINER;
86 
87  static const bool has_column_compression = false;
88  static const bool has_column_and_row_swaps = false;
89 
90  static const bool has_map_column_container = false;
91  static const bool has_removable_columns = false;
92 
93  static const bool has_row_access = false;
94  static const bool has_intrusive_rows = true;
95  static const bool has_removable_rows = false;
96 
97  static const bool is_of_boundary_type = true;
98 
99  static const bool has_matrix_maximal_dimension_access = false;
100  static const bool has_column_pairings = false;
101  static const bool has_vine_update = false;
102  static const bool can_retrieve_representative_cycles = false;
103 };
104 
105 //TODO: The following structures are the one used by the other modules or debug tests.
106 // They will probably be removed once the module was properly integrated.
107 
113 template <Column_types column_type = Column_types::INTRUSIVE_LIST>
114 struct Zigzag_options : Default_options<column_type, true>
115 {
116  static const bool has_row_access = true;
117  static const bool has_column_pairings = false;
118  static const bool has_vine_update = true;
119  static const bool is_of_boundary_type = false;
120  static const bool has_map_column_container = true;
121  static const bool has_removable_columns = true;
122  static const bool has_removable_rows = true;
123 };
124 
130 template <Column_types col_type = Column_types::INTRUSIVE_SET>
132 {
133  static const bool has_column_pairings = true;
134  static const bool can_retrieve_representative_cycles = true;
135 };
136 
142 template <Column_types column_type = Column_types::INTRUSIVE_SET>
143 struct Multi_persistence_options : Default_options<column_type, true>
144 {
145  static const bool has_column_pairings = true;
146  static const bool has_vine_update = true;
147 };
148 
156 template <Column_types column_type = Column_types::INTRUSIVE_LIST,
157  bool is_z2_only = true,
159 struct Cohomology_persistence_options : Default_options<column_type, is_z2_only, FieldOperators>
160 {
161  static const bool has_row_access = true;
162  static const bool has_column_compression = true;
163  static const bool has_removable_rows = true;
164 };
165 
166 } // namespace persistence_matrix
167 } // namespace Gudhi
168 
169 #endif // PM_OPTIONS_INCLUDED
Contains the 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:49
Column_types
List of column types.
Definition: persistence_matrix_options.h:30
@ POSITION
Definition: persistence_matrix_options.h:51
@ CONTAINER
Definition: persistence_matrix_options.h:50
@ IDENTIFIER
Definition: persistence_matrix_options.h:52
@ INTRUSIVE_LIST
Definition: persistence_matrix_options.h:39
@ INTRUSIVE_SET
Definition: persistence_matrix_options.h:40
@ UNORDERED_SET
Definition: persistence_matrix_options.h:38
@ LIST
Definition: persistence_matrix_options.h:31
@ SET
Definition: persistence_matrix_options.h:32
@ NAIVE_VECTOR
Definition: persistence_matrix_options.h:37
@ VECTOR
Definition: persistence_matrix_options.h:35
@ HEAP
Definition: persistence_matrix_options.h:33
Gudhi namespace.
Definition: SimplicialComplexForAlpha.h:14
Options used by the cohomology module.
Definition: persistence_matrix_options.h:160
Default option structure for Matrix class. See the PersistenceMatrixOptions concept for a more detail...
Definition: persistence_matrix_options.h:77
Options used by the Multipersistence module.
Definition: persistence_matrix_options.h:144
Options needed to use the representative cycles.
Definition: persistence_matrix_options.h:132
Options used for the Zigzag persistence module.
Definition: persistence_matrix_options.h:115