multipers 2.3.1__cp312-cp312-win_amd64.whl → 2.3.2b1__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.
- multipers/_signed_measure_meta.py +71 -65
- multipers/array_api/__init__.py +39 -0
- multipers/array_api/numpy.py +34 -0
- multipers/array_api/torch.py +35 -0
- multipers/distances.py +6 -2
- multipers/filtrations/density.py +23 -12
- multipers/filtrations/filtrations.py +74 -15
- multipers/function_rips.cp312-win_amd64.pyd +0 -0
- multipers/grids.cp312-win_amd64.pyd +0 -0
- multipers/grids.pyx +144 -61
- multipers/gudhi/Simplex_tree_multi_interface.h +35 -0
- multipers/gudhi/gudhi/Multi_persistence/Box.h +3 -0
- multipers/gudhi/gudhi/One_critical_filtration.h +17 -9
- multipers/gudhi/mma_interface_matrix.h +5 -3
- multipers/gudhi/truc.h +488 -42
- multipers/io.cp312-win_amd64.pyd +0 -0
- multipers/io.pyx +16 -86
- multipers/ml/mma.py +3 -3
- multipers/ml/signed_measures.py +60 -62
- multipers/mma_structures.cp312-win_amd64.pyd +0 -0
- multipers/mma_structures.pxd +2 -1
- multipers/mma_structures.pyx +56 -12
- multipers/mma_structures.pyx.tp +14 -3
- multipers/multiparameter_module_approximation/approximation.h +45 -13
- multipers/multiparameter_module_approximation.cp312-win_amd64.pyd +0 -0
- multipers/multiparameter_module_approximation.pyx +22 -6
- multipers/plots.py +1 -0
- multipers/point_measure.cp312-win_amd64.pyd +0 -0
- multipers/point_measure.pyx +6 -2
- multipers/simplex_tree_multi.cp312-win_amd64.pyd +0 -0
- multipers/simplex_tree_multi.pxd +1 -0
- multipers/simplex_tree_multi.pyx +487 -109
- multipers/simplex_tree_multi.pyx.tp +67 -18
- multipers/slicer.cp312-win_amd64.pyd +0 -0
- multipers/slicer.pxd +719 -237
- multipers/slicer.pxd.tp +22 -6
- multipers/slicer.pyx +5312 -1365
- multipers/slicer.pyx.tp +199 -46
- multipers/tbb12.dll +0 -0
- multipers/tbbbind_2_5.dll +0 -0
- multipers/tbbmalloc.dll +0 -0
- multipers/tbbmalloc_proxy.dll +0 -0
- multipers/tests/__init__.py +9 -4
- multipers/torch/diff_grids.py +30 -7
- {multipers-2.3.1.dist-info → multipers-2.3.2b1.dist-info}/METADATA +4 -25
- {multipers-2.3.1.dist-info → multipers-2.3.2b1.dist-info}/RECORD +49 -46
- {multipers-2.3.1.dist-info → multipers-2.3.2b1.dist-info}/WHEEL +1 -1
- {multipers-2.3.1.dist-info → multipers-2.3.2b1.dist-info/licenses}/LICENSE +0 -0
- {multipers-2.3.1.dist-info → multipers-2.3.2b1.dist-info}/top_level.txt +0 -0
multipers/slicer.pxd.tp
CHANGED
|
@@ -59,9 +59,13 @@ cdef extern from "Persistence_slices_interface.h":
|
|
|
59
59
|
|
|
60
60
|
{{D['C_TEMPLATE_TYPE']}}& operator=(const {{D['C_TEMPLATE_TYPE']}}&)
|
|
61
61
|
|
|
62
|
-
{{D['C_TEMPLATE_TYPE']}} colexical_rearange() except + nogil
|
|
62
|
+
pair[{{D['C_TEMPLATE_TYPE']}}, vector[unsigned int]] colexical_rearange() except + nogil
|
|
63
|
+
{{D['C_TEMPLATE_TYPE']}} permute(const vector[unsigned int]&) except + nogil
|
|
63
64
|
|
|
64
65
|
vector[vector[pair[{{D['C_VALUE_TYPE']}}, {{D['C_VALUE_TYPE']}}]]] get_barcode() nogil
|
|
66
|
+
vector[vector[pair[int,int]]] get_barcode_idx() nogil
|
|
67
|
+
vector[vector[vector[pair[int,int]]]] custom_persistences({{D['C_VALUE_TYPE']}}*, int size, bool ignore_inf) except + nogil
|
|
68
|
+
|
|
65
69
|
void push_to(const Line[{{D['C_VALUE_TYPE']}}]&) nogil
|
|
66
70
|
void set_one_filtration(const vector[{{D['C_VALUE_TYPE']}}]&) nogil
|
|
67
71
|
int prune_above_dimension(int) except + nogil
|
|
@@ -76,6 +80,7 @@ cdef extern from "Persistence_slices_interface.h":
|
|
|
76
80
|
pair[One_critical_filtration[{{D['C_VALUE_TYPE']}}], One_critical_filtration[{{D['C_VALUE_TYPE']}}]] get_bounding_box() except + nogil
|
|
77
81
|
vector[One_critical_filtration[{{D['C_VALUE_TYPE']}}]] get_filtration_values() nogil
|
|
78
82
|
vector[int] get_dimensions() nogil
|
|
83
|
+
int get_dimension(int i) nogil
|
|
79
84
|
vector[vector[uint]] get_boundaries() nogil
|
|
80
85
|
void coarsen_on_grid_inplace(vector[vector[{{D['C_VALUE_TYPE']}}]], bool) nogil
|
|
81
86
|
vector[{{D['FILTRATION_TYPE']}}]& get_filtrations() nogil
|
|
@@ -98,8 +103,13 @@ cdef extern from "Persistence_slices_interface.h":
|
|
|
98
103
|
{{endif}}
|
|
99
104
|
|
|
100
105
|
|
|
101
|
-
vector[vector[vector[pair[{{D['C_VALUE_TYPE']}}, {{D['C_VALUE_TYPE']}}]]]] persistence_on_lines(vector[vector[{{D['C_VALUE_TYPE']}}]], bool) nogil
|
|
102
|
-
vector[vector[vector[pair[{{D['C_VALUE_TYPE']}}, {{D['C_VALUE_TYPE']}}]]]] persistence_on_lines(vector[pair[vector[{{D['C_VALUE_TYPE']}}],vector[{{D['C_VALUE_TYPE']}}]]],bool) nogil
|
|
106
|
+
vector[vector[vector[pair[{{D['C_VALUE_TYPE']}}, {{D['C_VALUE_TYPE']}}]]]] persistence_on_lines(vector[vector[{{D['C_VALUE_TYPE']}}]], bool) except + nogil
|
|
107
|
+
vector[vector[vector[pair[{{D['C_VALUE_TYPE']}}, {{D['C_VALUE_TYPE']}}]]]] persistence_on_lines(vector[pair[vector[{{D['C_VALUE_TYPE']}}],vector[{{D['C_VALUE_TYPE']}}]]],bool) except + nogil
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
{{if D['COLUMN_TYPE'] is not None}}
|
|
111
|
+
{{D['C_TEMPLATE_TYPE']}} projective_cover_kernel(int dim) except + nogil
|
|
112
|
+
{{endif}}
|
|
103
113
|
{{endfor}}
|
|
104
114
|
|
|
105
115
|
|
|
@@ -201,8 +211,10 @@ cdef extern from "multi_parameter_rank_invariant/hilbert_function.h" namespace "
|
|
|
201
211
|
{{for D in slicers}}
|
|
202
212
|
signed_measure_type get_hilbert_signed_measure({{D['C_TEMPLATE_TYPE']}}&, tensor_dtype* , const vector[indices_type], const vector[indices_type], bool zero_pad,indices_type n_jobs, bool verbose, bool ignore_inf) except + nogil
|
|
203
213
|
{{endfor}}
|
|
204
|
-
cdef inline _compute_hilbert_sm(
|
|
214
|
+
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):
|
|
205
215
|
import multipers.slicer as mps
|
|
216
|
+
if len(slicer) == 0:
|
|
217
|
+
return (np.empty(shape=(0, 1), dtype=slicer.dtype), np.empty(shape=(0), dtype=int))
|
|
206
218
|
cdef intptr_t slicer_ptr = <intptr_t>(slicer.get_ptr())
|
|
207
219
|
cdef signed_measure_type sm
|
|
208
220
|
cdef cnp.ndarray[indices_type, ndim=2] pts
|
|
@@ -211,8 +223,12 @@ cdef inline _compute_hilbert_sm(object slicer, tensor_dtype* container_ptr, vec
|
|
|
211
223
|
if isinstance(slicer, mps.{{D['PYTHON_TYPE']}}):
|
|
212
224
|
with nogil:
|
|
213
225
|
sm = get_hilbert_signed_measure(dereference(<{{D['C_TEMPLATE_TYPE']}}*>(slicer_ptr)),container_ptr, c_grid_shape,degrees, zero_pad, n_jobs, verbose, ignore_inf)
|
|
214
|
-
|
|
215
|
-
|
|
226
|
+
if len(sm.first) == 0:
|
|
227
|
+
pts = np.empty(shape=(0, slicer.num_parameters), dtype=python_indices_type)
|
|
228
|
+
weights = np.empty(shape=(0), dtype=python_tensor_dtype)
|
|
229
|
+
else:
|
|
230
|
+
pts = np.asarray(sm.first,dtype=python_indices_type)
|
|
231
|
+
weights = np.asarray(sm.second,dtype=python_tensor_dtype)
|
|
216
232
|
return (pts,weights)
|
|
217
233
|
{{endfor}}
|
|
218
234
|
raise ValueError(f"Unsupported slicer type {type(slicer)}")
|