multipers 2.3.0__cp312-cp312-win_amd64.whl → 2.3.2__cp312-cp312-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of multipers might be problematic. Click here for more details.

Files changed (54) hide show
  1. multipers/_signed_measure_meta.py +71 -65
  2. multipers/array_api/__init__.py +39 -0
  3. multipers/array_api/numpy.py +34 -0
  4. multipers/array_api/torch.py +35 -0
  5. multipers/distances.py +6 -2
  6. multipers/{ml/convolutions.py → filtrations/density.py} +67 -13
  7. multipers/filtrations/filtrations.py +76 -17
  8. multipers/function_rips.cp312-win_amd64.pyd +0 -0
  9. multipers/grids.cp312-win_amd64.pyd +0 -0
  10. multipers/grids.pyx +144 -61
  11. multipers/gudhi/Simplex_tree_multi_interface.h +36 -1
  12. multipers/gudhi/gudhi/Multi_persistence/Box.h +3 -0
  13. multipers/gudhi/gudhi/One_critical_filtration.h +18 -9
  14. multipers/gudhi/mma_interface_h0.h +1 -1
  15. multipers/gudhi/mma_interface_matrix.h +10 -1
  16. multipers/gudhi/naive_merge_tree.h +1 -1
  17. multipers/gudhi/truc.h +555 -42
  18. multipers/io.cp312-win_amd64.pyd +0 -0
  19. multipers/io.pyx +26 -93
  20. multipers/ml/mma.py +4 -4
  21. multipers/ml/point_clouds.py +2 -2
  22. multipers/ml/signed_measures.py +63 -65
  23. multipers/mma_structures.cp312-win_amd64.pyd +0 -0
  24. multipers/mma_structures.pxd +2 -1
  25. multipers/mma_structures.pyx +56 -16
  26. multipers/mma_structures.pyx.tp +14 -5
  27. multipers/multiparameter_module_approximation/approximation.h +48 -14
  28. multipers/multiparameter_module_approximation.cp312-win_amd64.pyd +0 -0
  29. multipers/multiparameter_module_approximation.pyx +27 -8
  30. multipers/plots.py +2 -1
  31. multipers/point_measure.cp312-win_amd64.pyd +0 -0
  32. multipers/point_measure.pyx +6 -2
  33. multipers/simplex_tree_multi.cp312-win_amd64.pyd +0 -0
  34. multipers/simplex_tree_multi.pxd +1 -0
  35. multipers/simplex_tree_multi.pyx +632 -146
  36. multipers/simplex_tree_multi.pyx.tp +92 -24
  37. multipers/slicer.cp312-win_amd64.pyd +0 -0
  38. multipers/slicer.pxd +779 -177
  39. multipers/slicer.pxd.tp +24 -5
  40. multipers/slicer.pyx +5657 -1427
  41. multipers/slicer.pyx.tp +211 -48
  42. multipers/tbb12.dll +0 -0
  43. multipers/tbbbind_2_5.dll +0 -0
  44. multipers/tbbmalloc.dll +0 -0
  45. multipers/tbbmalloc_proxy.dll +0 -0
  46. multipers/tensor/tensor.h +1 -1
  47. multipers/tests/__init__.py +9 -4
  48. multipers/torch/diff_grids.py +30 -7
  49. multipers/torch/rips_density.py +1 -1
  50. {multipers-2.3.0.dist-info → multipers-2.3.2.dist-info}/METADATA +4 -25
  51. {multipers-2.3.0.dist-info → multipers-2.3.2.dist-info}/RECORD +54 -51
  52. {multipers-2.3.0.dist-info → multipers-2.3.2.dist-info}/WHEEL +1 -1
  53. {multipers-2.3.0.dist-info → multipers-2.3.2.dist-info/licenses}/LICENSE +0 -0
  54. {multipers-2.3.0.dist-info → multipers-2.3.2.dist-info}/top_level.txt +0 -0
multipers/slicer.pxd CHANGED
@@ -34,7 +34,14 @@ cdef extern from "Persistence_slices_interface.h":
34
34
  C_KSlicer_Matrix0_vine_i32(const vector[vector[unsigned int]]&, const vector[int]&, const vector[Multi_critical_filtration[int32_t]]&)
35
35
 
36
36
  C_KSlicer_Matrix0_vine_i32& operator=(const C_KSlicer_Matrix0_vine_i32&)
37
+
38
+ pair[C_KSlicer_Matrix0_vine_i32, vector[unsigned int]] colexical_rearange() except + nogil
39
+ C_KSlicer_Matrix0_vine_i32 permute(const vector[unsigned int]&) except + nogil
40
+
37
41
  vector[vector[pair[int32_t, int32_t]]] get_barcode() nogil
42
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
43
+ vector[vector[vector[pair[int,int]]]] custom_persistences(int32_t*, int size, bool ignore_inf) except + nogil
44
+
38
45
  void push_to(const Line[int32_t]&) nogil
39
46
  void set_one_filtration(const vector[int32_t]&) nogil
40
47
  int prune_above_dimension(int) except + nogil
@@ -49,6 +56,7 @@ cdef extern from "Persistence_slices_interface.h":
49
56
  pair[One_critical_filtration[int32_t], One_critical_filtration[int32_t]] get_bounding_box() except + nogil
50
57
  vector[One_critical_filtration[int32_t]] get_filtration_values() nogil
51
58
  vector[int] get_dimensions() nogil
59
+ int get_dimension(int i) nogil
52
60
  vector[vector[uint]] get_boundaries() nogil
53
61
  void coarsen_on_grid_inplace(vector[vector[int32_t]], bool) nogil
54
62
  vector[Multi_critical_filtration[int32_t]]& get_filtrations() nogil
@@ -61,12 +69,15 @@ cdef extern from "Persistence_slices_interface.h":
61
69
  void write_to_scc_file(const string&, int, int, bool, bool, bool, bool) nogil
62
70
 
63
71
 
64
- vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[vector[int32_t]]) nogil
65
- vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[pair[vector[int32_t],vector[int32_t]]]) nogil
72
+ vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[vector[int32_t]], bool) except + nogil
73
+ vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[pair[vector[int32_t],vector[int32_t]]],bool) except + nogil
74
+
75
+
76
+ C_KSlicer_Matrix0_vine_i32 projective_cover_kernel(int dim) except + nogil
66
77
 
67
78
  #------------------------------------------------------------------------------
68
79
  cdef extern from "Persistence_slices_interface.h":
69
- cdef cppclass C_KSlicer_Matrix1_vine_i32 "TrucPythonInterface<BackendsEnum::Matrix,true,true,int32_t,Available_columns::SMALL_VECTOR>":
80
+ cdef cppclass C_KSlicer_Matrix1_vine_i32 "TrucPythonInterface<BackendsEnum::Matrix,true,true,int32_t,Available_columns::NAIVE_VECTOR>":
70
81
  ctypedef int32_t value_type
71
82
 
72
83
  C_KSlicer_Matrix1_vine_i32()
@@ -74,7 +85,14 @@ cdef extern from "Persistence_slices_interface.h":
74
85
  C_KSlicer_Matrix1_vine_i32(const vector[vector[unsigned int]]&, const vector[int]&, const vector[Multi_critical_filtration[int32_t]]&)
75
86
 
76
87
  C_KSlicer_Matrix1_vine_i32& operator=(const C_KSlicer_Matrix1_vine_i32&)
88
+
89
+ pair[C_KSlicer_Matrix1_vine_i32, vector[unsigned int]] colexical_rearange() except + nogil
90
+ C_KSlicer_Matrix1_vine_i32 permute(const vector[unsigned int]&) except + nogil
91
+
77
92
  vector[vector[pair[int32_t, int32_t]]] get_barcode() nogil
93
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
94
+ vector[vector[vector[pair[int,int]]]] custom_persistences(int32_t*, int size, bool ignore_inf) except + nogil
95
+
78
96
  void push_to(const Line[int32_t]&) nogil
79
97
  void set_one_filtration(const vector[int32_t]&) nogil
80
98
  int prune_above_dimension(int) except + nogil
@@ -89,6 +107,7 @@ cdef extern from "Persistence_slices_interface.h":
89
107
  pair[One_critical_filtration[int32_t], One_critical_filtration[int32_t]] get_bounding_box() except + nogil
90
108
  vector[One_critical_filtration[int32_t]] get_filtration_values() nogil
91
109
  vector[int] get_dimensions() nogil
110
+ int get_dimension(int i) nogil
92
111
  vector[vector[uint]] get_boundaries() nogil
93
112
  void coarsen_on_grid_inplace(vector[vector[int32_t]], bool) nogil
94
113
  vector[Multi_critical_filtration[int32_t]]& get_filtrations() nogil
@@ -101,8 +120,11 @@ cdef extern from "Persistence_slices_interface.h":
101
120
  void write_to_scc_file(const string&, int, int, bool, bool, bool, bool) nogil
102
121
 
103
122
 
104
- vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[vector[int32_t]]) nogil
105
- vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[pair[vector[int32_t],vector[int32_t]]]) nogil
123
+ vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[vector[int32_t]], bool) except + nogil
124
+ vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[pair[vector[int32_t],vector[int32_t]]],bool) except + nogil
125
+
126
+
127
+ C_KSlicer_Matrix1_vine_i32 projective_cover_kernel(int dim) except + nogil
106
128
 
107
129
  #------------------------------------------------------------------------------
108
130
  cdef extern from "Persistence_slices_interface.h":
@@ -114,7 +136,14 @@ cdef extern from "Persistence_slices_interface.h":
114
136
  C_KSlicer_Matrix0_vine_i64(const vector[vector[unsigned int]]&, const vector[int]&, const vector[Multi_critical_filtration[int64_t]]&)
115
137
 
116
138
  C_KSlicer_Matrix0_vine_i64& operator=(const C_KSlicer_Matrix0_vine_i64&)
139
+
140
+ pair[C_KSlicer_Matrix0_vine_i64, vector[unsigned int]] colexical_rearange() except + nogil
141
+ C_KSlicer_Matrix0_vine_i64 permute(const vector[unsigned int]&) except + nogil
142
+
117
143
  vector[vector[pair[int64_t, int64_t]]] get_barcode() nogil
144
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
145
+ vector[vector[vector[pair[int,int]]]] custom_persistences(int64_t*, int size, bool ignore_inf) except + nogil
146
+
118
147
  void push_to(const Line[int64_t]&) nogil
119
148
  void set_one_filtration(const vector[int64_t]&) nogil
120
149
  int prune_above_dimension(int) except + nogil
@@ -129,6 +158,7 @@ cdef extern from "Persistence_slices_interface.h":
129
158
  pair[One_critical_filtration[int64_t], One_critical_filtration[int64_t]] get_bounding_box() except + nogil
130
159
  vector[One_critical_filtration[int64_t]] get_filtration_values() nogil
131
160
  vector[int] get_dimensions() nogil
161
+ int get_dimension(int i) nogil
132
162
  vector[vector[uint]] get_boundaries() nogil
133
163
  void coarsen_on_grid_inplace(vector[vector[int64_t]], bool) nogil
134
164
  vector[Multi_critical_filtration[int64_t]]& get_filtrations() nogil
@@ -141,12 +171,15 @@ cdef extern from "Persistence_slices_interface.h":
141
171
  void write_to_scc_file(const string&, int, int, bool, bool, bool, bool) nogil
142
172
 
143
173
 
144
- vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[vector[int64_t]]) nogil
145
- vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[pair[vector[int64_t],vector[int64_t]]]) nogil
174
+ vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[vector[int64_t]], bool) except + nogil
175
+ vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[pair[vector[int64_t],vector[int64_t]]],bool) except + nogil
176
+
177
+
178
+ C_KSlicer_Matrix0_vine_i64 projective_cover_kernel(int dim) except + nogil
146
179
 
147
180
  #------------------------------------------------------------------------------
148
181
  cdef extern from "Persistence_slices_interface.h":
149
- cdef cppclass C_KSlicer_Matrix1_vine_i64 "TrucPythonInterface<BackendsEnum::Matrix,true,true,int64_t,Available_columns::SMALL_VECTOR>":
182
+ cdef cppclass C_KSlicer_Matrix1_vine_i64 "TrucPythonInterface<BackendsEnum::Matrix,true,true,int64_t,Available_columns::NAIVE_VECTOR>":
150
183
  ctypedef int64_t value_type
151
184
 
152
185
  C_KSlicer_Matrix1_vine_i64()
@@ -154,7 +187,14 @@ cdef extern from "Persistence_slices_interface.h":
154
187
  C_KSlicer_Matrix1_vine_i64(const vector[vector[unsigned int]]&, const vector[int]&, const vector[Multi_critical_filtration[int64_t]]&)
155
188
 
156
189
  C_KSlicer_Matrix1_vine_i64& operator=(const C_KSlicer_Matrix1_vine_i64&)
190
+
191
+ pair[C_KSlicer_Matrix1_vine_i64, vector[unsigned int]] colexical_rearange() except + nogil
192
+ C_KSlicer_Matrix1_vine_i64 permute(const vector[unsigned int]&) except + nogil
193
+
157
194
  vector[vector[pair[int64_t, int64_t]]] get_barcode() nogil
195
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
196
+ vector[vector[vector[pair[int,int]]]] custom_persistences(int64_t*, int size, bool ignore_inf) except + nogil
197
+
158
198
  void push_to(const Line[int64_t]&) nogil
159
199
  void set_one_filtration(const vector[int64_t]&) nogil
160
200
  int prune_above_dimension(int) except + nogil
@@ -169,6 +209,7 @@ cdef extern from "Persistence_slices_interface.h":
169
209
  pair[One_critical_filtration[int64_t], One_critical_filtration[int64_t]] get_bounding_box() except + nogil
170
210
  vector[One_critical_filtration[int64_t]] get_filtration_values() nogil
171
211
  vector[int] get_dimensions() nogil
212
+ int get_dimension(int i) nogil
172
213
  vector[vector[uint]] get_boundaries() nogil
173
214
  void coarsen_on_grid_inplace(vector[vector[int64_t]], bool) nogil
174
215
  vector[Multi_critical_filtration[int64_t]]& get_filtrations() nogil
@@ -181,8 +222,11 @@ cdef extern from "Persistence_slices_interface.h":
181
222
  void write_to_scc_file(const string&, int, int, bool, bool, bool, bool) nogil
182
223
 
183
224
 
184
- vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[vector[int64_t]]) nogil
185
- vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[pair[vector[int64_t],vector[int64_t]]]) nogil
225
+ vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[vector[int64_t]], bool) except + nogil
226
+ vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[pair[vector[int64_t],vector[int64_t]]],bool) except + nogil
227
+
228
+
229
+ C_KSlicer_Matrix1_vine_i64 projective_cover_kernel(int dim) except + nogil
186
230
 
187
231
  #------------------------------------------------------------------------------
188
232
  cdef extern from "Persistence_slices_interface.h":
@@ -194,7 +238,14 @@ cdef extern from "Persistence_slices_interface.h":
194
238
  C_KSlicer_Matrix0_vine_f32(const vector[vector[unsigned int]]&, const vector[int]&, const vector[Multi_critical_filtration[float]]&)
195
239
 
196
240
  C_KSlicer_Matrix0_vine_f32& operator=(const C_KSlicer_Matrix0_vine_f32&)
241
+
242
+ pair[C_KSlicer_Matrix0_vine_f32, vector[unsigned int]] colexical_rearange() except + nogil
243
+ C_KSlicer_Matrix0_vine_f32 permute(const vector[unsigned int]&) except + nogil
244
+
197
245
  vector[vector[pair[float, float]]] get_barcode() nogil
246
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
247
+ vector[vector[vector[pair[int,int]]]] custom_persistences(float*, int size, bool ignore_inf) except + nogil
248
+
198
249
  void push_to(const Line[float]&) nogil
199
250
  void set_one_filtration(const vector[float]&) nogil
200
251
  int prune_above_dimension(int) except + nogil
@@ -209,6 +260,7 @@ cdef extern from "Persistence_slices_interface.h":
209
260
  pair[One_critical_filtration[float], One_critical_filtration[float]] get_bounding_box() except + nogil
210
261
  vector[One_critical_filtration[float]] get_filtration_values() nogil
211
262
  vector[int] get_dimensions() nogil
263
+ int get_dimension(int i) nogil
212
264
  vector[vector[uint]] get_boundaries() nogil
213
265
  void coarsen_on_grid_inplace(vector[vector[float]], bool) nogil
214
266
  vector[Multi_critical_filtration[float]]& get_filtrations() nogil
