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.
- 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/{ml/convolutions.py → filtrations/density.py} +67 -13
- multipers/filtrations/filtrations.py +76 -17
- 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 +36 -1
- multipers/gudhi/gudhi/Multi_persistence/Box.h +3 -0
- multipers/gudhi/gudhi/One_critical_filtration.h +18 -9
- multipers/gudhi/mma_interface_h0.h +1 -1
- multipers/gudhi/mma_interface_matrix.h +10 -1
- multipers/gudhi/naive_merge_tree.h +1 -1
- multipers/gudhi/truc.h +555 -42
- multipers/io.cp312-win_amd64.pyd +0 -0
- multipers/io.pyx +26 -93
- multipers/ml/mma.py +4 -4
- multipers/ml/point_clouds.py +2 -2
- multipers/ml/signed_measures.py +63 -65
- multipers/mma_structures.cp312-win_amd64.pyd +0 -0
- multipers/mma_structures.pxd +2 -1
- multipers/mma_structures.pyx +56 -16
- multipers/mma_structures.pyx.tp +14 -5
- multipers/multiparameter_module_approximation/approximation.h +48 -14
- multipers/multiparameter_module_approximation.cp312-win_amd64.pyd +0 -0
- multipers/multiparameter_module_approximation.pyx +27 -8
- multipers/plots.py +2 -1
- 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 +632 -146
- multipers/simplex_tree_multi.pyx.tp +92 -24
- multipers/slicer.cp312-win_amd64.pyd +0 -0
- multipers/slicer.pxd +779 -177
- multipers/slicer.pxd.tp +24 -5
- multipers/slicer.pyx +5657 -1427
- multipers/slicer.pyx.tp +211 -48
- multipers/tbb12.dll +0 -0
- multipers/tbbbind_2_5.dll +0 -0
- multipers/tbbmalloc.dll +0 -0
- multipers/tbbmalloc_proxy.dll +0 -0
- multipers/tensor/tensor.h +1 -1
- multipers/tests/__init__.py +9 -4
- multipers/torch/diff_grids.py +30 -7
- multipers/torch/rips_density.py +1 -1
- {multipers-2.3.0.dist-info → multipers-2.3.2.dist-info}/METADATA +4 -25
- {multipers-2.3.0.dist-info → multipers-2.3.2.dist-info}/RECORD +54 -51
- {multipers-2.3.0.dist-info → multipers-2.3.2.dist-info}/WHEEL +1 -1
- {multipers-2.3.0.dist-info → multipers-2.3.2.dist-info/licenses}/LICENSE +0 -0
- {multipers-2.3.0.dist-info → multipers-2.3.2.dist-info}/top_level.txt +0 -0
multipers/slicer.pxd.tp
CHANGED
|
@@ -58,7 +58,14 @@ cdef extern from "Persistence_slices_interface.h":
|
|
|
58
58
|
{{endif}}
|
|
59
59
|
|
|
60
60
|
{{D['C_TEMPLATE_TYPE']}}& operator=(const {{D['C_TEMPLATE_TYPE']}}&)
|
|
61
|
+
|
|
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
|
|
64
|
+
|
|
61
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
|
+
|
|
62
69
|
void push_to(const Line[{{D['C_VALUE_TYPE']}}]&) nogil
|
|
63
70
|
void set_one_filtration(const vector[{{D['C_VALUE_TYPE']}}]&) nogil
|
|
64
71
|
int prune_above_dimension(int) except + nogil
|
|
@@ -73,6 +80,7 @@ cdef extern from "Persistence_slices_interface.h":
|
|
|
73
80
|
pair[One_critical_filtration[{{D['C_VALUE_TYPE']}}], One_critical_filtration[{{D['C_VALUE_TYPE']}}]] get_bounding_box() except + nogil
|
|
74
81
|
vector[One_critical_filtration[{{D['C_VALUE_TYPE']}}]] get_filtration_values() nogil
|
|
75
82
|
vector[int] get_dimensions() nogil
|
|
83
|
+
int get_dimension(int i) nogil
|
|
76
84
|
vector[vector[uint]] get_boundaries() nogil
|
|
77
85
|
void coarsen_on_grid_inplace(vector[vector[{{D['C_VALUE_TYPE']}}]], bool) nogil
|
|
78
86
|
vector[{{D['FILTRATION_TYPE']}}]& get_filtrations() nogil
|
|
@@ -95,8 +103,13 @@ cdef extern from "Persistence_slices_interface.h":
|
|
|
95
103
|
{{endif}}
|
|
96
104
|
|
|
97
105
|
|
|
98
|
-
vector[vector[vector[pair[{{D['C_VALUE_TYPE']}}, {{D['C_VALUE_TYPE']}}]]]] persistence_on_lines(vector[vector[{{D['C_VALUE_TYPE']}}]]) nogil
|
|
99
|
-
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']}}]]]) 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}}
|
|
100
113
|
{{endfor}}
|
|
101
114
|
|
|
102
115
|
|
|
@@ -198,8 +211,10 @@ cdef extern from "multi_parameter_rank_invariant/hilbert_function.h" namespace "
|
|
|
198
211
|
{{for D in slicers}}
|
|
199
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
|
|
200
213
|
{{endfor}}
|
|
201
|
-
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):
|
|
202
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))
|
|
203
218
|
cdef intptr_t slicer_ptr = <intptr_t>(slicer.get_ptr())
|
|
204
219
|
cdef signed_measure_type sm
|
|
205
220
|
cdef cnp.ndarray[indices_type, ndim=2] pts
|
|
@@ -208,8 +223,12 @@ cdef inline _compute_hilbert_sm(object slicer, tensor_dtype* container_ptr, vec
|
|
|
208
223
|
if isinstance(slicer, mps.{{D['PYTHON_TYPE']}}):
|
|
209
224
|
with nogil:
|
|
210
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)
|
|
211
|
-
|
|
212
|
-
|
|
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)
|
|
213
232
|
return (pts,weights)
|
|
214
233
|
{{endfor}}
|
|
215
234
|
raise ValueError(f"Unsupported slicer type {type(slicer)}")
|