@@ -221,12 +273,15 @@ cdef extern from "Persistence_slices_interface.h":
221
273
  void write_to_scc_file(const string&, int, int, bool, bool, bool, bool) nogil
222
274
 
223
275
 
224
- vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[vector[float]]) nogil
225
- vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[pair[vector[float],vector[float]]]) nogil
276
+ vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[vector[float]], bool) except + nogil
277
+ vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[pair[vector[float],vector[float]]],bool) except + nogil
278
+
279
+
280
+ C_KSlicer_Matrix0_vine_f32 projective_cover_kernel(int dim) except + nogil
226
281
 
227
282
  #------------------------------------------------------------------------------
228
283
  cdef extern from "Persistence_slices_interface.h":
229
- cdef cppclass C_KSlicer_Matrix1_vine_f32 "TrucPythonInterface<BackendsEnum::Matrix,true,true,float,Available_columns::SMALL_VECTOR>":
284
+ cdef cppclass C_KSlicer_Matrix1_vine_f32 "TrucPythonInterface<BackendsEnum::Matrix,true,true,float,Available_columns::NAIVE_VECTOR>":
230
285
  ctypedef float value_type
231
286
 
232
287
  C_KSlicer_Matrix1_vine_f32()
@@ -234,7 +289,14 @@ cdef extern from "Persistence_slices_interface.h":
234
289
  C_KSlicer_Matrix1_vine_f32(const vector[vector[unsigned int]]&, const vector[int]&, const vector[Multi_critical_filtration[float]]&)
235
290
 
236
291
  C_KSlicer_Matrix1_vine_f32& operator=(const C_KSlicer_Matrix1_vine_f32&)
292
+
293
+ pair[C_KSlicer_Matrix1_vine_f32, vector[unsigned int]] colexical_rearange() except + nogil
294
+ C_KSlicer_Matrix1_vine_f32 permute(const vector[unsigned int]&) except + nogil
295
+
237
296
  vector[vector[pair[float, float]]] get_barcode() nogil
297
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
298
+ vector[vector[vector[pair[int,int]]]] custom_persistences(float*, int size, bool ignore_inf) except + nogil
299
+
238
300
  void push_to(const Line[float]&) nogil
239
301
  void set_one_filtration(const vector[float]&) nogil
240
302
  int prune_above_dimension(int) except + nogil
@@ -249,6 +311,7 @@ cdef extern from "Persistence_slices_interface.h":
249
311
  pair[One_critical_filtration[float], One_critical_filtration[float]] get_bounding_box() except + nogil
250
312
  vector[One_critical_filtration[float]] get_filtration_values() nogil
251
313
  vector[int] get_dimensions() nogil
314
+ int get_dimension(int i) nogil
252
315
  vector[vector[uint]] get_boundaries() nogil
253
316
  void coarsen_on_grid_inplace(vector[vector[float]], bool) nogil
254
317
  vector[Multi_critical_filtration[float]]& get_filtrations() nogil
@@ -261,8 +324,11 @@ cdef extern from "Persistence_slices_interface.h":
261
324
  void write_to_scc_file(const string&, int, int, bool, bool, bool, bool) nogil
262
325
 
263
326
 
264
- vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[vector[float]]) nogil
265
- vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[pair[vector[float],vector[float]]]) nogil
327
+ vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[vector[float]], bool) except + nogil
328
+ vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[pair[vector[float],vector[float]]],bool) except + nogil
329
+
330
+
331
+ C_KSlicer_Matrix1_vine_f32 projective_cover_kernel(int dim) except + nogil
266
332
 
267
333
  #------------------------------------------------------------------------------
268
334
  cdef extern from "Persistence_slices_interface.h":
@@ -274,7 +340,14 @@ cdef extern from "Persistence_slices_interface.h":
274
340
  C_KSlicer_Matrix0_vine_f64(const vector[vector[unsigned int]]&, const vector[int]&, const vector[Multi_critical_filtration[double]]&)
275
341
 
276
342
  C_KSlicer_Matrix0_vine_f64& operator=(const C_KSlicer_Matrix0_vine_f64&)
343
+
344
+ pair[C_KSlicer_Matrix0_vine_f64, vector[unsigned int]] colexical_rearange() except + nogil
345
+ C_KSlicer_Matrix0_vine_f64 permute(const vector[unsigned int]&) except + nogil
346
+
277
347
  vector[vector[pair[double, double]]] get_barcode() nogil
348
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
349
+ vector[vector[vector[pair[int,int]]]] custom_persistences(double*, int size, bool ignore_inf) except + nogil
350
+
278
351
  void push_to(const Line[double]&) nogil
279
352
  void set_one_filtration(const vector[double]&) nogil
280
353
  int prune_above_dimension(int) except + nogil
@@ -289,6 +362,7 @@ cdef extern from "Persistence_slices_interface.h":
289
362
  pair[One_critical_filtration[double], One_critical_filtration[double]] get_bounding_box() except + nogil
290
363
  vector[One_critical_filtration[double]] get_filtration_values() nogil
291
364
  vector[int] get_dimensions() nogil
365
+ int get_dimension(int i) nogil
292
366
  vector[vector[uint]] get_boundaries() nogil
293
367
  void coarsen_on_grid_inplace(vector[vector[double]], bool) nogil
294
368
  vector[Multi_critical_filtration[double]]& get_filtrations() nogil
@@ -301,12 +375,15 @@ cdef extern from "Persistence_slices_interface.h":
301
375
  void write_to_scc_file(const string&, int, int, bool, bool, bool, bool) nogil
302
376
 
303
377
 
304
- vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[vector[double]]) nogil
305
- vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[pair[vector[double],vector[double]]]) nogil
378
+ vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[vector[double]], bool) except + nogil
379
+ vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[pair[vector[double],vector[double]]],bool) except + nogil
380
+
381
+
382
+ C_KSlicer_Matrix0_vine_f64 projective_cover_kernel(int dim) except + nogil
306
383
 
307
384
  #------------------------------------------------------------------------------
308
385
  cdef extern from "Persistence_slices_interface.h":
309
- cdef cppclass C_KSlicer_Matrix1_vine_f64 "TrucPythonInterface<BackendsEnum::Matrix,true,true,double,Available_columns::SMALL_VECTOR>":
386
+ cdef cppclass C_KSlicer_Matrix1_vine_f64 "TrucPythonInterface<BackendsEnum::Matrix,true,true,double,Available_columns::NAIVE_VECTOR>":
310
387
  ctypedef double value_type
311
388
 
312
389
  C_KSlicer_Matrix1_vine_f64()
@@ -314,7 +391,14 @@ cdef extern from "Persistence_slices_interface.h":
314
391
  C_KSlicer_Matrix1_vine_f64(const vector[vector[unsigned int]]&, const vector[int]&, const vector[Multi_critical_filtration[double]]&)
315
392
 
316
393
  C_KSlicer_Matrix1_vine_f64& operator=(const C_KSlicer_Matrix1_vine_f64&)
394
+
395
+ pair[C_KSlicer_Matrix1_vine_f64, vector[unsigned int]] colexical_rearange() except + nogil
396
+ C_KSlicer_Matrix1_vine_f64 permute(const vector[unsigned int]&) except + nogil
397
+
317
398
  vector[vector[pair[double, double]]] get_barcode() nogil
399
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
400
+ vector[vector[vector[pair[int,int]]]] custom_persistences(double*, int size, bool ignore_inf) except + nogil
401
+
318
402
  void push_to(const Line[double]&) nogil
319
403
  void set_one_filtration(const vector[double]&) nogil
320
404
  int prune_above_dimension(int) except + nogil
@@ -329,6 +413,7 @@ cdef extern from "Persistence_slices_interface.h":
329
413
  pair[One_critical_filtration[double], One_critical_filtration[double]] get_bounding_box() except + nogil
330
414
  vector[One_critical_filtration[double]] get_filtration_values() nogil
331
415
  vector[int] get_dimensions() nogil
416
+ int get_dimension(int i) nogil
332
417
  vector[vector[uint]] get_boundaries() nogil
333
418
  void coarsen_on_grid_inplace(vector[vector[double]], bool) nogil
334
419
  vector[Multi_critical_filtration[double]]& get_filtrations() nogil
@@ -341,8 +426,11 @@ cdef extern from "Persistence_slices_interface.h":
341
426
  void write_to_scc_file(const string&, int, int, bool, bool, bool, bool) nogil
342
427
 
343
428
 
344
- vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[vector[double]]) nogil
345
- vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[pair[vector[double],vector[double]]]) nogil
429
+ vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[vector[double]], bool) except + nogil
430
+ vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[pair[vector[double],vector[double]]],bool) except + nogil
431
+
432
+
433
+ C_KSlicer_Matrix1_vine_f64 projective_cover_kernel(int dim) except + nogil
346
434
 
347
435
  #------------------------------------------------------------------------------
348
436
  cdef extern from "Persistence_slices_interface.h":
@@ -354,7 +442,14 @@ cdef extern from "Persistence_slices_interface.h":
354
442
  C_Slicer_Matrix0_vine_i32(const vector[vector[unsigned int]]&, const vector[int]&, const vector[One_critical_filtration[int32_t]]&)
355
443
 
356
444
  C_Slicer_Matrix0_vine_i32& operator=(const C_Slicer_Matrix0_vine_i32&)
445
+
446
+ pair[C_Slicer_Matrix0_vine_i32, vector[unsigned int]] colexical_rearange() except + nogil
447
+ C_Slicer_Matrix0_vine_i32 permute(const vector[unsigned int]&) except + nogil
448
+
357
449
  vector[vector[pair[int32_t, int32_t]]] get_barcode() nogil
450
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
451
+ vector[vector[vector[pair[int,int]]]] custom_persistences(int32_t*, int size, bool ignore_inf) except + nogil
452
+
358
453
  void push_to(const Line[int32_t]&) nogil
359
454
  void set_one_filtration(const vector[int32_t]&) nogil
360
455
  int prune_above_dimension(int) except + nogil
@@ -369,6 +464,7 @@ cdef extern from "Persistence_slices_interface.h":
369
464
  pair[One_critical_filtration[int32_t], One_critical_filtration[int32_t]] get_bounding_box() except + nogil
370
465
  vector[One_critical_filtration[int32_t]] get_filtration_values() nogil
371
466
  vector[int] get_dimensions() nogil
467
+ int get_dimension(int i) nogil
372
468
  vector[vector[uint]] get_boundaries() nogil
373
469
  void coarsen_on_grid_inplace(vector[vector[int32_t]], bool) nogil
374
470
  vector[One_critical_filtration[int32_t]]& get_filtrations() nogil
@@ -381,12 +477,15 @@ cdef extern from "Persistence_slices_interface.h":
381
477
  void build_from_scc_file(const string&, bool, bool, int) except + nogil
382
478
 
383
479
 
384
- vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[vector[int32_t]]) nogil
385
- vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[pair[vector[int32_t],vector[int32_t]]]) nogil
480
+ vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[vector[int32_t]], bool) except + nogil
481
+ vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[pair[vector[int32_t],vector[int32_t]]],bool) except + nogil
482
+
483
+
484
+ C_Slicer_Matrix0_vine_i32 projective_cover_kernel(int dim) except + nogil
386
485
 
387
486
  #------------------------------------------------------------------------------
388
487
  cdef extern from "Persistence_slices_interface.h":
389
- cdef cppclass C_Slicer_Matrix1_vine_i32 "TrucPythonInterface<BackendsEnum::Matrix,true,false,int32_t,Available_columns::SMALL_VECTOR>":
488
+ cdef cppclass C_Slicer_Matrix1_vine_i32 "TrucPythonInterface<BackendsEnum::Matrix,true,false,int32_t,Available_columns::NAIVE_VECTOR>":
390
489
  ctypedef int32_t value_type
391
490
 
392
491
  C_Slicer_Matrix1_vine_i32()
@@ -394,7 +493,14 @@ cdef extern from "Persistence_slices_interface.h":
394
493
  C_Slicer_Matrix1_vine_i32(const vector[vector[unsigned int]]&, const vector[int]&, const vector[One_critical_filtration[int32_t]]&)
395
494
 
396
495
  C_Slicer_Matrix1_vine_i32& operator=(const C_Slicer_Matrix1_vine_i32&)
496
+
497
+ pair[C_Slicer_Matrix1_vine_i32, vector[unsigned int]] colexical_rearange() except + nogil
498
+ C_Slicer_Matrix1_vine_i32 permute(const vector[unsigned int]&) except + nogil
499
+
397
500
  vector[vector[pair[int32_t, int32_t]]] get_barcode() nogil
501
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
502
+ vector[vector[vector[pair[int,int]]]] custom_persistences(int32_t*, int size, bool ignore_inf) except + nogil
503
+
398
504
  void push_to(const Line[int32_t]&) nogil
399
505
  void set_one_filtration(const vector[int32_t]&) nogil
400
506
  int prune_above_dimension(int) except + nogil
@@ -409,6 +515,7 @@ cdef extern from "Persistence_slices_interface.h":
409
515
  pair[One_critical_filtration[int32_t], One_critical_filtration[int32_t]] get_bounding_box() except + nogil
410
516
  vector[One_critical_filtration[int32_t]] get_filtration_values() nogil
411
517
  vector[int] get_dimensions() nogil
518
+ int get_dimension(int i) nogil
412
519
  vector[vector[uint]] get_boundaries() nogil
413
520
  void coarsen_on_grid_inplace(vector[vector[int32_t]], bool) nogil
414
521
  vector[One_critical_filtration[int32_t]]& get_filtrations() nogil
@@ -421,8 +528,11 @@ cdef extern from "Persistence_slices_interface.h":
421
528
  void build_from_scc_file(const string&, bool, bool, int) except + nogil
422
529
 
423
530
 
424
- vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[vector[int32_t]]) nogil
425
- vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[pair[vector[int32_t],vector[int32_t]]]) nogil
531
+ vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[vector[int32_t]], bool) except + nogil
532
+ vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[pair[vector[int32_t],vector[int32_t]]],bool) except + nogil
533
+
534
+
535
+ C_Slicer_Matrix1_vine_i32 projective_cover_kernel(int dim) except + nogil
426
536
 
427
537
  #------------------------------------------------------------------------------
428
538
  cdef extern from "Persistence_slices_interface.h":
@@ -434,7 +544,14 @@ cdef extern from "Persistence_slices_interface.h":
434
544
  C_Slicer_Matrix0_vine_i64(const vector[vector[unsigned int]]&, const vector[int]&, const vector[One_critical_filtration[int64_t]]&)
435
545
 
436
546
  C_Slicer_Matrix0_vine_i64& operator=(const C_Slicer_Matrix0_vine_i64&)
547
+
548
+ pair[C_Slicer_Matrix0_vine_i64, vector[unsigned int]] colexical_rearange() except + nogil
549
+ C_Slicer_Matrix0_vine_i64 permute(const vector[unsigned int]&) except + nogil
550
+
437
551
  vector[vector[pair[int64_t, int64_t]]] get_barcode() nogil
552
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
553
+ vector[vector[vector[pair[int,int]]]] custom_persistences(int64_t*, int size, bool ignore_inf) except + nogil
554
+
438
555
  void push_to(const Line[int64_t]&) nogil
439
556
  void set_one_filtration(const vector[int64_t]&) nogil
440
557
  int prune_above_dimension(int) except + nogil
@@ -449,6 +566,7 @@ cdef extern from "Persistence_slices_interface.h":
449
566
  pair[One_critical_filtration[int64_t], One_critical_filtration[int64_t]] get_bounding_box() except + nogil
450
567
  vector[One_critical_filtration[int64_t]] get_filtration_values() nogil
451
568
  vector[int] get_dimensions() nogil
569
+ int get_dimension(int i) nogil
452
570
  vector[vector[uint]] get_boundaries() nogil
453
571
  void coarsen_on_grid_inplace(vector[vector[int64_t]], bool) nogil
454
572
  vector[One_critical_filtration[int64_t]]& get_filtrations() nogil
@@ -461,12 +579,15 @@ cdef extern from "Persistence_slices_interface.h":
461
579
  void build_from_scc_file(const string&, bool, bool, int) except + nogil
462
580
 
463
581
 
464
- vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[vector[int64_t]]) nogil
465
- vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[pair[vector[int64_t],vector[int64_t]]]) nogil
582
+ vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[vector[int64_t]], bool) except + nogil
583
+ vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[pair[vector[int64_t],vector[int64_t]]],bool) except + nogil
584
+
585
+
586
+ C_Slicer_Matrix0_vine_i64 projective_cover_kernel(int dim) except + nogil
466
587
 
467
588
  #------------------------------------------------------------------------------
468
589
  cdef extern from "Persistence_slices_interface.h":
469
- cdef cppclass C_Slicer_Matrix1_vine_i64 "TrucPythonInterface<BackendsEnum::Matrix,true,false,int64_t,Available_columns::SMALL_VECTOR>":
590
+ cdef cppclass C_Slicer_Matrix1_vine_i64 "TrucPythonInterface<BackendsEnum::Matrix,true,false,int64_t,Available_columns::NAIVE_VECTOR>":
470
591
  ctypedef int64_t value_type
471
592
 
472
593
  C_Slicer_Matrix1_vine_i64()
@@ -474,7 +595,14 @@ cdef extern from "Persistence_slices_interface.h":
474
595
  C_Slicer_Matrix1_vine_i64(const vector[vector[unsigned int]]&, const vector[int]&, const vector[One_critical_filtration[int64_t]]&)
475
596
 
476
597
  C_Slicer_Matrix1_vine_i64& operator=(const C_Slicer_Matrix1_vine_i64&)
598
+
599
+ pair[C_Slicer_Matrix1_vine_i64, vector[unsigned int]] colexical_rearange() except + nogil
600
+ C_Slicer_Matrix1_vine_i64 permute(const vector[unsigned int]&) except + nogil
601
+
477
602
  vector[vector[pair[int64_t, int64_t]]] get_barcode() nogil
603
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
604
+ vector[vector[vector[pair[int,int]]]] custom_persistences(int64_t*, int size, bool ignore_inf) except + nogil
605
+
478
606
  void push_to(const Line[int64_t]&) nogil
479
607
  void set_one_filtration(const vector[int64_t]&) nogil
480
608
  int prune_above_dimension(int) except + nogil
@@ -489,6 +617,7 @@ cdef extern from "Persistence_slices_interface.h":
489
617
  pair[One_critical_filtration[int64_t], One_critical_filtration[int64_t]] get_bounding_box() except + nogil
490
618
  vector[One_critical_filtration[int64_t]] get_filtration_values() nogil
491
619
  vector[int] get_dimensions() nogil
620
+ int get_dimension(int i) nogil
492
621
  vector[vector[uint]] get_boundaries() nogil
493
622
  void coarsen_on_grid_inplace(vector[vector[int64_t]], bool) nogil
494
623
  vector[One_critical_filtration[int64_t]]& get_filtrations() nogil
@@ -501,8 +630,11 @@ cdef extern from "Persistence_slices_interface.h":
501
630
  void build_from_scc_file(const string&, bool, bool, int) except + nogil
502
631
 
503
632
 
504
- vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[vector[int64_t]]) nogil
505
- vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[pair[vector[int64_t],vector[int64_t]]]) nogil
633
+ vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[vector[int64_t]], bool) except + nogil
634
+ vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[pair[vector[int64_t],vector[int64_t]]],bool) except + nogil
635
+
636
+
637
+ C_Slicer_Matrix1_vine_i64 projective_cover_kernel(int dim) except + nogil
506
638
 
507
639
  #------------------------------------------------------------------------------
508
640
  cdef extern from "Persistence_slices_interface.h":
@@ -514,7 +646,14 @@ cdef extern from "Persistence_slices_interface.h":
514
646
  C_Slicer_Matrix0_vine_f32(const vector[vector[unsigned int]]&, const vector[int]&, const vector[One_critical_filtration[float]]&)
515
647
 
516
648
  C_Slicer_Matrix0_vine_f32& operator=(const C_Slicer_Matrix0_vine_f32&)
649
+
650
+ pair[C_Slicer_Matrix0_vine_f32, vector[unsigned int]] colexical_rearange() except + nogil
651
+ C_Slicer_Matrix0_vine_f32 permute(const vector[unsigned int]&) except + nogil
652
+
517
653
  vector[vector[pair[float, float]]] get_barcode() nogil
654
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
655
+ vector[vector[vector[pair[int,int]]]] custom_persistences(float*, int size, bool ignore_inf) except + nogil
656
+
518
657
  void push_to(const Line[float]&) nogil
519
658
  void set_one_filtration(const vector[float]&) nogil
520
659
  int prune_above_dimension(int) except + nogil
@@ -529,6 +668,7 @@ cdef extern from "Persistence_slices_interface.h":
529
668
  pair[One_critical_filtration[float], One_critical_filtration[float]] get_bounding_box() except + nogil
530
669
  vector[One_critical_filtration[float]] get_filtration_values() nogil
531
670
  vector[int] get_dimensions() nogil
671
+ int get_dimension(int i) nogil
532
672
  vector[vector[uint]] get_boundaries() nogil
533
673
  void coarsen_on_grid_inplace(vector[vector[float]], bool) nogil
534
674
  vector[One_critical_filtration[float]]& get_filtrations() nogil
@@ -541,12 +681,15 @@ cdef extern from "Persistence_slices_interface.h":
541
681
  void build_from_scc_file(const string&, bool, bool, int) except + nogil
542
682
 
543
683
 
544
- vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[vector[float]]) nogil
545
- vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[pair[vector[float],vector[float]]]) nogil
684
+ vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[vector[float]], bool) except + nogil
685
+ vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[pair[vector[float],vector[float]]],bool) except + nogil
686
+
687
+
688
+ C_Slicer_Matrix0_vine_f32 projective_cover_kernel(int dim) except + nogil
546
689
 
547
690
  #------------------------------------------------------------------------------
548
691
  cdef extern from "Persistence_slices_interface.h":
549
- cdef cppclass C_Slicer_Matrix1_vine_f32 "TrucPythonInterface<BackendsEnum::Matrix,true,false,float,Available_columns::SMALL_VECTOR>":
692
+ cdef cppclass C_Slicer_Matrix1_vine_f32 "TrucPythonInterface<BackendsEnum::Matrix,true,false,float,Available_columns::NAIVE_VECTOR>":
550
693
  ctypedef float value_type
551
694
 
552
695
  C_Slicer_Matrix1_vine_f32()
@@ -554,7 +697,14 @@ cdef extern from "Persistence_slices_interface.h":
554
697
  C_Slicer_Matrix1_vine_f32(const vector[vector[unsigned int]]&, const vector[int]&, const vector[One_critical_filtration[float]]&)
555
698
 
556
699
  C_Slicer_Matrix1_vine_f32& operator=(const C_Slicer_Matrix1_vine_f32&)
700
+
701
+ pair[C_Slicer_Matrix1_vine_f32, vector[unsigned int]] colexical_rearange() except + nogil
702
+ C_Slicer_Matrix1_vine_f32 permute(const vector[unsigned int]&) except + nogil
703
+
557
704
  vector[vector[pair[float, float]]] get_barcode() nogil
705
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
706
+ vector[vector[vector[pair[int,int]]]] custom_persistences(float*, int size, bool ignore_inf) except + nogil
707
+
558
708
  void push_to(const Line[float]&) nogil
559
709
  void set_one_filtration(const vector[float]&) nogil
560
710
  int prune_above_dimension(int) except + nogil
@@ -569,6 +719,7 @@ cdef extern from "Persistence_slices_interface.h":
569
719
  pair[One_critical_filtration[float], One_critical_filtration[float]] get_bounding_box() except + nogil
570
720
  vector[One_critical_filtration[float]] get_filtration_values() nogil
571
721
  vector[int] get_dimensions() nogil
722
+ int get_dimension(int i) nogil
572
723
  vector[vector[uint]] get_boundaries() nogil
573
724
  void coarsen_on_grid_inplace(vector[vector[float]], bool) nogil
574
725
  vector[One_critical_filtration[float]]& get_filtrations() nogil
@@ -581,8 +732,11 @@ cdef extern from "Persistence_slices_interface.h":
581
732
  void build_from_scc_file(const string&, bool, bool, int) except + nogil
582
733
 
583
734
 
584
- vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[vector[float]]) nogil
585
- vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[pair[vector[float],vector[float]]]) nogil
735
+ vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[vector[float]], bool) except + nogil
736
+ vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[pair[vector[float],vector[float]]],bool) except + nogil
737
+
738
+
739
+ C_Slicer_Matrix1_vine_f32 projective_cover_kernel(int dim) except + nogil
586
740
 
587
741
  #------------------------------------------------------------------------------
588
742
  cdef extern from "Persistence_slices_interface.h":
@@ -594,7 +748,14 @@ cdef extern from "Persistence_slices_interface.h":
594
748
  C_Slicer_Matrix0_vine_f64(const vector[vector[unsigned int]]&, const vector[int]&, const vector[One_critical_filtration[double]]&)
595
749
 
596
750
  C_Slicer_Matrix0_vine_f64& operator=(const C_Slicer_Matrix0_vine_f64&)
751
+
752
+ pair[C_Slicer_Matrix0_vine_f64, vector[unsigned int]] colexical_rearange() except + nogil
753
+ C_Slicer_Matrix0_vine_f64 permute(const vector[unsigned int]&) except + nogil
754
+
597
755
  vector[vector[pair[double, double]]] get_barcode() nogil
756
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
757
+ vector[vector[vector[pair[int,int]]]] custom_persistences(double*, int size, bool ignore_inf) except + nogil
758
+
598
759
  void push_to(const Line[double]&) nogil
599
760
  void set_one_filtration(const vector[double]&) nogil
600
761
  int prune_above_dimension(int) except + nogil
@@ -609,6 +770,7 @@ cdef extern from "Persistence_slices_interface.h":
609
770
  pair[One_critical_filtration[double], One_critical_filtration[double]] get_bounding_box() except + nogil
610
771
  vector[One_critical_filtration[double]] get_filtration_values() nogil
611
772
  vector[int] get_dimensions() nogil
773
+ int get_dimension(int i) nogil
612
774
  vector[vector[uint]] get_boundaries() nogil
613
775
  void coarsen_on_grid_inplace(vector[vector[double]], bool) nogil
614
776
  vector[One_critical_filtration[double]]& get_filtrations() nogil
@@ -621,12 +783,15 @@ cdef extern from "Persistence_slices_interface.h":
621
783
  void build_from_scc_file(const string&, bool, bool, int) except + nogil
622
784
 
623
785
 
624
- vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[vector[double]]) nogil
625
- vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[pair[vector[double],vector[double]]]) nogil
786
+ vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[vector[double]], bool) except + nogil
787
+ vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[pair[vector[double],vector[double]]],bool) except + nogil
788
+
789
+
790
+ C_Slicer_Matrix0_vine_f64 projective_cover_kernel(int dim) except + nogil
626
791
 
627
792
  #------------------------------------------------------------------------------
628
793
  cdef extern from "Persistence_slices_interface.h":
629
- cdef cppclass C_Slicer_Matrix1_vine_f64 "TrucPythonInterface<BackendsEnum::Matrix,true,false,double,Available_columns::SMALL_VECTOR>":
794
+ cdef cppclass C_Slicer_Matrix1_vine_f64 "TrucPythonInterface<BackendsEnum::Matrix,true,false,double,Available_columns::NAIVE_VECTOR>":
630
795
  ctypedef double value_type
631
796
 
632
797
  C_Slicer_Matrix1_vine_f64()
@@ -634,7 +799,14 @@ cdef extern from "Persistence_slices_interface.h":
634
799
  C_Slicer_Matrix1_vine_f64(const vector[vector[unsigned int]]&, const vector[int]&, const vector[One_critical_filtration[double]]&)
635
800
 
636
801
  C_Slicer_Matrix1_vine_f64& operator=(const C_Slicer_Matrix1_vine_f64&)
802
+
803
+ pair[C_Slicer_Matrix1_vine_f64, vector[unsigned int]] colexical_rearange() except + nogil
804
+ C_Slicer_Matrix1_vine_f64 permute(const vector[unsigned int]&) except + nogil
805
+
637
806
  vector[vector[pair[double, double]]] get_barcode() nogil
807
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
808
+ vector[vector[vector[pair[int,int]]]] custom_persistences(double*, int size, bool ignore_inf) except + nogil
809
+
638
810
  void push_to(const Line[double]&) nogil
639
811
  void set_one_filtration(const vector[double]&) nogil
640
812
  int prune_above_dimension(int) except + nogil
@@ -649,6 +821,7 @@ cdef extern from "Persistence_slices_interface.h":
649
821
  pair[One_critical_filtration[double], One_critical_filtration[double]] get_bounding_box() except + nogil
650
822
  vector[One_critical_filtration[double]] get_filtration_values() nogil
651
823
  vector[int] get_dimensions() nogil
824
+ int get_dimension(int i) nogil
652
825
  vector[vector[uint]] get_boundaries() nogil
653
826
  void coarsen_on_grid_inplace(vector[vector[double]], bool) nogil
654
827
  vector[One_critical_filtration[double]]& get_filtrations() nogil
@@ -661,8 +834,11 @@ cdef extern from "Persistence_slices_interface.h":
661
834
  void build_from_scc_file(const string&, bool, bool, int) except + nogil
662
835
 
663
836
 
664
- vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[vector[double]]) nogil
665
- vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[pair[vector[double],vector[double]]]) nogil
837
+ vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[vector[double]], bool) except + nogil
838
+ vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[pair[vector[double],vector[double]]],bool) except + nogil
839
+
840
+
841
+ C_Slicer_Matrix1_vine_f64 projective_cover_kernel(int dim) except + nogil
666
842
 
667
843
  #------------------------------------------------------------------------------
668
844
  cdef extern from "Persistence_slices_interface.h":
@@ -674,7 +850,14 @@ cdef extern from "Persistence_slices_interface.h":
674
850
  C_KSlicer_Matrix0_i32(const vector[vector[unsigned int]]&, const vector[int]&, const vector[Multi_critical_filtration[int32_t]]&)
675
851
 
676
852
  C_KSlicer_Matrix0_i32& operator=(const C_KSlicer_Matrix0_i32&)
853
+
854
+ pair[C_KSlicer_Matrix0_i32, vector[unsigned int]] colexical_rearange() except + nogil
855
+ C_KSlicer_Matrix0_i32 permute(const vector[unsigned int]&) except + nogil
856
+
677
857
  vector[vector[pair[int32_t, int32_t]]] get_barcode() nogil
858
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
859
+ vector[vector[vector[pair[int,int]]]] custom_persistences(int32_t*, int size, bool ignore_inf) except + nogil
860
+
678
861
  void push_to(const Line[int32_t]&) nogil
679
862
  void set_one_filtration(const vector[int32_t]&) nogil
680
863
  int prune_above_dimension(int) except + nogil
@@ -689,6 +872,7 @@ cdef extern from "Persistence_slices_interface.h":
689
872
  pair[One_critical_filtration[int32_t], One_critical_filtration[int32_t]] get_bounding_box() except + nogil
690
873
  vector[One_critical_filtration[int32_t]] get_filtration_values() nogil
691
874
  vector[int] get_dimensions() nogil
875
+ int get_dimension(int i) nogil
692
876
  vector[vector[uint]] get_boundaries() nogil
693
877
  void coarsen_on_grid_inplace(vector[vector[int32_t]], bool) nogil
694
878
  vector[Multi_critical_filtration[int32_t]]& get_filtrations() nogil
@@ -698,12 +882,15 @@ cdef extern from "Persistence_slices_interface.h":
698
882
  void write_to_scc_file(const string&, int, int, bool, bool, bool, bool) nogil
699
883
 
700
884
 
701
- vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[vector[int32_t]]) nogil
702
- vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[pair[vector[int32_t],vector[int32_t]]]) nogil
885
+ vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[vector[int32_t]], bool) except + nogil
886
+ vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[pair[vector[int32_t],vector[int32_t]]],bool) except + nogil
887
+
888
+
889
+ C_KSlicer_Matrix0_i32 projective_cover_kernel(int dim) except + nogil
703
890
 
704
891
  #------------------------------------------------------------------------------
705
892
  cdef extern from "Persistence_slices_interface.h":
706
- cdef cppclass C_KSlicer_Matrix1_i32 "TrucPythonInterface<BackendsEnum::Matrix,false,true,int32_t,Available_columns::SMALL_VECTOR>":
893
+ cdef cppclass C_KSlicer_Matrix1_i32 "TrucPythonInterface<BackendsEnum::Matrix,false,true,int32_t,Available_columns::NAIVE_VECTOR>":
707
894
  ctypedef int32_t value_type
708
895
 
709
896
  C_KSlicer_Matrix1_i32()
@@ -711,7 +898,14 @@ cdef extern from "Persistence_slices_interface.h":
711
898
  C_KSlicer_Matrix1_i32(const vector[vector[unsigned int]]&, const vector[int]&, const vector[Multi_critical_filtration[int32_t]]&)
712
899
 
713
900
  C_KSlicer_Matrix1_i32& operator=(const C_KSlicer_Matrix1_i32&)
901
+
902
+ pair[C_KSlicer_Matrix1_i32, vector[unsigned int]] colexical_rearange() except + nogil
903
+ C_KSlicer_Matrix1_i32 permute(const vector[unsigned int]&) except + nogil
904
+
714
905
  vector[vector[pair[int32_t, int32_t]]] get_barcode() nogil
906
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
907
+ vector[vector[vector[pair[int,int]]]] custom_persistences(int32_t*, int size, bool ignore_inf) except + nogil
908
+
715
909
  void push_to(const Line[int32_t]&) nogil
716
910
  void set_one_filtration(const vector[int32_t]&) nogil
717
911
  int prune_above_dimension(int) except + nogil
@@ -726,6 +920,7 @@ cdef extern from "Persistence_slices_interface.h":
726
920
  pair[One_critical_filtration[int32_t], One_critical_filtration[int32_t]] get_bounding_box() except + nogil
727
921
  vector[One_critical_filtration[int32_t]] get_filtration_values() nogil
728
922
  vector[int] get_dimensions() nogil
923
+ int get_dimension(int i) nogil
729
924
  vector[vector[uint]] get_boundaries() nogil
730
925
  void coarsen_on_grid_inplace(vector[vector[int32_t]], bool) nogil
731
926
  vector[Multi_critical_filtration[int32_t]]& get_filtrations() nogil
@@ -735,8 +930,11 @@ cdef extern from "Persistence_slices_interface.h":
735
930
  void write_to_scc_file(const string&, int, int, bool, bool, bool, bool) nogil
736
931
 
737
932
 
738
- vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[vector[int32_t]]) nogil
739
- vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[pair[vector[int32_t],vector[int32_t]]]) nogil
933
+ vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[vector[int32_t]], bool) except + nogil
934
+ vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[pair[vector[int32_t],vector[int32_t]]],bool) except + nogil
935
+
936
+
937
+ C_KSlicer_Matrix1_i32 projective_cover_kernel(int dim) except + nogil
740
938
 
741
939
  #------------------------------------------------------------------------------
742
940
  cdef extern from "Persistence_slices_interface.h":
@@ -748,7 +946,14 @@ cdef extern from "Persistence_slices_interface.h":
748
946
  C_KSlicer_Matrix0_i64(const vector[vector[unsigned int]]&, const vector[int]&, const vector[Multi_critical_filtration[int64_t]]&)
749
947
 
750
948
  C_KSlicer_Matrix0_i64& operator=(const C_KSlicer_Matrix0_i64&)
949
+
950
+ pair[C_KSlicer_Matrix0_i64, vector[unsigned int]] colexical_rearange() except + nogil
951
+ C_KSlicer_Matrix0_i64 permute(const vector[unsigned int]&) except + nogil
952
+
751
953
  vector[vector[pair[int64_t, int64_t]]] get_barcode() nogil
954
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
955
+ vector[vector[vector[pair[int,int]]]] custom_persistences(int64_t*, int size, bool ignore_inf) except + nogil
956
+
752
957
  void push_to(const Line[int64_t]&) nogil
753
958
  void set_one_filtration(const vector[int64_t]&) nogil
754
959
  int prune_above_dimension(int) except + nogil
@@ -763,6 +968,7 @@ cdef extern from "Persistence_slices_interface.h":
763
968
  pair[One_critical_filtration[int64_t], One_critical_filtration[int64_t]] get_bounding_box() except + nogil
764
969
  vector[One_critical_filtration[int64_t]] get_filtration_values() nogil
765
970
  vector[int] get_dimensions() nogil
971
+ int get_dimension(int i) nogil
766
972
  vector[vector[uint]] get_boundaries() nogil
767
973
  void coarsen_on_grid_inplace(vector[vector[int64_t]], bool) nogil
768
974
  vector[Multi_critical_filtration[int64_t]]& get_filtrations() nogil
@@ -772,12 +978,15 @@ cdef extern from "Persistence_slices_interface.h":
772
978
  void write_to_scc_file(const string&, int, int, bool, bool, bool, bool) nogil
773
979
 
774
980
 
775
- vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[vector[int64_t]]) nogil
776
- vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[pair[vector[int64_t],vector[int64_t]]]) nogil
981
+ vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[vector[int64_t]], bool) except + nogil
982
+ vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[pair[vector[int64_t],vector[int64_t]]],bool) except + nogil
983
+
984
+
985
+ C_KSlicer_Matrix0_i64 projective_cover_kernel(int dim) except + nogil
777
986
 
778
987
  #------------------------------------------------------------------------------
779
988
  cdef extern from "Persistence_slices_interface.h":
780
- cdef cppclass C_KSlicer_Matrix1_i64 "TrucPythonInterface<BackendsEnum::Matrix,false,true,int64_t,Available_columns::SMALL_VECTOR>":
989
+ cdef cppclass C_KSlicer_Matrix1_i64 "TrucPythonInterface<BackendsEnum::Matrix,false,true,int64_t,Available_columns::NAIVE_VECTOR>":
781
990
  ctypedef int64_t value_type
782
991
 
783
992
  C_KSlicer_Matrix1_i64()
@@ -785,7 +994,14 @@ cdef extern from "Persistence_slices_interface.h":
785
994
  C_KSlicer_Matrix1_i64(const vector[vector[unsigned int]]&, const vector[int]&, const vector[Multi_critical_filtration[int64_t]]&)
786
995
 
787
996
  C_KSlicer_Matrix1_i64& operator=(const C_KSlicer_Matrix1_i64&)
997
+
998
+ pair[C_KSlicer_Matrix1_i64, vector[unsigned int]] colexical_rearange() except + nogil
999
+ C_KSlicer_Matrix1_i64 permute(const vector[unsigned int]&) except + nogil
1000
+
788
1001
  vector[vector[pair[int64_t, int64_t]]] get_barcode() nogil
1002
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
1003
+ vector[vector[vector[pair[int,int]]]] custom_persistences(int64_t*, int size, bool ignore_inf) except + nogil
1004
+
789
1005
  void push_to(const Line[int64_t]&) nogil
790
1006
  void set_one_filtration(const vector[int64_t]&) nogil
791
1007
  int prune_above_dimension(int) except + nogil
@@ -800,6 +1016,7 @@ cdef extern from "Persistence_slices_interface.h":
800
1016
  pair[One_critical_filtration[int64_t], One_critical_filtration[int64_t]] get_bounding_box() except + nogil
801
1017
  vector[One_critical_filtration[int64_t]] get_filtration_values() nogil
802
1018
  vector[int] get_dimensions() nogil
1019
+ int get_dimension(int i) nogil
803
1020
  vector[vector[uint]] get_boundaries() nogil
804
1021
  void coarsen_on_grid_inplace(vector[vector[int64_t]], bool) nogil
805
1022
  vector[Multi_critical_filtration[int64_t]]& get_filtrations() nogil
@@ -809,8 +1026,11 @@ cdef extern from "Persistence_slices_interface.h":
809
1026
  void write_to_scc_file(const string&, int, int, bool, bool, bool, bool) nogil
810
1027
 
811
1028
 
812
- vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[vector[int64_t]]) nogil
813
- vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[pair[vector[int64_t],vector[int64_t]]]) nogil
1029
+ vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[vector[int64_t]], bool) except + nogil
1030
+ vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[pair[vector[int64_t],vector[int64_t]]],bool) except + nogil
1031
+
1032
+
1033
+ C_KSlicer_Matrix1_i64 projective_cover_kernel(int dim) except + nogil
814
1034
 
815
1035
  #------------------------------------------------------------------------------
816
1036
  cdef extern from "Persistence_slices_interface.h":
@@ -822,7 +1042,14 @@ cdef extern from "Persistence_slices_interface.h":
822
1042
  C_KSlicer_Matrix0_f32(const vector[vector[unsigned int]]&, const vector[int]&, const vector[Multi_critical_filtration[float]]&)
823
1043
 
824
1044
  C_KSlicer_Matrix0_f32& operator=(const C_KSlicer_Matrix0_f32&)
1045
+
1046
+ pair[C_KSlicer_Matrix0_f32, vector[unsigned int]] colexical_rearange() except + nogil
1047
+ C_KSlicer_Matrix0_f32 permute(const vector[unsigned int]&) except + nogil
1048
+
825
1049
  vector[vector[pair[float, float]]] get_barcode() nogil
1050
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
1051
+ vector[vector[vector[pair[int,int]]]] custom_persistences(float*, int size, bool ignore_inf) except + nogil
1052
+
826
1053
  void push_to(const Line[float]&) nogil
827
1054
  void set_one_filtration(const vector[float]&) nogil
828
1055
  int prune_above_dimension(int) except + nogil
@@ -837,6 +1064,7 @@ cdef extern from "Persistence_slices_interface.h":
837
1064
  pair[One_critical_filtration[float], One_critical_filtration[float]] get_bounding_box() except + nogil
838
1065
  vector[One_critical_filtration[float]] get_filtration_values() nogil
839
1066
  vector[int] get_dimensions() nogil
1067
+ int get_dimension(int i) nogil
840
1068
  vector[vector[uint]] get_boundaries() nogil
841
1069
  void coarsen_on_grid_inplace(vector[vector[float]], bool) nogil
842
1070
  vector[Multi_critical_filtration[float]]& get_filtrations() nogil
@@ -846,12 +1074,15 @@ cdef extern from "Persistence_slices_interface.h":
846
1074
  void write_to_scc_file(const string&, int, int, bool, bool, bool, bool) nogil
847
1075
 
848
1076
 
849
- vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[vector[float]]) nogil
850
- vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[pair[vector[float],vector[float]]]) nogil
1077
+ vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[vector[float]], bool) except + nogil
1078
+ vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[pair[vector[float],vector[float]]],bool) except + nogil
1079
+
1080
+
1081
+ C_KSlicer_Matrix0_f32 projective_cover_kernel(int dim) except + nogil
851
1082
 
852
1083
  #------------------------------------------------------------------------------
853
1084
  cdef extern from "Persistence_slices_interface.h":
854
- cdef cppclass C_KSlicer_Matrix1_f32 "TrucPythonInterface<BackendsEnum::Matrix,false,true,float,Available_columns::SMALL_VECTOR>":
1085
+ cdef cppclass C_KSlicer_Matrix1_f32 "TrucPythonInterface<BackendsEnum::Matrix,false,true,float,Available_columns::NAIVE_VECTOR>":
855
1086
  ctypedef float value_type
856
1087
 
857
1088
  C_KSlicer_Matrix1_f32()
@@ -859,7 +1090,14 @@ cdef extern from "Persistence_slices_interface.h":
859
1090
  C_KSlicer_Matrix1_f32(const vector[vector[unsigned int]]&, const vector[int]&, const vector[Multi_critical_filtration[float]]&)
860
1091
 
861
1092
  C_KSlicer_Matrix1_f32& operator=(const C_KSlicer_Matrix1_f32&)
1093
+
1094
+ pair[C_KSlicer_Matrix1_f32, vector[unsigned int]] colexical_rearange() except + nogil
1095
+ C_KSlicer_Matrix1_f32 permute(const vector[unsigned int]&) except + nogil
1096
+
862
1097
  vector[vector[pair[float, float]]] get_barcode() nogil
1098
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
1099
+ vector[vector[vector[pair[int,int]]]] custom_persistences(float*, int size, bool ignore_inf) except + nogil
1100
+
863
1101
  void push_to(const Line[float]&) nogil
864
1102
  void set_one_filtration(const vector[float]&) nogil
865
1103
  int prune_above_dimension(int) except + nogil
@@ -874,6 +1112,7 @@ cdef extern from "Persistence_slices_interface.h":
874
1112
  pair[One_critical_filtration[float], One_critical_filtration[float]] get_bounding_box() except + nogil
875
1113
  vector[One_critical_filtration[float]] get_filtration_values() nogil
876
1114
  vector[int] get_dimensions() nogil
1115
+ int get_dimension(int i) nogil
877
1116
  vector[vector[uint]] get_boundaries() nogil
878
1117
  void coarsen_on_grid_inplace(vector[vector[float]], bool) nogil
879
1118
  vector[Multi_critical_filtration[float]]& get_filtrations() nogil
@@ -883,8 +1122,11 @@ cdef extern from "Persistence_slices_interface.h":
883
1122
  void write_to_scc_file(const string&, int, int, bool, bool, bool, bool) nogil
884
1123
 
885
1124
 
886
- vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[vector[float]]) nogil
887
- vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[pair[vector[float],vector[float]]]) nogil
1125
+ vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[vector[float]], bool) except + nogil
1126
+ vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[pair[vector[float],vector[float]]],bool) except + nogil
1127
+
1128
+
1129
+ C_KSlicer_Matrix1_f32 projective_cover_kernel(int dim) except + nogil
888
1130
 
889
1131
  #------------------------------------------------------------------------------
890
1132
  cdef extern from "Persistence_slices_interface.h":
@@ -896,7 +1138,14 @@ cdef extern from "Persistence_slices_interface.h":
896
1138
  C_KSlicer_Matrix0_f64(const vector[vector[unsigned int]]&, const vector[int]&, const vector[Multi_critical_filtration[double]]&)
897
1139
 
898
1140
  C_KSlicer_Matrix0_f64& operator=(const C_KSlicer_Matrix0_f64&)
1141
+
1142
+ pair[C_KSlicer_Matrix0_f64, vector[unsigned int]] colexical_rearange() except + nogil
1143
+ C_KSlicer_Matrix0_f64 permute(const vector[unsigned int]&) except + nogil
1144
+
899
1145
  vector[vector[pair[double, double]]] get_barcode() nogil
1146
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
1147
+ vector[vector[vector[pair[int,int]]]] custom_persistences(double*, int size, bool ignore_inf) except + nogil
1148
+
900
1149
  void push_to(const Line[double]&) nogil
901
1150
  void set_one_filtration(const vector[double]&) nogil
902
1151
  int prune_above_dimension(int) except + nogil
@@ -911,6 +1160,7 @@ cdef extern from "Persistence_slices_interface.h":
911
1160
  pair[One_critical_filtration[double], One_critical_filtration[double]] get_bounding_box() except + nogil
912
1161
  vector[One_critical_filtration[double]] get_filtration_values() nogil
913
1162
  vector[int] get_dimensions() nogil
1163
+ int get_dimension(int i) nogil
914
1164
  vector[vector[uint]] get_boundaries() nogil
915
1165
  void coarsen_on_grid_inplace(vector[vector[double]], bool) nogil
916
1166
  vector[Multi_critical_filtration[double]]& get_filtrations() nogil
@@ -920,12 +1170,15 @@ cdef extern from "Persistence_slices_interface.h":
920
1170
  void write_to_scc_file(const string&, int, int, bool, bool, bool, bool) nogil
921
1171
 
922
1172
 
923
- vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[vector[double]]) nogil
924
- vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[pair[vector[double],vector[double]]]) nogil
1173
+ vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[vector[double]], bool) except + nogil
1174
+ vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[pair[vector[double],vector[double]]],bool) except + nogil
1175
+
1176
+
1177
+ C_KSlicer_Matrix0_f64 projective_cover_kernel(int dim) except + nogil
925
1178
 
926
1179
  #------------------------------------------------------------------------------
927
1180
  cdef extern from "Persistence_slices_interface.h":
928
- cdef cppclass C_KSlicer_Matrix1_f64 "TrucPythonInterface<BackendsEnum::Matrix,false,true,double,Available_columns::SMALL_VECTOR>":
1181
+ cdef cppclass C_KSlicer_Matrix1_f64 "TrucPythonInterface<BackendsEnum::Matrix,false,true,double,Available_columns::NAIVE_VECTOR>":
929
1182
  ctypedef double value_type
930
1183
 
931
1184
  C_KSlicer_Matrix1_f64()
@@ -933,7 +1186,14 @@ cdef extern from "Persistence_slices_interface.h":
933
1186
  C_KSlicer_Matrix1_f64(const vector[vector[unsigned int]]&, const vector[int]&, const vector[Multi_critical_filtration[double]]&)
934
1187
 
935
1188
  C_KSlicer_Matrix1_f64& operator=(const C_KSlicer_Matrix1_f64&)
1189
+
1190
+ pair[C_KSlicer_Matrix1_f64, vector[unsigned int]] colexical_rearange() except + nogil
1191
+ C_KSlicer_Matrix1_f64 permute(const vector[unsigned int]&) except + nogil
1192
+
936
1193
  vector[vector[pair[double, double]]] get_barcode() nogil
1194
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
1195
+ vector[vector[vector[pair[int,int]]]] custom_persistences(double*, int size, bool ignore_inf) except + nogil
1196
+
937
1197
  void push_to(const Line[double]&) nogil
938
1198
  void set_one_filtration(const vector[double]&) nogil
939
1199
  int prune_above_dimension(int) except + nogil
@@ -948,6 +1208,7 @@ cdef extern from "Persistence_slices_interface.h":
948
1208
  pair[One_critical_filtration[double], One_critical_filtration[double]] get_bounding_box() except + nogil
949
1209
  vector[One_critical_filtration[double]] get_filtration_values() nogil
950
1210
  vector[int] get_dimensions() nogil
1211
+ int get_dimension(int i) nogil
951
1212
  vector[vector[uint]] get_boundaries() nogil
952
1213
  void coarsen_on_grid_inplace(vector[vector[double]], bool) nogil
953
1214
  vector[Multi_critical_filtration[double]]& get_filtrations() nogil
@@ -957,8 +1218,11 @@ cdef extern from "Persistence_slices_interface.h":
957
1218
  void write_to_scc_file(const string&, int, int, bool, bool, bool, bool) nogil
958
1219
 
959
1220
 
960
- vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[vector[double]]) nogil
961
- vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[pair[vector[double],vector[double]]]) nogil
1221
+ vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[vector[double]], bool) except + nogil
1222
+ vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[pair[vector[double],vector[double]]],bool) except + nogil
1223
+
1224
+
1225
+ C_KSlicer_Matrix1_f64 projective_cover_kernel(int dim) except + nogil
962
1226
 
963
1227
  #------------------------------------------------------------------------------
964
1228
  cdef extern from "Persistence_slices_interface.h":
@@ -970,7 +1234,14 @@ cdef extern from "Persistence_slices_interface.h":
970
1234
  C_Slicer_Matrix0_i32(const vector[vector[unsigned int]]&, const vector[int]&, const vector[One_critical_filtration[int32_t]]&)
971
1235
 
972
1236
  C_Slicer_Matrix0_i32& operator=(const C_Slicer_Matrix0_i32&)
1237
+
1238
+ pair[C_Slicer_Matrix0_i32, vector[unsigned int]] colexical_rearange() except + nogil
1239
+ C_Slicer_Matrix0_i32 permute(const vector[unsigned int]&) except + nogil
1240
+
973
1241
  vector[vector[pair[int32_t, int32_t]]] get_barcode() nogil
1242
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
1243
+ vector[vector[vector[pair[int,int]]]] custom_persistences(int32_t*, int size, bool ignore_inf) except + nogil
1244
+
974
1245
  void push_to(const Line[int32_t]&) nogil
975
1246
  void set_one_filtration(const vector[int32_t]&) nogil
976
1247
  int prune_above_dimension(int) except + nogil
@@ -985,6 +1256,7 @@ cdef extern from "Persistence_slices_interface.h":
985
1256
  pair[One_critical_filtration[int32_t], One_critical_filtration[int32_t]] get_bounding_box() except + nogil
986
1257
  vector[One_critical_filtration[int32_t]] get_filtration_values() nogil
987
1258
  vector[int] get_dimensions() nogil
1259
+ int get_dimension(int i) nogil
988
1260
  vector[vector[uint]] get_boundaries() nogil
989
1261
  void coarsen_on_grid_inplace(vector[vector[int32_t]], bool) nogil
990
1262
  vector[One_critical_filtration[int32_t]]& get_filtrations() nogil
@@ -994,12 +1266,15 @@ cdef extern from "Persistence_slices_interface.h":
994
1266
  void build_from_scc_file(const string&, bool, bool, int) except + nogil
995
1267
 
996
1268
 
997
- vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[vector[int32_t]]) nogil
998
- vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[pair[vector[int32_t],vector[int32_t]]]) nogil
1269
+ vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[vector[int32_t]], bool) except + nogil
1270
+ vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[pair[vector[int32_t],vector[int32_t]]],bool) except + nogil
1271
+
1272
+
1273
+ C_Slicer_Matrix0_i32 projective_cover_kernel(int dim) except + nogil
999
1274
 
1000
1275
  #------------------------------------------------------------------------------
1001
1276
  cdef extern from "Persistence_slices_interface.h":
1002
- cdef cppclass C_Slicer_Matrix1_i32 "TrucPythonInterface<BackendsEnum::Matrix,false,false,int32_t,Available_columns::SMALL_VECTOR>":
1277
+ cdef cppclass C_Slicer_Matrix1_i32 "TrucPythonInterface<BackendsEnum::Matrix,false,false,int32_t,Available_columns::NAIVE_VECTOR>":
1003
1278
  ctypedef int32_t value_type
1004
1279
 
1005
1280
  C_Slicer_Matrix1_i32()
@@ -1007,7 +1282,14 @@ cdef extern from "Persistence_slices_interface.h":
1007
1282
  C_Slicer_Matrix1_i32(const vector[vector[unsigned int]]&, const vector[int]&, const vector[One_critical_filtration[int32_t]]&)
1008
1283
 
1009
1284
  C_Slicer_Matrix1_i32& operator=(const C_Slicer_Matrix1_i32&)
1285
+
1286
+ pair[C_Slicer_Matrix1_i32, vector[unsigned int]] colexical_rearange() except + nogil
1287
+ C_Slicer_Matrix1_i32 permute(const vector[unsigned int]&) except + nogil
1288
+
1010
1289
  vector[vector[pair[int32_t, int32_t]]] get_barcode() nogil
1290
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
1291
+ vector[vector[vector[pair[int,int]]]] custom_persistences(int32_t*, int size, bool ignore_inf) except + nogil
1292
+
1011
1293
  void push_to(const Line[int32_t]&) nogil
1012
1294
  void set_one_filtration(const vector[int32_t]&) nogil
1013
1295
  int prune_above_dimension(int) except + nogil
@@ -1022,6 +1304,7 @@ cdef extern from "Persistence_slices_interface.h":
1022
1304
  pair[One_critical_filtration[int32_t], One_critical_filtration[int32_t]] get_bounding_box() except + nogil
1023
1305
  vector[One_critical_filtration[int32_t]] get_filtration_values() nogil
1024
1306
  vector[int] get_dimensions() nogil
1307
+ int get_dimension(int i) nogil
1025
1308
  vector[vector[uint]] get_boundaries() nogil
1026
1309
  void coarsen_on_grid_inplace(vector[vector[int32_t]], bool) nogil
1027
1310
  vector[One_critical_filtration[int32_t]]& get_filtrations() nogil
@@ -1031,8 +1314,11 @@ cdef extern from "Persistence_slices_interface.h":
1031
1314
  void build_from_scc_file(const string&, bool, bool, int) except + nogil
1032
1315
 
1033
1316
 
1034
- vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[vector[int32_t]]) nogil
1035
- vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[pair[vector[int32_t],vector[int32_t]]]) nogil
1317
+ vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[vector[int32_t]], bool) except + nogil
1318
+ vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[pair[vector[int32_t],vector[int32_t]]],bool) except + nogil
1319
+
1320
+
1321
+ C_Slicer_Matrix1_i32 projective_cover_kernel(int dim) except + nogil
1036
1322
 
1037
1323
  #------------------------------------------------------------------------------
1038
1324
  cdef extern from "Persistence_slices_interface.h":
@@ -1044,7 +1330,14 @@ cdef extern from "Persistence_slices_interface.h":
1044
1330
  C_Slicer_Matrix0_i64(const vector[vector[unsigned int]]&, const vector[int]&, const vector[One_critical_filtration[int64_t]]&)
1045
1331
 
1046
1332
  C_Slicer_Matrix0_i64& operator=(const C_Slicer_Matrix0_i64&)
1333
+
1334
+ pair[C_Slicer_Matrix0_i64, vector[unsigned int]] colexical_rearange() except + nogil
1335
+ C_Slicer_Matrix0_i64 permute(const vector[unsigned int]&) except + nogil
1336
+
1047
1337
  vector[vector[pair[int64_t, int64_t]]] get_barcode() nogil
1338
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
1339
+ vector[vector[vector[pair[int,int]]]] custom_persistences(int64_t*, int size, bool ignore_inf) except + nogil
1340
+
1048
1341
  void push_to(const Line[int64_t]&) nogil
1049
1342
  void set_one_filtration(const vector[int64_t]&) nogil
1050
1343
  int prune_above_dimension(int) except + nogil
@@ -1059,6 +1352,7 @@ cdef extern from "Persistence_slices_interface.h":
1059
1352
  pair[One_critical_filtration[int64_t], One_critical_filtration[int64_t]] get_bounding_box() except + nogil
1060
1353
  vector[One_critical_filtration[int64_t]] get_filtration_values() nogil
1061
1354
  vector[int] get_dimensions() nogil
1355
+ int get_dimension(int i) nogil
1062
1356
  vector[vector[uint]] get_boundaries() nogil
1063
1357
  void coarsen_on_grid_inplace(vector[vector[int64_t]], bool) nogil
1064
1358
  vector[One_critical_filtration[int64_t]]& get_filtrations() nogil
@@ -1068,12 +1362,15 @@ cdef extern from "Persistence_slices_interface.h":
1068
1362
  void build_from_scc_file(const string&, bool, bool, int) except + nogil
1069
1363
 
1070
1364
 
1071
- vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[vector[int64_t]]) nogil
1072
- vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[pair[vector[int64_t],vector[int64_t]]]) nogil
1365
+ vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[vector[int64_t]], bool) except + nogil
1366
+ vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[pair[vector[int64_t],vector[int64_t]]],bool) except + nogil
1367
+
1368
+
1369
+ C_Slicer_Matrix0_i64 projective_cover_kernel(int dim) except + nogil
1073
1370
 
1074
1371
  #------------------------------------------------------------------------------
1075
1372
  cdef extern from "Persistence_slices_interface.h":
1076
- cdef cppclass C_Slicer_Matrix1_i64 "TrucPythonInterface<BackendsEnum::Matrix,false,false,int64_t,Available_columns::SMALL_VECTOR>":
1373
+ cdef cppclass C_Slicer_Matrix1_i64 "TrucPythonInterface<BackendsEnum::Matrix,false,false,int64_t,Available_columns::NAIVE_VECTOR>":
1077
1374
  ctypedef int64_t value_type
1078
1375
 
1079
1376
  C_Slicer_Matrix1_i64()
@@ -1081,7 +1378,14 @@ cdef extern from "Persistence_slices_interface.h":
1081
1378
  C_Slicer_Matrix1_i64(const vector[vector[unsigned int]]&, const vector[int]&, const vector[One_critical_filtration[int64_t]]&)
1082
1379
 
1083
1380
  C_Slicer_Matrix1_i64& operator=(const C_Slicer_Matrix1_i64&)
1381
+
1382
+ pair[C_Slicer_Matrix1_i64, vector[unsigned int]] colexical_rearange() except + nogil
1383
+ C_Slicer_Matrix1_i64 permute(const vector[unsigned int]&) except + nogil
1384
+
1084
1385
  vector[vector[pair[int64_t, int64_t]]] get_barcode() nogil
1386
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
1387
+ vector[vector[vector[pair[int,int]]]] custom_persistences(int64_t*, int size, bool ignore_inf) except + nogil
1388
+
1085
1389
  void push_to(const Line[int64_t]&) nogil
1086
1390
  void set_one_filtration(const vector[int64_t]&) nogil
1087
1391
  int prune_above_dimension(int) except + nogil
@@ -1096,6 +1400,7 @@ cdef extern from "Persistence_slices_interface.h":
1096
1400
  pair[One_critical_filtration[int64_t], One_critical_filtration[int64_t]] get_bounding_box() except + nogil
1097
1401
  vector[One_critical_filtration[int64_t]] get_filtration_values() nogil
1098
1402
  vector[int] get_dimensions() nogil
1403
+ int get_dimension(int i) nogil
1099
1404
  vector[vector[uint]] get_boundaries() nogil
1100
1405
  void coarsen_on_grid_inplace(vector[vector[int64_t]], bool) nogil
1101
1406
  vector[One_critical_filtration[int64_t]]& get_filtrations() nogil
@@ -1105,8 +1410,11 @@ cdef extern from "Persistence_slices_interface.h":
1105
1410
  void build_from_scc_file(const string&, bool, bool, int) except + nogil
1106
1411
 
1107
1412
 
1108
- vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[vector[int64_t]]) nogil
1109
- vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[pair[vector[int64_t],vector[int64_t]]]) nogil
1413
+ vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[vector[int64_t]], bool) except + nogil
1414
+ vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[pair[vector[int64_t],vector[int64_t]]],bool) except + nogil
1415
+
1416
+
1417
+ C_Slicer_Matrix1_i64 projective_cover_kernel(int dim) except + nogil
1110
1418
 
1111
1419
  #------------------------------------------------------------------------------
1112
1420
  cdef extern from "Persistence_slices_interface.h":
@@ -1118,7 +1426,14 @@ cdef extern from "Persistence_slices_interface.h":
1118
1426
  C_Slicer_Matrix0_f32(const vector[vector[unsigned int]]&, const vector[int]&, const vector[One_critical_filtration[float]]&)
1119
1427
 
1120
1428
  C_Slicer_Matrix0_f32& operator=(const C_Slicer_Matrix0_f32&)
1429
+
1430
+ pair[C_Slicer_Matrix0_f32, vector[unsigned int]] colexical_rearange() except + nogil
1431
+ C_Slicer_Matrix0_f32 permute(const vector[unsigned int]&) except + nogil
1432
+
1121
1433
  vector[vector[pair[float, float]]] get_barcode() nogil
1434
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
1435
+ vector[vector[vector[pair[int,int]]]] custom_persistences(float*, int size, bool ignore_inf) except + nogil
1436
+
1122
1437
  void push_to(const Line[float]&) nogil
1123
1438
  void set_one_filtration(const vector[float]&) nogil
1124
1439
  int prune_above_dimension(int) except + nogil
@@ -1133,6 +1448,7 @@ cdef extern from "Persistence_slices_interface.h":
1133
1448
  pair[One_critical_filtration[float], One_critical_filtration[float]] get_bounding_box() except + nogil
1134
1449
  vector[One_critical_filtration[float]] get_filtration_values() nogil
1135
1450
  vector[int] get_dimensions() nogil
1451
+ int get_dimension(int i) nogil
1136
1452
  vector[vector[uint]] get_boundaries() nogil
1137
1453
  void coarsen_on_grid_inplace(vector[vector[float]], bool) nogil
1138
1454
  vector[One_critical_filtration[float]]& get_filtrations() nogil
@@ -1142,12 +1458,15 @@ cdef extern from "Persistence_slices_interface.h":
1142
1458
  void build_from_scc_file(const string&, bool, bool, int) except + nogil
1143
1459
 
1144
1460
 
1145
- vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[vector[float]]) nogil
1146
- vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[pair[vector[float],vector[float]]]) nogil
1461
+ vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[vector[float]], bool) except + nogil
1462
+ vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[pair[vector[float],vector[float]]],bool) except + nogil
1463
+
1464
+
1465
+ C_Slicer_Matrix0_f32 projective_cover_kernel(int dim) except + nogil
1147
1466
 
1148
1467
  #------------------------------------------------------------------------------
1149
1468
  cdef extern from "Persistence_slices_interface.h":
1150
- cdef cppclass C_Slicer_Matrix1_f32 "TrucPythonInterface<BackendsEnum::Matrix,false,false,float,Available_columns::SMALL_VECTOR>":
1469
+ cdef cppclass C_Slicer_Matrix1_f32 "TrucPythonInterface<BackendsEnum::Matrix,false,false,float,Available_columns::NAIVE_VECTOR>":
1151
1470
  ctypedef float value_type
1152
1471
 
1153
1472
  C_Slicer_Matrix1_f32()
@@ -1155,7 +1474,14 @@ cdef extern from "Persistence_slices_interface.h":
1155
1474
  C_Slicer_Matrix1_f32(const vector[vector[unsigned int]]&, const vector[int]&, const vector[One_critical_filtration[float]]&)
1156
1475
 
1157
1476
  C_Slicer_Matrix1_f32& operator=(const C_Slicer_Matrix1_f32&)
1477
+
1478
+ pair[C_Slicer_Matrix1_f32, vector[unsigned int]] colexical_rearange() except + nogil
1479
+ C_Slicer_Matrix1_f32 permute(const vector[unsigned int]&) except + nogil
1480
+
1158
1481
  vector[vector[pair[float, float]]] get_barcode() nogil
1482
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
1483
+ vector[vector[vector[pair[int,int]]]] custom_persistences(float*, int size, bool ignore_inf) except + nogil
1484
+
1159
1485
  void push_to(const Line[float]&) nogil
1160
1486
  void set_one_filtration(const vector[float]&) nogil
1161
1487
  int prune_above_dimension(int) except + nogil
@@ -1170,6 +1496,7 @@ cdef extern from "Persistence_slices_interface.h":
1170
1496
  pair[One_critical_filtration[float], One_critical_filtration[float]] get_bounding_box() except + nogil
1171
1497
  vector[One_critical_filtration[float]] get_filtration_values() nogil
1172
1498
  vector[int] get_dimensions() nogil
1499
+ int get_dimension(int i) nogil
1173
1500
  vector[vector[uint]] get_boundaries() nogil
1174
1501
  void coarsen_on_grid_inplace(vector[vector[float]], bool) nogil
1175
1502
  vector[One_critical_filtration[float]]& get_filtrations() nogil
@@ -1179,8 +1506,11 @@ cdef extern from "Persistence_slices_interface.h":
1179
1506
  void build_from_scc_file(const string&, bool, bool, int) except + nogil
1180
1507
 
1181
1508
 
1182
- vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[vector[float]]) nogil
1183
- vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[pair[vector[float],vector[float]]]) nogil
1509
+ vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[vector[float]], bool) except + nogil
1510
+ vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[pair[vector[float],vector[float]]],bool) except + nogil
1511
+
1512
+
1513
+ C_Slicer_Matrix1_f32 projective_cover_kernel(int dim) except + nogil
1184
1514
 
1185
1515
  #------------------------------------------------------------------------------
1186
1516
  cdef extern from "Persistence_slices_interface.h":
@@ -1192,7 +1522,14 @@ cdef extern from "Persistence_slices_interface.h":
1192
1522
  C_Slicer_Matrix0_f64(const vector[vector[unsigned int]]&, const vector[int]&, const vector[One_critical_filtration[double]]&)
1193
1523
 
1194
1524
  C_Slicer_Matrix0_f64& operator=(const C_Slicer_Matrix0_f64&)
1525
+
1526
+ pair[C_Slicer_Matrix0_f64, vector[unsigned int]] colexical_rearange() except + nogil
1527
+ C_Slicer_Matrix0_f64 permute(const vector[unsigned int]&) except + nogil
1528
+
1195
1529
  vector[vector[pair[double, double]]] get_barcode() nogil
1530
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
1531
+ vector[vector[vector[pair[int,int]]]] custom_persistences(double*, int size, bool ignore_inf) except + nogil
1532
+
1196
1533
  void push_to(const Line[double]&) nogil
1197
1534
  void set_one_filtration(const vector[double]&) nogil
1198
1535
  int prune_above_dimension(int) except + nogil
@@ -1207,6 +1544,7 @@ cdef extern from "Persistence_slices_interface.h":
1207
1544
  pair[One_critical_filtration[double], One_critical_filtration[double]] get_bounding_box() except + nogil
1208
1545
  vector[One_critical_filtration[double]] get_filtration_values() nogil
1209
1546
  vector[int] get_dimensions() nogil
1547
+ int get_dimension(int i) nogil
1210
1548
  vector[vector[uint]] get_boundaries() nogil
1211
1549
  void coarsen_on_grid_inplace(vector[vector[double]], bool) nogil
1212
1550
  vector[One_critical_filtration[double]]& get_filtrations() nogil
@@ -1216,12 +1554,15 @@ cdef extern from "Persistence_slices_interface.h":
1216
1554
  void build_from_scc_file(const string&, bool, bool, int) except + nogil
1217
1555
 
1218
1556
 
1219
- vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[vector[double]]) nogil
1220
- vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[pair[vector[double],vector[double]]]) nogil
1557
+ vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[vector[double]], bool) except + nogil
1558
+ vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[pair[vector[double],vector[double]]],bool) except + nogil
1559
+
1560
+
1561
+ C_Slicer_Matrix0_f64 projective_cover_kernel(int dim) except + nogil
1221
1562
 
1222
1563
  #------------------------------------------------------------------------------
1223
1564
  cdef extern from "Persistence_slices_interface.h":
1224
- cdef cppclass C_Slicer_Matrix1_f64 "TrucPythonInterface<BackendsEnum::Matrix,false,false,double,Available_columns::SMALL_VECTOR>":
1565
+ cdef cppclass C_Slicer_Matrix1_f64 "TrucPythonInterface<BackendsEnum::Matrix,false,false,double,Available_columns::NAIVE_VECTOR>":
1225
1566
  ctypedef double value_type
1226
1567
 
1227
1568
  C_Slicer_Matrix1_f64()
@@ -1229,7 +1570,14 @@ cdef extern from "Persistence_slices_interface.h":
1229
1570
  C_Slicer_Matrix1_f64(const vector[vector[unsigned int]]&, const vector[int]&, const vector[One_critical_filtration[double]]&)
1230
1571
 
1231
1572
  C_Slicer_Matrix1_f64& operator=(const C_Slicer_Matrix1_f64&)
1573
+
1574
+ pair[C_Slicer_Matrix1_f64, vector[unsigned int]] colexical_rearange() except + nogil
1575
+ C_Slicer_Matrix1_f64 permute(const vector[unsigned int]&) except + nogil
1576
+
1232
1577
  vector[vector[pair[double, double]]] get_barcode() nogil
1578
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
1579
+ vector[vector[vector[pair[int,int]]]] custom_persistences(double*, int size, bool ignore_inf) except + nogil
1580
+
1233
1581
  void push_to(const Line[double]&) nogil
1234
1582
  void set_one_filtration(const vector[double]&) nogil
1235
1583
  int prune_above_dimension(int) except + nogil
@@ -1244,6 +1592,7 @@ cdef extern from "Persistence_slices_interface.h":
1244
1592
  pair[One_critical_filtration[double], One_critical_filtration[double]] get_bounding_box() except + nogil
1245
1593
  vector[One_critical_filtration[double]] get_filtration_values() nogil
1246
1594
  vector[int] get_dimensions() nogil
1595
+ int get_dimension(int i) nogil
1247
1596
  vector[vector[uint]] get_boundaries() nogil
1248
1597
  void coarsen_on_grid_inplace(vector[vector[double]], bool) nogil
1249
1598
  vector[One_critical_filtration[double]]& get_filtrations() nogil
@@ -1253,8 +1602,11 @@ cdef extern from "Persistence_slices_interface.h":
1253
1602
  void build_from_scc_file(const string&, bool, bool, int) except + nogil
1254
1603
 
1255
1604
 
1256
- vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[vector[double]]) nogil
1257
- vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[pair[vector[double],vector[double]]]) nogil
1605
+ vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[vector[double]], bool) except + nogil
1606
+ vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[pair[vector[double],vector[double]]],bool) except + nogil
1607
+
1608
+
1609
+ C_Slicer_Matrix1_f64 projective_cover_kernel(int dim) except + nogil
1258
1610
 
1259
1611
  #------------------------------------------------------------------------------
1260
1612
  cdef extern from "Persistence_slices_interface.h":
@@ -1266,7 +1618,14 @@ cdef extern from "Persistence_slices_interface.h":
1266
1618
  C_KSlicer_GudhiCohomology0_i32(const vector[vector[unsigned int]]&, const vector[int]&, const vector[Multi_critical_filtration[int32_t]]&)
1267
1619
 
1268
1620
  C_KSlicer_GudhiCohomology0_i32& operator=(const C_KSlicer_GudhiCohomology0_i32&)
1621
+
1622
+ pair[C_KSlicer_GudhiCohomology0_i32, vector[unsigned int]] colexical_rearange() except + nogil
1623
+ C_KSlicer_GudhiCohomology0_i32 permute(const vector[unsigned int]&) except + nogil
1624
+
1269
1625
  vector[vector[pair[int32_t, int32_t]]] get_barcode() nogil
1626
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
1627
+ vector[vector[vector[pair[int,int]]]] custom_persistences(int32_t*, int size, bool ignore_inf) except + nogil
1628
+
1270
1629
  void push_to(const Line[int32_t]&) nogil
1271
1630
  void set_one_filtration(const vector[int32_t]&) nogil
1272
1631
  int prune_above_dimension(int) except + nogil
@@ -1281,6 +1640,7 @@ cdef extern from "Persistence_slices_interface.h":
1281
1640
  pair[One_critical_filtration[int32_t], One_critical_filtration[int32_t]] get_bounding_box() except + nogil
1282
1641
  vector[One_critical_filtration[int32_t]] get_filtration_values() nogil
1283
1642
  vector[int] get_dimensions() nogil
1643
+ int get_dimension(int i) nogil
1284
1644
  vector[vector[uint]] get_boundaries() nogil
1285
1645
  void coarsen_on_grid_inplace(vector[vector[int32_t]], bool) nogil
1286
1646
  vector[Multi_critical_filtration[int32_t]]& get_filtrations() nogil
@@ -1290,8 +1650,11 @@ cdef extern from "Persistence_slices_interface.h":
1290
1650
  void write_to_scc_file(const string&, int, int, bool, bool, bool, bool) nogil
1291
1651
 
1292
1652
 
1293
- vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[vector[int32_t]]) nogil
1294
- vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[pair[vector[int32_t],vector[int32_t]]]) nogil
1653
+ vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[vector[int32_t]], bool) except + nogil
1654
+ vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[pair[vector[int32_t],vector[int32_t]]],bool) except + nogil
1655
+
1656
+
1657
+ C_KSlicer_GudhiCohomology0_i32 projective_cover_kernel(int dim) except + nogil
1295
1658
 
1296
1659
  #------------------------------------------------------------------------------
1297
1660
  cdef extern from "Persistence_slices_interface.h":
@@ -1303,7 +1666,14 @@ cdef extern from "Persistence_slices_interface.h":
1303
1666
  C_KSlicer_GudhiCohomology0_i64(const vector[vector[unsigned int]]&, const vector[int]&, const vector[Multi_critical_filtration[int64_t]]&)
1304
1667
 
1305
1668
  C_KSlicer_GudhiCohomology0_i64& operator=(const C_KSlicer_GudhiCohomology0_i64&)
1669
+
1670
+ pair[C_KSlicer_GudhiCohomology0_i64, vector[unsigned int]] colexical_rearange() except + nogil
1671
+ C_KSlicer_GudhiCohomology0_i64 permute(const vector[unsigned int]&) except + nogil
1672
+
1306
1673
  vector[vector[pair[int64_t, int64_t]]] get_barcode() nogil
1674
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
1675
+ vector[vector[vector[pair[int,int]]]] custom_persistences(int64_t*, int size, bool ignore_inf) except + nogil
1676
+
1307
1677
  void push_to(const Line[int64_t]&) nogil
1308
1678
  void set_one_filtration(const vector[int64_t]&) nogil
1309
1679
  int prune_above_dimension(int) except + nogil
@@ -1318,6 +1688,7 @@ cdef extern from "Persistence_slices_interface.h":
1318
1688
  pair[One_critical_filtration[int64_t], One_critical_filtration[int64_t]] get_bounding_box() except + nogil
1319
1689
  vector[One_critical_filtration[int64_t]] get_filtration_values() nogil
1320
1690
  vector[int] get_dimensions() nogil
1691
+ int get_dimension(int i) nogil
1321
1692
  vector[vector[uint]] get_boundaries() nogil
1322
1693
  void coarsen_on_grid_inplace(vector[vector[int64_t]], bool) nogil
1323
1694
  vector[Multi_critical_filtration[int64_t]]& get_filtrations() nogil
@@ -1327,8 +1698,11 @@ cdef extern from "Persistence_slices_interface.h":
1327
1698
  void write_to_scc_file(const string&, int, int, bool, bool, bool, bool) nogil
1328
1699
 
1329
1700
 
1330
- vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[vector[int64_t]]) nogil
1331
- vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[pair[vector[int64_t],vector[int64_t]]]) nogil
1701
+ vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[vector[int64_t]], bool) except + nogil
1702
+ vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[pair[vector[int64_t],vector[int64_t]]],bool) except + nogil
1703
+
1704
+
1705
+ C_KSlicer_GudhiCohomology0_i64 projective_cover_kernel(int dim) except + nogil
1332
1706
 
1333
1707
  #------------------------------------------------------------------------------
1334
1708
  cdef extern from "Persistence_slices_interface.h":
@@ -1340,7 +1714,14 @@ cdef extern from "Persistence_slices_interface.h":
1340
1714
  C_KSlicer_GudhiCohomology0_f32(const vector[vector[unsigned int]]&, const vector[int]&, const vector[Multi_critical_filtration[float]]&)
1341
1715
 
1342
1716
  C_KSlicer_GudhiCohomology0_f32& operator=(const C_KSlicer_GudhiCohomology0_f32&)
1717
+
1718
+ pair[C_KSlicer_GudhiCohomology0_f32, vector[unsigned int]] colexical_rearange() except + nogil
1719
+ C_KSlicer_GudhiCohomology0_f32 permute(const vector[unsigned int]&) except + nogil
1720
+
1343
1721
  vector[vector[pair[float, float]]] get_barcode() nogil
1722
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
1723
+ vector[vector[vector[pair[int,int]]]] custom_persistences(float*, int size, bool ignore_inf) except + nogil
1724
+
1344
1725
  void push_to(const Line[float]&) nogil
1345
1726
  void set_one_filtration(const vector[float]&) nogil
1346
1727
  int prune_above_dimension(int) except + nogil
@@ -1355,6 +1736,7 @@ cdef extern from "Persistence_slices_interface.h":
1355
1736
  pair[One_critical_filtration[float], One_critical_filtration[float]] get_bounding_box() except + nogil
1356
1737
  vector[One_critical_filtration[float]] get_filtration_values() nogil
1357
1738
  vector[int] get_dimensions() nogil
1739
+ int get_dimension(int i) nogil
1358
1740
  vector[vector[uint]] get_boundaries() nogil
1359
1741
  void coarsen_on_grid_inplace(vector[vector[float]], bool) nogil
1360
1742
  vector[Multi_critical_filtration[float]]& get_filtrations() nogil
@@ -1364,8 +1746,11 @@ cdef extern from "Persistence_slices_interface.h":
1364
1746
  void write_to_scc_file(const string&, int, int, bool, bool, bool, bool) nogil
1365
1747
 
1366
1748
 
1367
- vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[vector[float]]) nogil
1368
- vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[pair[vector[float],vector[float]]]) nogil
1749
+ vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[vector[float]], bool) except + nogil
1750
+ vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[pair[vector[float],vector[float]]],bool) except + nogil
1751
+
1752
+
1753
+ C_KSlicer_GudhiCohomology0_f32 projective_cover_kernel(int dim) except + nogil
1369
1754
 
1370
1755
  #------------------------------------------------------------------------------
1371
1756
  cdef extern from "Persistence_slices_interface.h":
@@ -1377,7 +1762,14 @@ cdef extern from "Persistence_slices_interface.h":
1377
1762
  C_KSlicer_GudhiCohomology0_f64(const vector[vector[unsigned int]]&, const vector[int]&, const vector[Multi_critical_filtration[double]]&)
1378
1763
 
1379
1764
  C_KSlicer_GudhiCohomology0_f64& operator=(const C_KSlicer_GudhiCohomology0_f64&)
1765
+
1766
+ pair[C_KSlicer_GudhiCohomology0_f64, vector[unsigned int]] colexical_rearange() except + nogil
1767
+ C_KSlicer_GudhiCohomology0_f64 permute(const vector[unsigned int]&) except + nogil
1768
+
1380
1769
  vector[vector[pair[double, double]]] get_barcode() nogil
1770
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
1771
+ vector[vector[vector[pair[int,int]]]] custom_persistences(double*, int size, bool ignore_inf) except + nogil
1772
+
1381
1773
  void push_to(const Line[double]&) nogil
1382
1774
  void set_one_filtration(const vector[double]&) nogil
1383
1775
  int prune_above_dimension(int) except + nogil
@@ -1392,6 +1784,7 @@ cdef extern from "Persistence_slices_interface.h":
1392
1784
  pair[One_critical_filtration[double], One_critical_filtration[double]] get_bounding_box() except + nogil
1393
1785
  vector[One_critical_filtration[double]] get_filtration_values() nogil
1394
1786
  vector[int] get_dimensions() nogil
1787
+ int get_dimension(int i) nogil
1395
1788
  vector[vector[uint]] get_boundaries() nogil
1396
1789
  void coarsen_on_grid_inplace(vector[vector[double]], bool) nogil
1397
1790
  vector[Multi_critical_filtration[double]]& get_filtrations() nogil
@@ -1401,8 +1794,11 @@ cdef extern from "Persistence_slices_interface.h":
1401
1794
  void write_to_scc_file(const string&, int, int, bool, bool, bool, bool) nogil
1402
1795
 
1403
1796
 
1404
- vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[vector[double]]) nogil
1405
- vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[pair[vector[double],vector[double]]]) nogil
1797
+ vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[vector[double]], bool) except + nogil
1798
+ vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[pair[vector[double],vector[double]]],bool) except + nogil
1799
+
1800
+
1801
+ C_KSlicer_GudhiCohomology0_f64 projective_cover_kernel(int dim) except + nogil
1406
1802
 
1407
1803
  #------------------------------------------------------------------------------
1408
1804
  cdef extern from "Persistence_slices_interface.h":
@@ -1414,7 +1810,14 @@ cdef extern from "Persistence_slices_interface.h":
1414
1810
  C_Slicer_GudhiCohomology0_i32(const vector[vector[unsigned int]]&, const vector[int]&, const vector[One_critical_filtration[int32_t]]&)
1415
1811
 
1416
1812
  C_Slicer_GudhiCohomology0_i32& operator=(const C_Slicer_GudhiCohomology0_i32&)
1813
+
1814
+ pair[C_Slicer_GudhiCohomology0_i32, vector[unsigned int]] colexical_rearange() except + nogil
1815
+ C_Slicer_GudhiCohomology0_i32 permute(const vector[unsigned int]&) except + nogil
1816
+
1417
1817
  vector[vector[pair[int32_t, int32_t]]] get_barcode() nogil
1818
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
1819
+ vector[vector[vector[pair[int,int]]]] custom_persistences(int32_t*, int size, bool ignore_inf) except + nogil
1820
+
1418
1821
  void push_to(const Line[int32_t]&) nogil
1419
1822
  void set_one_filtration(const vector[int32_t]&) nogil
1420
1823
  int prune_above_dimension(int) except + nogil
@@ -1429,6 +1832,7 @@ cdef extern from "Persistence_slices_interface.h":
1429
1832
  pair[One_critical_filtration[int32_t], One_critical_filtration[int32_t]] get_bounding_box() except + nogil
1430
1833
  vector[One_critical_filtration[int32_t]] get_filtration_values() nogil
1431
1834
  vector[int] get_dimensions() nogil
1835
+ int get_dimension(int i) nogil
1432
1836
  vector[vector[uint]] get_boundaries() nogil
1433
1837
  void coarsen_on_grid_inplace(vector[vector[int32_t]], bool) nogil
1434
1838
  vector[One_critical_filtration[int32_t]]& get_filtrations() nogil
@@ -1438,8 +1842,11 @@ cdef extern from "Persistence_slices_interface.h":
1438
1842
  void build_from_scc_file(const string&, bool, bool, int) except + nogil
1439
1843
 
1440
1844
 
1441
- vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[vector[int32_t]]) nogil
1442
- vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[pair[vector[int32_t],vector[int32_t]]]) nogil
1845
+ vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[vector[int32_t]], bool) except + nogil
1846
+ vector[vector[vector[pair[int32_t, int32_t]]]] persistence_on_lines(vector[pair[vector[int32_t],vector[int32_t]]],bool) except + nogil
1847
+
1848
+
1849
+ C_Slicer_GudhiCohomology0_i32 projective_cover_kernel(int dim) except + nogil
1443
1850
 
1444
1851
  #------------------------------------------------------------------------------
1445
1852
  cdef extern from "Persistence_slices_interface.h":
@@ -1451,7 +1858,14 @@ cdef extern from "Persistence_slices_interface.h":
1451
1858
  C_Slicer_GudhiCohomology0_i64(const vector[vector[unsigned int]]&, const vector[int]&, const vector[One_critical_filtration[int64_t]]&)
1452
1859
 
1453
1860
  C_Slicer_GudhiCohomology0_i64& operator=(const C_Slicer_GudhiCohomology0_i64&)
1861
+
1862
+ pair[C_Slicer_GudhiCohomology0_i64, vector[unsigned int]] colexical_rearange() except + nogil
1863
+ C_Slicer_GudhiCohomology0_i64 permute(const vector[unsigned int]&) except + nogil
1864
+
1454
1865
  vector[vector[pair[int64_t, int64_t]]] get_barcode() nogil
1866
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
1867
+ vector[vector[vector[pair[int,int]]]] custom_persistences(int64_t*, int size, bool ignore_inf) except + nogil
1868
+
1455
1869
  void push_to(const Line[int64_t]&) nogil
1456
1870
  void set_one_filtration(const vector[int64_t]&) nogil
1457
1871
  int prune_above_dimension(int) except + nogil
@@ -1466,6 +1880,7 @@ cdef extern from "Persistence_slices_interface.h":
1466
1880
  pair[One_critical_filtration[int64_t], One_critical_filtration[int64_t]] get_bounding_box() except + nogil
1467
1881
  vector[One_critical_filtration[int64_t]] get_filtration_values() nogil
1468
1882
  vector[int] get_dimensions() nogil
1883
+ int get_dimension(int i) nogil
1469
1884
  vector[vector[uint]] get_boundaries() nogil
1470
1885
  void coarsen_on_grid_inplace(vector[vector[int64_t]], bool) nogil
1471
1886
  vector[One_critical_filtration[int64_t]]& get_filtrations() nogil
@@ -1475,8 +1890,11 @@ cdef extern from "Persistence_slices_interface.h":
1475
1890
  void build_from_scc_file(const string&, bool, bool, int) except + nogil
1476
1891
 
1477
1892
 
1478
- vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[vector[int64_t]]) nogil
1479
- vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[pair[vector[int64_t],vector[int64_t]]]) nogil
1893
+ vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[vector[int64_t]], bool) except + nogil
1894
+ vector[vector[vector[pair[int64_t, int64_t]]]] persistence_on_lines(vector[pair[vector[int64_t],vector[int64_t]]],bool) except + nogil
1895
+
1896
+
1897
+ C_Slicer_GudhiCohomology0_i64 projective_cover_kernel(int dim) except + nogil
1480
1898
 
1481
1899
  #------------------------------------------------------------------------------
1482
1900
  cdef extern from "Persistence_slices_interface.h":
@@ -1488,7 +1906,14 @@ cdef extern from "Persistence_slices_interface.h":
1488
1906
  C_Slicer_GudhiCohomology0_f32(const vector[vector[unsigned int]]&, const vector[int]&, const vector[One_critical_filtration[float]]&)
1489
1907
 
1490
1908
  C_Slicer_GudhiCohomology0_f32& operator=(const C_Slicer_GudhiCohomology0_f32&)
1909
+
1910
+ pair[C_Slicer_GudhiCohomology0_f32, vector[unsigned int]] colexical_rearange() except + nogil
1911
+ C_Slicer_GudhiCohomology0_f32 permute(const vector[unsigned int]&) except + nogil
1912
+
1491
1913
  vector[vector[pair[float, float]]] get_barcode() nogil
1914
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
1915
+ vector[vector[vector[pair[int,int]]]] custom_persistences(float*, int size, bool ignore_inf) except + nogil
1916
+
1492
1917
  void push_to(const Line[float]&) nogil
1493
1918
  void set_one_filtration(const vector[float]&) nogil
1494
1919
  int prune_above_dimension(int) except + nogil
@@ -1503,6 +1928,7 @@ cdef extern from "Persistence_slices_interface.h":
1503
1928
  pair[One_critical_filtration[float], One_critical_filtration[float]] get_bounding_box() except + nogil
1504
1929
  vector[One_critical_filtration[float]] get_filtration_values() nogil
1505
1930
  vector[int] get_dimensions() nogil
1931
+ int get_dimension(int i) nogil
1506
1932
  vector[vector[uint]] get_boundaries() nogil
1507
1933
  void coarsen_on_grid_inplace(vector[vector[float]], bool) nogil
1508
1934
  vector[One_critical_filtration[float]]& get_filtrations() nogil
@@ -1512,8 +1938,11 @@ cdef extern from "Persistence_slices_interface.h":
1512
1938
  void build_from_scc_file(const string&, bool, bool, int) except + nogil
1513
1939
 
1514
1940
 
1515
- vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[vector[float]]) nogil
1516
- vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[pair[vector[float],vector[float]]]) nogil
1941
+ vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[vector[float]], bool) except + nogil
1942
+ vector[vector[vector[pair[float, float]]]] persistence_on_lines(vector[pair[vector[float],vector[float]]],bool) except + nogil
1943
+
1944
+
1945
+ C_Slicer_GudhiCohomology0_f32 projective_cover_kernel(int dim) except + nogil
1517
1946
 
1518
1947
  #------------------------------------------------------------------------------
1519
1948
  cdef extern from "Persistence_slices_interface.h":
@@ -1525,7 +1954,14 @@ cdef extern from "Persistence_slices_interface.h":
1525
1954
  C_Slicer_GudhiCohomology0_f64(const vector[vector[unsigned int]]&, const vector[int]&, const vector[One_critical_filtration[double]]&)
1526
1955
 
1527
1956
  C_Slicer_GudhiCohomology0_f64& operator=(const C_Slicer_GudhiCohomology0_f64&)
1957
+
1958
+ pair[C_Slicer_GudhiCohomology0_f64, vector[unsigned int]] colexical_rearange() except + nogil
1959
+ C_Slicer_GudhiCohomology0_f64 permute(const vector[unsigned int]&) except + nogil
1960
+
1528
1961
  vector[vector[pair[double, double]]] get_barcode() nogil
1962
+ vector[vector[pair[int,int]]] get_barcode_idx() nogil
1963
+ vector[vector[vector[pair[int,int]]]] custom_persistences(double*, int size, bool ignore_inf) except + nogil
1964
+
1529
1965
  void push_to(const Line[double]&) nogil
1530
1966
  void set_one_filtration(const vector[double]&) nogil
1531
1967
  int prune_above_dimension(int) except + nogil
@@ -1540,6 +1976,7 @@ cdef extern from "Persistence_slices_interface.h":
1540
1976
  pair[One_critical_filtration[double], One_critical_filtration[double]] get_bounding_box() except + nogil
1541
1977
  vector[One_critical_filtration[double]] get_filtration_values() nogil
1542
1978
  vector[int] get_dimensions() nogil
1979
+ int get_dimension(int i) nogil
1543
1980
  vector[vector[uint]] get_boundaries() nogil
1544
1981
  void coarsen_on_grid_inplace(vector[vector[double]], bool) nogil
1545
1982
  vector[One_critical_filtration[double]]& get_filtrations() nogil
@@ -1549,8 +1986,11 @@ cdef extern from "Persistence_slices_interface.h":
1549
1986
  void build_from_scc_file(const string&, bool, bool, int) except + nogil
1550
1987
 
1551
1988
 
1552
- vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[vector[double]]) nogil
1553
- vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[pair[vector[double],vector[double]]]) nogil
1989
+ vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[vector[double]], bool) except + nogil
1990
+ vector[vector[vector[pair[double, double]]]] persistence_on_lines(vector[pair[vector[double],vector[double]]],bool) except + nogil
1991
+
1992
+
1993
+ C_Slicer_GudhiCohomology0_f64 projective_cover_kernel(int dim) except + nogil
1554
1994
 
1555
1995
 
1556
1996
 
@@ -2183,8 +2623,10 @@ cdef extern from "multi_parameter_rank_invariant/hilbert_function.h" namespace "
2183
2623
  signed_measure_type get_hilbert_signed_measure(C_Slicer_GudhiCohomology0_i64&, tensor_dtype* , const vector[indices_type], const vector[indices_type], bool zero_pad,indices_type n_jobs, bool verbose, bool ignore_inf) except + nogil
2184
2624
  signed_measure_type get_hilbert_signed_measure(C_Slicer_GudhiCohomology0_f32&, tensor_dtype* , const vector[indices_type], const vector[indices_type], bool zero_pad,indices_type n_jobs, bool verbose, bool ignore_inf) except + nogil
2185
2625
  signed_measure_type get_hilbert_signed_measure(C_Slicer_GudhiCohomology0_f64&, tensor_dtype* , const vector[indices_type], const vector[indices_type], bool zero_pad,indices_type n_jobs, bool verbose, bool ignore_inf) except + nogil
2186
- cdef inline _compute_hilbert_sm(object slicer, tensor_dtype* container_ptr, vector[indices_type] c_grid_shape, vector[indices_type] degrees, int n_jobs, bool verbose,bool zero_pad, bool ignore_inf):
2626
+ cdef inline _compute_hilbert_sm(slicer, tensor_dtype* container_ptr, vector[indices_type] c_grid_shape, vector[indices_type] degrees, int n_jobs, bool verbose,bool zero_pad, bool ignore_inf):
2187
2627
  import multipers.slicer as mps
2628
+ if len(slicer) == 0:
2629
+ return (np.empty(shape=(0, 1), dtype=slicer.dtype), np.empty(shape=(0), dtype=int))
2188
2630
  cdef intptr_t slicer_ptr = <intptr_t>(slicer.get_ptr())
2189
2631
  cdef signed_measure_type sm
2190
2632
  cdef cnp.ndarray[indices_type, ndim=2] pts
@@ -2192,241 +2634,401 @@ cdef inline _compute_hilbert_sm(object slicer, tensor_dtype* container_ptr, vec
2192
2634
  if isinstance(slicer, mps._KSlicer_Matrix0_vine_i32):
2193
2635
  with nogil:
2194
2636
  sm = get_hilbert_signed_measure(dereference(<C_KSlicer_Matrix0_vine_i32*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2195
- pts = np.asarray(sm.first,dtype=python_indices_type)
2196
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2637
+ if len(sm.first) == 0:
2638
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2639
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2640
+ else:
2641
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2642
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2197
2643
  return (pts,weights)
2198
2644
  if isinstance(slicer, mps._KSlicer_Matrix1_vine_i32):
2199
2645
  with nogil:
2200
2646
  sm = get_hilbert_signed_measure(dereference(<C_KSlicer_Matrix1_vine_i32*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2201
- pts = np.asarray(sm.first,dtype=python_indices_type)
2202
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2647
+ if len(sm.first) == 0:
2648
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2649
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2650
+ else:
2651
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2652
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2203
2653
  return (pts,weights)
2204
2654
  if isinstance(slicer, mps._KSlicer_Matrix0_vine_i64):
2205
2655
  with nogil:
2206
2656
  sm = get_hilbert_signed_measure(dereference(<C_KSlicer_Matrix0_vine_i64*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2207
- pts = np.asarray(sm.first,dtype=python_indices_type)
2208
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2657
+ if len(sm.first) == 0:
2658
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2659
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2660
+ else:
2661
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2662
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2209
2663
  return (pts,weights)
2210
2664
  if isinstance(slicer, mps._KSlicer_Matrix1_vine_i64):
2211
2665
  with nogil:
2212
2666
  sm = get_hilbert_signed_measure(dereference(<C_KSlicer_Matrix1_vine_i64*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2213
- pts = np.asarray(sm.first,dtype=python_indices_type)
2214
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2667
+ if len(sm.first) == 0:
2668
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2669
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2670
+ else:
2671
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2672
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2215
2673
  return (pts,weights)
2216
2674
  if isinstance(slicer, mps._KSlicer_Matrix0_vine_f32):
2217
2675
  with nogil:
2218
2676
  sm = get_hilbert_signed_measure(dereference(<C_KSlicer_Matrix0_vine_f32*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2219
- pts = np.asarray(sm.first,dtype=python_indices_type)
2220
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2677
+ if len(sm.first) == 0:
2678
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2679
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2680
+ else:
2681
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2682
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2221
2683
  return (pts,weights)
2222
2684
  if isinstance(slicer, mps._KSlicer_Matrix1_vine_f32):
2223
2685
  with nogil:
2224
2686
  sm = get_hilbert_signed_measure(dereference(<C_KSlicer_Matrix1_vine_f32*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2225
- pts = np.asarray(sm.first,dtype=python_indices_type)
2226
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2687
+ if len(sm.first) == 0:
2688
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2689
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2690
+ else:
2691
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2692
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2227
2693
  return (pts,weights)
2228
2694
  if isinstance(slicer, mps._KSlicer_Matrix0_vine_f64):
2229
2695
  with nogil:
2230
2696
  sm = get_hilbert_signed_measure(dereference(<C_KSlicer_Matrix0_vine_f64*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2231
- pts = np.asarray(sm.first,dtype=python_indices_type)
2232
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2697
+ if len(sm.first) == 0:
2698
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2699
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2700
+ else:
2701
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2702
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2233
2703
  return (pts,weights)
2234
2704
  if isinstance(slicer, mps._KSlicer_Matrix1_vine_f64):
2235
2705
  with nogil:
2236
2706
  sm = get_hilbert_signed_measure(dereference(<C_KSlicer_Matrix1_vine_f64*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2237
- pts = np.asarray(sm.first,dtype=python_indices_type)
2238
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2707
+ if len(sm.first) == 0:
2708
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2709
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2710
+ else:
2711
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2712
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2239
2713
  return (pts,weights)
2240
2714
  if isinstance(slicer, mps._Slicer_Matrix0_vine_i32):
2241
2715
  with nogil:
2242
2716
  sm = get_hilbert_signed_measure(dereference(<C_Slicer_Matrix0_vine_i32*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2243
- pts = np.asarray(sm.first,dtype=python_indices_type)
2244
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2717
+ if len(sm.first) == 0:
2718
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2719
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2720
+ else:
2721
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2722
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2245
2723
  return (pts,weights)
2246
2724
  if isinstance(slicer, mps._Slicer_Matrix1_vine_i32):
2247
2725
  with nogil:
2248
2726
  sm = get_hilbert_signed_measure(dereference(<C_Slicer_Matrix1_vine_i32*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2249
- pts = np.asarray(sm.first,dtype=python_indices_type)
2250
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2727
+ if len(sm.first) == 0:
2728
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2729
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2730
+ else:
2731
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2732
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2251
2733
  return (pts,weights)
2252
2734
  if isinstance(slicer, mps._Slicer_Matrix0_vine_i64):
2253
2735
  with nogil:
2254
2736
  sm = get_hilbert_signed_measure(dereference(<C_Slicer_Matrix0_vine_i64*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2255
- pts = np.asarray(sm.first,dtype=python_indices_type)
2256
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2737
+ if len(sm.first) == 0:
2738
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2739
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2740
+ else:
2741
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2742
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2257
2743
  return (pts,weights)
2258
2744
  if isinstance(slicer, mps._Slicer_Matrix1_vine_i64):
2259
2745
  with nogil:
2260
2746
  sm = get_hilbert_signed_measure(dereference(<C_Slicer_Matrix1_vine_i64*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2261
- pts = np.asarray(sm.first,dtype=python_indices_type)
2262
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2747
+ if len(sm.first) == 0:
2748
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2749
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2750
+ else:
2751
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2752
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2263
2753
  return (pts,weights)
2264
2754
  if isinstance(slicer, mps._Slicer_Matrix0_vine_f32):
2265
2755
  with nogil:
2266
2756
  sm = get_hilbert_signed_measure(dereference(<C_Slicer_Matrix0_vine_f32*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2267
- pts = np.asarray(sm.first,dtype=python_indices_type)
2268
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2757
+ if len(sm.first) == 0:
2758
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2759
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2760
+ else:
2761
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2762
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2269
2763
  return (pts,weights)
2270
2764
  if isinstance(slicer, mps._Slicer_Matrix1_vine_f32):
2271
2765
  with nogil:
2272
2766
  sm = get_hilbert_signed_measure(dereference(<C_Slicer_Matrix1_vine_f32*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2273
- pts = np.asarray(sm.first,dtype=python_indices_type)
2274
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2767
+ if len(sm.first) == 0:
2768
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2769
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2770
+ else:
2771
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2772
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2275
2773
  return (pts,weights)
2276
2774
  if isinstance(slicer, mps._Slicer_Matrix0_vine_f64):
2277
2775
  with nogil:
2278
2776
  sm = get_hilbert_signed_measure(dereference(<C_Slicer_Matrix0_vine_f64*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2279
- pts = np.asarray(sm.first,dtype=python_indices_type)
2280
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2777
+ if len(sm.first) == 0:
2778
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2779
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2780
+ else:
2781
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2782
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2281
2783
  return (pts,weights)
2282
2784
  if isinstance(slicer, mps._Slicer_Matrix1_vine_f64):
2283
2785
  with nogil:
2284
2786
  sm = get_hilbert_signed_measure(dereference(<C_Slicer_Matrix1_vine_f64*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2285
- pts = np.asarray(sm.first,dtype=python_indices_type)
2286
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2787
+ if len(sm.first) == 0:
2788
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2789
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2790
+ else:
2791
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2792
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2287
2793
  return (pts,weights)
2288
2794
  if isinstance(slicer, mps._KSlicer_Matrix0_i32):
2289
2795
  with nogil:
2290
2796
  sm = get_hilbert_signed_measure(dereference(<C_KSlicer_Matrix0_i32*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2291
- pts = np.asarray(sm.first,dtype=python_indices_type)
2292
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2797
+ if len(sm.first) == 0:
2798
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2799
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2800
+ else:
2801
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2802
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2293
2803
  return (pts,weights)
2294
2804
  if isinstance(slicer, mps._KSlicer_Matrix1_i32):
2295
2805
  with nogil:
2296
2806
  sm = get_hilbert_signed_measure(dereference(<C_KSlicer_Matrix1_i32*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2297
- pts = np.asarray(sm.first,dtype=python_indices_type)
2298
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2807
+ if len(sm.first) == 0:
2808
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2809
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2810
+ else:
2811
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2812
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2299
2813
  return (pts,weights)
2300
2814
  if isinstance(slicer, mps._KSlicer_Matrix0_i64):
2301
2815
  with nogil:
2302
2816
  sm = get_hilbert_signed_measure(dereference(<C_KSlicer_Matrix0_i64*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2303
- pts = np.asarray(sm.first,dtype=python_indices_type)
2304
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2817
+ if len(sm.first) == 0:
2818
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2819
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2820
+ else:
2821
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2822
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2305
2823
  return (pts,weights)
2306
2824
  if isinstance(slicer, mps._KSlicer_Matrix1_i64):
2307
2825
  with nogil:
2308
2826
  sm = get_hilbert_signed_measure(dereference(<C_KSlicer_Matrix1_i64*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2309
- pts = np.asarray(sm.first,dtype=python_indices_type)
2310
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2827
+ if len(sm.first) == 0:
2828
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2829
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2830
+ else:
2831
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2832
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2311
2833
  return (pts,weights)
2312
2834
  if isinstance(slicer, mps._KSlicer_Matrix0_f32):
2313
2835
  with nogil:
2314
2836
  sm = get_hilbert_signed_measure(dereference(<C_KSlicer_Matrix0_f32*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2315
- pts = np.asarray(sm.first,dtype=python_indices_type)
2316
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2837
+ if len(sm.first) == 0:
2838
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2839
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2840
+ else:
2841
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2842
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2317
2843
  return (pts,weights)
2318
2844
  if isinstance(slicer, mps._KSlicer_Matrix1_f32):
2319
2845
  with nogil:
2320
2846
  sm = get_hilbert_signed_measure(dereference(<C_KSlicer_Matrix1_f32*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2321
- pts = np.asarray(sm.first,dtype=python_indices_type)
2322
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2847
+ if len(sm.first) == 0:
2848
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2849
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2850
+ else:
2851
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2852
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2323
2853
  return (pts,weights)
2324
2854
  if isinstance(slicer, mps._KSlicer_Matrix0_f64):
2325
2855
  with nogil:
2326
2856
  sm = get_hilbert_signed_measure(dereference(<C_KSlicer_Matrix0_f64*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2327
- pts = np.asarray(sm.first,dtype=python_indices_type)
2328
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2857
+ if len(sm.first) == 0:
2858
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2859
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2860
+ else:
2861
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2862
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2329
2863
  return (pts,weights)
2330
2864
  if isinstance(slicer, mps._KSlicer_Matrix1_f64):
2331
2865
  with nogil:
2332
2866
  sm = get_hilbert_signed_measure(dereference(<C_KSlicer_Matrix1_f64*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2333
- pts = np.asarray(sm.first,dtype=python_indices_type)
2334
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2867
+ if len(sm.first) == 0:
2868
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2869
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2870
+ else:
2871
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2872
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2335
2873
  return (pts,weights)
2336
2874
  if isinstance(slicer, mps._Slicer_Matrix0_i32):
2337
2875
  with nogil:
2338
2876
  sm = get_hilbert_signed_measure(dereference(<C_Slicer_Matrix0_i32*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2339
- pts = np.asarray(sm.first,dtype=python_indices_type)
2340
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2877
+ if len(sm.first) == 0:
2878
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2879
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2880
+ else:
2881
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2882
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2341
2883
  return (pts,weights)
2342
2884
  if isinstance(slicer, mps._Slicer_Matrix1_i32):
2343
2885
  with nogil:
2344
2886
  sm = get_hilbert_signed_measure(dereference(<C_Slicer_Matrix1_i32*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2345
- pts = np.asarray(sm.first,dtype=python_indices_type)
2346
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2887
+ if len(sm.first) == 0:
2888
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2889
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2890
+ else:
2891
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2892
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2347
2893
  return (pts,weights)
2348
2894
  if isinstance(slicer, mps._Slicer_Matrix0_i64):
2349
2895
  with nogil:
2350
2896
  sm = get_hilbert_signed_measure(dereference(<C_Slicer_Matrix0_i64*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2351
- pts = np.asarray(sm.first,dtype=python_indices_type)
2352
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2897
+ if len(sm.first) == 0:
2898
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2899
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2900
+ else:
2901
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2902
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2353
2903
  return (pts,weights)
2354
2904
  if isinstance(slicer, mps._Slicer_Matrix1_i64):
2355
2905
  with nogil:
2356
2906
  sm = get_hilbert_signed_measure(dereference(<C_Slicer_Matrix1_i64*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2357
- pts = np.asarray(sm.first,dtype=python_indices_type)
2358
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2907
+ if len(sm.first) == 0:
2908
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2909
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2910
+ else:
2911
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2912
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2359
2913
  return (pts,weights)
2360
2914
  if isinstance(slicer, mps._Slicer_Matrix0_f32):
2361
2915
  with nogil:
2362
2916
  sm = get_hilbert_signed_measure(dereference(<C_Slicer_Matrix0_f32*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2363
- pts = np.asarray(sm.first,dtype=python_indices_type)
2364
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2917
+ if len(sm.first) == 0:
2918
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2919
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2920
+ else:
2921
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2922
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2365
2923
  return (pts,weights)
2366
2924
  if isinstance(slicer, mps._Slicer_Matrix1_f32):
2367
2925
  with nogil:
2368
2926
  sm = get_hilbert_signed_measure(dereference(<C_Slicer_Matrix1_f32*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2369
- pts = np.asarray(sm.first,dtype=python_indices_type)
2370
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2927
+ if len(sm.first) == 0:
2928
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2929
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2930
+ else:
2931
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2932
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2371
2933
  return (pts,weights)
2372
2934
  if isinstance(slicer, mps._Slicer_Matrix0_f64):
2373
2935
  with nogil:
2374
2936
  sm = get_hilbert_signed_measure(dereference(<C_Slicer_Matrix0_f64*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2375
- pts = np.asarray(sm.first,dtype=python_indices_type)
2376
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2937
+ if len(sm.first) == 0:
2938
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2939
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2940
+ else:
2941
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2942
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2377
2943
  return (pts,weights)
2378
2944
  if isinstance(slicer, mps._Slicer_Matrix1_f64):
2379
2945
  with nogil:
2380
2946
  sm = get_hilbert_signed_measure(dereference(<C_Slicer_Matrix1_f64*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2381
- pts = np.asarray(sm.first,dtype=python_indices_type)
2382
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2947
+ if len(sm.first) == 0:
2948
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2949
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2950
+ else:
2951
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2952
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2383
2953
  return (pts,weights)
2384
2954
  if isinstance(slicer, mps._KSlicer_GudhiCohomology0_i32):
2385
2955
  with nogil:
2386
2956
  sm = get_hilbert_signed_measure(dereference(<C_KSlicer_GudhiCohomology0_i32*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2387
- pts = np.asarray(sm.first,dtype=python_indices_type)
2388
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2957
+ if len(sm.first) == 0:
2958
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2959
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2960
+ else:
2961
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2962
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2389
2963
  return (pts,weights)
2390
2964
  if isinstance(slicer, mps._KSlicer_GudhiCohomology0_i64):
2391
2965
  with nogil:
2392
2966
  sm = get_hilbert_signed_measure(dereference(<C_KSlicer_GudhiCohomology0_i64*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2393
- pts = np.asarray(sm.first,dtype=python_indices_type)
2394
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2967
+ if len(sm.first) == 0:
2968
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2969
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2970
+ else:
2971
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2972
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2395
2973
  return (pts,weights)
2396
2974
  if isinstance(slicer, mps._KSlicer_GudhiCohomology0_f32):
2397
2975
  with nogil:
2398
2976
  sm = get_hilbert_signed_measure(dereference(<C_KSlicer_GudhiCohomology0_f32*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2399
- pts = np.asarray(sm.first,dtype=python_indices_type)
2400
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2977
+ if len(sm.first) == 0:
2978
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2979
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2980
+ else:
2981
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2982
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2401
2983
  return (pts,weights)
2402
2984
  if isinstance(slicer, mps._KSlicer_GudhiCohomology0_f64):
2403
2985
  with nogil:
2404
2986
  sm = get_hilbert_signed_measure(dereference(<C_KSlicer_GudhiCohomology0_f64*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2405
- pts = np.asarray(sm.first,dtype=python_indices_type)
2406
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2987
+ if len(sm.first) == 0:
2988
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2989
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
2990
+ else:
2991
+ pts = np.asarray(sm.first,dtype=python_indices_type)
2992
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2407
2993
  return (pts,weights)
2408
2994
  if isinstance(slicer, mps._Slicer_GudhiCohomology0_i32):
2409
2995
  with nogil:
2410
2996
  sm = get_hilbert_signed_measure(dereference(<C_Slicer_GudhiCohomology0_i32*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2411
- pts = np.asarray(sm.first,dtype=python_indices_type)
2412
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2997
+ if len(sm.first) == 0:
2998
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
2999
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
3000
+ else:
3001
+ pts = np.asarray(sm.first,dtype=python_indices_type)
3002
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2413
3003
  return (pts,weights)
2414
3004
  if isinstance(slicer, mps._Slicer_GudhiCohomology0_i64):
2415
3005
  with nogil:
2416
3006
  sm = get_hilbert_signed_measure(dereference(<C_Slicer_GudhiCohomology0_i64*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2417
- pts = np.asarray(sm.first,dtype=python_indices_type)
2418
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
3007
+ if len(sm.first) == 0:
3008
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
3009
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
3010
+ else:
3011
+ pts = np.asarray(sm.first,dtype=python_indices_type)
3012
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2419
3013
  return (pts,weights)
2420
3014
  if isinstance(slicer, mps._Slicer_GudhiCohomology0_f32):
2421
3015
  with nogil:
2422
3016
  sm = get_hilbert_signed_measure(dereference(<C_Slicer_GudhiCohomology0_f32*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2423
- pts = np.asarray(sm.first,dtype=python_indices_type)
2424
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
3017
+ if len(sm.first) == 0:
3018
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
3019
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
3020
+ else:
3021
+ pts = np.asarray(sm.first,dtype=python_indices_type)
3022
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2425
3023
  return (pts,weights)
2426
3024
  if isinstance(slicer, mps._Slicer_GudhiCohomology0_f64):
2427
3025
  with nogil:
2428
3026
  sm = get_hilbert_signed_measure(dereference(<C_Slicer_GudhiCohomology0_f64*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
2429
- pts = np.asarray(sm.first,dtype=python_indices_type)
2430
- weights = np.asarray(sm.second,dtype=python_tensor_dtype)
3027
+ if len(sm.first) == 0:
3028
+ pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
3029
+ weights = np.empty(shape=(0), dtype=python_tensor_dtype)
3030
+ else:
3031
+ pts = np.asarray(sm.first,dtype=python_indices_type)
3032
+ weights = np.asarray(sm.second,dtype=python_tensor_dtype)
2431
3033
  return (pts,weights)
2432
3034
  raise ValueError(f"Unsupported slicer type {type(slicer)}")