multipers 2.3.5b4__tar.gz → 2.4.0__tar.gz
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.
- {multipers-2.3.5b4 → multipers-2.4.0}/PKG-INFO +6 -5
- {multipers-2.3.5b4 → multipers-2.4.0}/README.md +2 -3
- {multipers-2.3.5b4 → multipers-2.4.0}/_tempita_grid_gen.py +4 -4
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/__init__.py +9 -1
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/_slicer_meta.py +26 -31
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/filtration_conversions.pxd +294 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/filtrations/__init__.py +2 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/filtrations/filtrations.py +119 -3
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/filtrations.pxd +240 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/function_rips.pyx +16 -19
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/Simplex_tree_multi_interface.h +12 -6
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Debug_utils.h +8 -1
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Degree_rips_bifiltration.h +21 -1
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Dynamic_multi_parameter_filtration.h +7 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Multi_filtration/Multi_parameter_generator.h +10 -3
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Multi_parameter_filtration.h +17 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Simplex_tree.h +2 -2
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Slicer.h +0 -1
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/slicer_helpers.h +3 -2
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/io.pyx +68 -10
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/mma_structures.pyx +1485 -80
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/mma_structures.pyx.tp +2 -2
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/multi_parameter_rank_invariant/function_rips.h +12 -21
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/multi_parameter_rank_invariant/hilbert_function.h +148 -188
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/multi_parameter_rank_invariant/persistence_slices.h +45 -49
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/multiparameter_module_approximation/approximation.h +13 -1
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/multiparameter_module_approximation.pyx +59 -27
- multipers-2.4.0/multipers/ops.pyx +232 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/plots.py +149 -90
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/point_measure.pyx +2 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/simplex_tree_multi.pxd +1 -1
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/simplex_tree_multi.pyx +11836 -448
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/simplex_tree_multi.pyx.tp +3 -1
- multipers-2.4.0/multipers/slicer.pxd +15757 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/slicer.pxd.tp +2 -2
- multipers-2.4.0/multipers/slicer.pyx +102422 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/slicer.pyx.tp +5 -57
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers.egg-info/PKG-INFO +6 -5
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers.egg-info/SOURCES.txt +1 -1
- {multipers-2.3.5b4 → multipers-2.4.0}/pyproject.toml +4 -2
- {multipers-2.3.5b4 → multipers-2.4.0}/setup.py +6 -4
- {multipers-2.3.5b4 → multipers-2.4.0}/tests/test_aida.py +4 -4
- {multipers-2.3.5b4 → multipers-2.4.0}/tests/test_slicer.py +5 -0
- multipers-2.3.5b4/multipers/slicer.pxd +0 -2097
- multipers-2.3.5b4/multipers/slicer.pyx +0 -13095
- multipers-2.3.5b4/multipers/vector_interface.pyx +0 -92
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/aida.cpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/birth_death.cpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/brute_force_mpm_decomposition.cpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/generate_decompositions.cpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/include/aida_interface.hpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/include/config.hpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/include/option_parser.hpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/include/types.hpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/making_examples.cpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/minimize_pres.cpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/mpfree_clone.cpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/presentation_to_quiver.cpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/presentation_to_quiver_new.cpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/resolution.cpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/src/aida_decompose.cpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/src/aida_decompose.hpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/src/aida_functions.cpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/src/aida_functions.hpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/src/aida_helpers.cpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/src/aida_helpers.hpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/src/aida_interface.cpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/src/block.cpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/src/block.hpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/src/config.cpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/src/option_parser.cpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/AIDA/vectorspace_decompositions.cpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/LICENSE +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/MANIFEST.in +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/Persistence-Algebra/include/grlina/bitset_algebra.hpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/Persistence-Algebra/include/grlina/column_types.hpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/Persistence-Algebra/include/grlina/dense_matrix.hpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/Persistence-Algebra/include/grlina/draw_hf.hpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/Persistence-Algebra/include/grlina/general.hpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/Persistence-Algebra/include/grlina/graded_linalg.hpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/Persistence-Algebra/include/grlina/graded_matrix.hpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/Persistence-Algebra/include/grlina/grid_scheduler.hpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/Persistence-Algebra/include/grlina/homomorphisms.hpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/Persistence-Algebra/include/grlina/matrix_base.hpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/Persistence-Algebra/include/grlina/modules.hpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/Persistence-Algebra/include/grlina/orders_and_graphs.hpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/Persistence-Algebra/include/grlina/r2graded_matrix.hpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/Persistence-Algebra/include/grlina/r3graded_matrix.hpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/Persistence-Algebra/include/grlina/sparse_matrix.hpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/Persistence-Algebra/include/grlina/to_quiver.hpp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/_signed_measure_meta.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/array_api/__init__.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/array_api/numpy.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/array_api/torch.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/data/MOL2.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/data/UCR.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/data/__init__.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/data/graphs.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/data/immuno_regions.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/data/minimal_presentation_to_st_bf.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/data/pytorch2simplextree.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/data/shape3d.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/data/synthetic.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/distances.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/filtration_conversions.pxd.tp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/filtrations/density.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/filtrations.pxd.tp +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/grids.pyx +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/Persistence_slices_interface.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/Simplex_tree_interface.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Bitmap_cubical_complex.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Bitmap_cubical_complex_base.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Bitmap_cubical_complex_periodic_boundary_conditions_base.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Fields/Multi_field.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Fields/Multi_field_operators.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Fields/Multi_field_shared.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Fields/Multi_field_small.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Fields/Multi_field_small_operators.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Fields/Multi_field_small_shared.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Fields/Z2_field.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Fields/Z2_field_operators.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Fields/Zp_field.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Fields/Zp_field_operators.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Fields/Zp_field_shared.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Flag_complex_edge_collapser.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Matrix.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Multi_filtration/multi_filtration_conversions.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Multi_filtration/multi_filtration_utils.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Multi_parameter_filtered_complex.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Multi_persistence/Box.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Multi_persistence/Line.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Multi_persistence/Multi_parameter_filtered_complex_pcoh_interface.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Multi_persistence/Persistence_interface_cohomology.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Multi_persistence/Persistence_interface_matrix.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Multi_persistence/Point.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Off_reader.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/Base_matrix.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/Base_matrix_with_column_compression.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/Boundary_matrix.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/Chain_matrix.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/Id_to_index_overlay.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/Position_to_index_overlay.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/RU_matrix.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/allocators/entry_constructors.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/base_pairing.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/base_swap.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/chain_pairing.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/chain_rep_cycles.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/chain_vine_swap.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/columns/chain_column_extra_properties.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/columns/column_dimension_holder.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/columns/column_utilities.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/columns/entry_types.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/columns/heap_column.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/columns/intrusive_list_column.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/columns/intrusive_set_column.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/columns/list_column.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/columns/naive_vector_column.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/columns/row_access.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/columns/set_column.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/columns/unordered_set_column.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/columns/vector_column.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/index_mapper.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/matrix_dimension_holders.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/matrix_row_access.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/ru_pairing.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/ru_rep_cycles.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_matrix/ru_vine_swap.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_on_a_line.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistence_on_rectangle.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistent_cohomology/Field_Zp.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistent_cohomology/Multi_field.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistent_cohomology/Persistent_cohomology_column.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Persistent_cohomology.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Points_off_io.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Projective_cover_kernel.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Simple_object_pool.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Simplex_tree/Simplex_tree_iterators.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Simplex_tree/Simplex_tree_node_explicit_storage.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Simplex_tree/Simplex_tree_siblings.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Simplex_tree/Simplex_tree_star_simplex_iterators.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Simplex_tree/filtration_value_utils.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Simplex_tree/hooks_simplex_base.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Simplex_tree/indexing_tag.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Simplex_tree/serialization_utils.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Simplex_tree/simplex_tree_options.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/Thread_safe_slicer.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/distance_functions.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/graph_simplicial_complex.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/multi_simplex_tree_helpers.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/persistence_interval.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/persistence_matrix_options.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/reader_utils.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/gudhi/simple_mdspan.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/tmp_h0_pers/mma_interface_h0.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/gudhi/tmp_h0_pers/naive_merge_tree.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/ml/__init__.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/ml/accuracies.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/ml/invariants_with_persistable.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/ml/kernels.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/ml/mma.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/ml/one.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/ml/point_clouds.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/ml/signed_measures.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/ml/sliced_wasserstein.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/ml/tools.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/mma_structures.pxd +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/multi_parameter_rank_invariant/diff_helpers.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/multi_parameter_rank_invariant/euler_characteristic.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/multi_parameter_rank_invariant/rank_invariant.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/multiparameter_edge_collapse.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/multiparameter_module_approximation/debug.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/multiparameter_module_approximation/format_python-cpp.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/multiparameter_module_approximation/utilities.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/pickle.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/tensor/tensor.h +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/tensor.pxd +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/test.pyx +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/tests/__init__.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/torch/__init__.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/torch/diff_grids.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/torch/rips_density.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers/vector_interface.pxd +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers.egg-info/dependency_links.txt +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers.egg-info/requires.txt +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/multipers.egg-info/top_level.txt +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/setup.cfg +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/tests/test_diff_helper.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/tests/test_filtrations.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/tests/test_grids.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/tests/test_hilbert_function.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/tests/test_mma.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/tests/test_parallel.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/tests/test_point_clouds.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/tests/test_python-cpp_conversion.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/tests/test_signed_betti.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/tests/test_signed_measure.py +0 -0
- {multipers-2.3.5b4 → multipers-2.4.0}/tests/test_simplextreemulti.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: multipers
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.4.0
|
|
4
4
|
Summary: Multiparameter Topological Persistence for Machine Learning
|
|
5
5
|
Author-email: David Loiseaux <david.lapous@proton.me>, Hannah Schreiber <hannah.schreiber@inria.fr>
|
|
6
6
|
Maintainer-email: David Loiseaux <david.lapous@proton.me>
|
|
@@ -9,11 +9,13 @@ Project-URL: source, https://github.com/DavidLapous/multipers
|
|
|
9
9
|
Project-URL: download, https://pypi.org/project/multipers/#files
|
|
10
10
|
Project-URL: tracker, https://github.com/DavidLapous/multipers/issues
|
|
11
11
|
Project-URL: release notes, https://github.com/DavidLapous/multipers/releases
|
|
12
|
-
Keywords: TDA,Persistence,Multiparameter,sklearn
|
|
12
|
+
Keywords: TDA,Persistence,Multiparameter,sklearn,autodiff
|
|
13
13
|
Classifier: Development Status :: 5 - Production/Stable
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
19
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
18
20
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
19
21
|
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
@@ -84,9 +86,9 @@ This library features a bunch of different functions and helpers. See below for
|
|
|
84
86
|
- [x] [[Differentiability and Optimization of Multiparameter Persistent Homology, ICML2024]](https://proceedings.mlr.press/v235/scoccola24a.html) An approach to compute a (clarke) gradient for any reasonable multiparameter persistent invariant. Currently, any `multipers` computation is auto-differentiable using this strategy, provided that the input are pytorch gradient capable tensor.
|
|
85
87
|
- [x] [[Multiparameter Persistence Landscapes, JMLR]](https://jmlr.org/papers/v21/19-054.html) A vectorization technic for multiparameter persistence modules.
|
|
86
88
|
- [x] [[Filtration-Domination in Bifiltered Graphs, ALENEX2023]](https://doi.org/10.1137/1.9781611977561.ch3) Allows for 2-parameter edge collapses for 1-critical clique complexes. Very useful to speed up, e.g., Rips-Codensity bifiltrations.
|
|
87
|
-
- [x] [[Chunk Reduction for Multi-Parameter Persistent Homology,
|
|
89
|
+
- [x] [[Chunk Reduction for Multi-Parameter Persistent Homology, SoCG2019]](https://doi.org/10.4230/LIPIcs.SoCG.2019.37) Multi-filtration preprocessing algorithm for homology computations.
|
|
88
90
|
- [x] [[Computing Minimal Presentations and Bigraded Betti Numbers of 2-Parameter Persistent Homology, JAAG]](https://doi.org/10.1137/20M1388425) Minimal presentation of multiparameter persistence modules, using [mpfree](https://bitbucket.org/mkerber/mpfree/src/master/). Hilbert, Rank Decomposition Signed Measures, and MMA decompositions can be computed using the mpfree backend.
|
|
89
|
-
- [ ] [WIP] [[Decomposing Multiparameter Persistence Modules]](https://doi.org/10.4230/LIPIcs.SoCG.2025.41) Using the [AIDA](https://github.com/JanJend/AIDA) and [Persistence-Algebra](https://github.com/JanJend/Persistence-Algebra/) libraries.
|
|
91
|
+
- [ ] [WIP] [[Decomposing Multiparameter Persistence Modules, SoCG2025]](https://doi.org/10.4230/LIPIcs.SoCG.2025.41) Using the [AIDA](https://github.com/JanJend/AIDA) and [Persistence-Algebra](https://github.com/JanJend/Persistence-Algebra/) libraries.
|
|
90
92
|
- [x] [[Delaunay Bifiltrations of Functions on Point Clouds, SODA2024]](https://epubs.siam.org/doi/10.1137/1.9781611977912.173) Provides an alternative to function rips bifiltrations, using Delaunay complexes. Very good alternative to Rips-Density like bifiltrations.
|
|
91
93
|
- [x] [[Delaunay Core Bifiltration]](https://arxiv.org/abs/2405.01214) Bifiltration for point clouds, taking into account the density. Similar to Rips-Density.
|
|
92
94
|
- [x] [[Rivet]](https://github.com/rivetTDA/rivet) Interactive two parameter persistence
|
|
@@ -127,4 +129,3 @@ you can use the following journal bibtex entry
|
|
|
127
129
|
## Contributions
|
|
128
130
|
Feel free to contribute, report a bug on a pipeline, or ask for documentation by opening an issue.<br>
|
|
129
131
|
In particular, if you have a nice example or application that is not taken care in the documentation (see the `./docs/notebooks/` folder), please contact me to add it there.
|
|
130
|
-
|
|
@@ -48,9 +48,9 @@ This library features a bunch of different functions and helpers. See below for
|
|
|
48
48
|
- [x] [[Differentiability and Optimization of Multiparameter Persistent Homology, ICML2024]](https://proceedings.mlr.press/v235/scoccola24a.html) An approach to compute a (clarke) gradient for any reasonable multiparameter persistent invariant. Currently, any `multipers` computation is auto-differentiable using this strategy, provided that the input are pytorch gradient capable tensor.
|
|
49
49
|
- [x] [[Multiparameter Persistence Landscapes, JMLR]](https://jmlr.org/papers/v21/19-054.html) A vectorization technic for multiparameter persistence modules.
|
|
50
50
|
- [x] [[Filtration-Domination in Bifiltered Graphs, ALENEX2023]](https://doi.org/10.1137/1.9781611977561.ch3) Allows for 2-parameter edge collapses for 1-critical clique complexes. Very useful to speed up, e.g., Rips-Codensity bifiltrations.
|
|
51
|
-
- [x] [[Chunk Reduction for Multi-Parameter Persistent Homology,
|
|
51
|
+
- [x] [[Chunk Reduction for Multi-Parameter Persistent Homology, SoCG2019]](https://doi.org/10.4230/LIPIcs.SoCG.2019.37) Multi-filtration preprocessing algorithm for homology computations.
|
|
52
52
|
- [x] [[Computing Minimal Presentations and Bigraded Betti Numbers of 2-Parameter Persistent Homology, JAAG]](https://doi.org/10.1137/20M1388425) Minimal presentation of multiparameter persistence modules, using [mpfree](https://bitbucket.org/mkerber/mpfree/src/master/). Hilbert, Rank Decomposition Signed Measures, and MMA decompositions can be computed using the mpfree backend.
|
|
53
|
-
- [ ] [WIP] [[Decomposing Multiparameter Persistence Modules]](https://doi.org/10.4230/LIPIcs.SoCG.2025.41) Using the [AIDA](https://github.com/JanJend/AIDA) and [Persistence-Algebra](https://github.com/JanJend/Persistence-Algebra/) libraries.
|
|
53
|
+
- [ ] [WIP] [[Decomposing Multiparameter Persistence Modules, SoCG2025]](https://doi.org/10.4230/LIPIcs.SoCG.2025.41) Using the [AIDA](https://github.com/JanJend/AIDA) and [Persistence-Algebra](https://github.com/JanJend/Persistence-Algebra/) libraries.
|
|
54
54
|
- [x] [[Delaunay Bifiltrations of Functions on Point Clouds, SODA2024]](https://epubs.siam.org/doi/10.1137/1.9781611977912.173) Provides an alternative to function rips bifiltrations, using Delaunay complexes. Very good alternative to Rips-Density like bifiltrations.
|
|
55
55
|
- [x] [[Delaunay Core Bifiltration]](https://arxiv.org/abs/2405.01214) Bifiltration for point clouds, taking into account the density. Similar to Rips-Density.
|
|
56
56
|
- [x] [[Rivet]](https://github.com/rivetTDA/rivet) Interactive two parameter persistence
|
|
@@ -91,4 +91,3 @@ you can use the following journal bibtex entry
|
|
|
91
91
|
## Contributions
|
|
92
92
|
Feel free to contribute, report a bug on a pipeline, or ask for documentation by opening an issue.<br>
|
|
93
93
|
In particular, if you have a nice example or application that is not taken care in the documentation (see the `./docs/notebooks/` folder), please contact me to add it there.
|
|
94
|
-
|
|
@@ -14,7 +14,7 @@ columns_name = [ # only one column is necessary
|
|
|
14
14
|
# "HEAP",
|
|
15
15
|
# "UNORDERED_SET",
|
|
16
16
|
# "NAIVE_VECTOR",
|
|
17
|
-
|
|
17
|
+
"VECTOR",
|
|
18
18
|
# "INTRUSIVE_LIST",
|
|
19
19
|
# "LIST",
|
|
20
20
|
# "SMALL_VECTOR",
|
|
@@ -24,8 +24,8 @@ columns_name = [ # only one column is necessary
|
|
|
24
24
|
## Value types : CTYPE, PYTHON_TYPE, short
|
|
25
25
|
value_types = [
|
|
26
26
|
("int32_t", "np.int32", "i32"), # necessary
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
("int64_t", "np.int64", "i64"),
|
|
28
|
+
("float", "np.float32", "f32"),
|
|
29
29
|
("double", "np.float64", "f64"), # necessary
|
|
30
30
|
]
|
|
31
31
|
COARSENNED_VALUE_TYPE = ("int32_t", "np.int32", "i32")
|
|
@@ -52,7 +52,7 @@ matrix_types = [
|
|
|
52
52
|
"Matrix", # necessary
|
|
53
53
|
# "Graph",
|
|
54
54
|
# "Clement",
|
|
55
|
-
|
|
55
|
+
"GudhiCohomology",
|
|
56
56
|
]
|
|
57
57
|
|
|
58
58
|
filtration_containers = [
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from importlib.metadata import version as _version
|
|
2
|
+
import sys
|
|
2
3
|
|
|
3
4
|
__version__ = _version("multipers")
|
|
4
5
|
# Doc
|
|
@@ -11,12 +12,16 @@ from multipers import (
|
|
|
11
12
|
simplex_tree_multi,
|
|
12
13
|
slicer,
|
|
13
14
|
)
|
|
14
|
-
|
|
15
|
+
|
|
16
|
+
if sys.platform != "win32":
|
|
17
|
+
from multipers import ops
|
|
18
|
+
|
|
15
19
|
|
|
16
20
|
# Shortcuts
|
|
17
21
|
from multipers._slicer_meta import Slicer
|
|
18
22
|
from multipers.multiparameter_module_approximation import module_approximation
|
|
19
23
|
from multipers.simplex_tree_multi import SimplexTreeMulti
|
|
24
|
+
from multipers._signed_measure_meta import signed_measure
|
|
20
25
|
|
|
21
26
|
__all__ = [
|
|
22
27
|
"data",
|
|
@@ -31,3 +36,6 @@ __all__ = [
|
|
|
31
36
|
"module_approximation",
|
|
32
37
|
"SimplexTreeMulti",
|
|
33
38
|
]
|
|
39
|
+
|
|
40
|
+
if sys.platform != "win32":
|
|
41
|
+
__all__.append("ops")
|
|
@@ -120,6 +120,7 @@ def Slicer(
|
|
|
120
120
|
filtration_container: Optional[str] = None,
|
|
121
121
|
max_dim: Optional[int] = None,
|
|
122
122
|
return_type_only: bool = False,
|
|
123
|
+
_shift_dimension: int = 0,
|
|
123
124
|
) -> mps.Slicer_type:
|
|
124
125
|
"""
|
|
125
126
|
Given a simplextree or blocks (a.k.a scc for python),
|
|
@@ -144,6 +145,13 @@ def Slicer(
|
|
|
144
145
|
------
|
|
145
146
|
The corresponding slicer.
|
|
146
147
|
"""
|
|
148
|
+
if reduce:
|
|
149
|
+
from warnings import warn
|
|
150
|
+
|
|
151
|
+
warn(
|
|
152
|
+
"Deprecated argument `reduce`. just reduce it afterwards.",
|
|
153
|
+
DeprecationWarning,
|
|
154
|
+
)
|
|
147
155
|
if max_dim is not None:
|
|
148
156
|
raise DeprecationWarning("deprecated parameter.")
|
|
149
157
|
if is_slicer(st, allow_minpres=False) or is_simplextree_multi(st):
|
|
@@ -180,22 +188,22 @@ def Slicer(
|
|
|
180
188
|
)
|
|
181
189
|
if return_type_only:
|
|
182
190
|
return _Slicer
|
|
191
|
+
|
|
183
192
|
if st is None:
|
|
184
193
|
return _Slicer()
|
|
185
194
|
elif mps.is_slicer(st):
|
|
186
|
-
# max_dim_idx = (
|
|
187
|
-
# None
|
|
188
|
-
# if max_dim is None
|
|
189
|
-
# else np.searchsorted(st.get_dimensions(), max_dim + 1)
|
|
190
|
-
# )
|
|
191
195
|
slicer = _Slicer(st)
|
|
192
|
-
# if st.is_squeezed:
|
|
193
|
-
# slicer.filtration_grid = st.filtration_grid
|
|
194
|
-
# slicer.minpres_degree = st.minpres_degree
|
|
195
196
|
elif is_simplextree_multi(st) and backend == "Graph":
|
|
196
197
|
slicer = _slicer_from_simplextree(st, backend, vineyard)
|
|
197
198
|
if st.is_squeezed:
|
|
198
199
|
slicer.filtration_grid = st.filtration_grid
|
|
200
|
+
|
|
201
|
+
elif isinstance(st, str):
|
|
202
|
+
slicer = _Slicer()._build_from_scc_file(st, shift_dimension=_shift_dimension)
|
|
203
|
+
elif is_simplextree_multi(st):
|
|
204
|
+
slicer = _Slicer().build_from_simplex_tree(st)
|
|
205
|
+
if st.is_squeezed:
|
|
206
|
+
slicer.filtration_grid = st.filtration_grid
|
|
199
207
|
elif backend == "Graph":
|
|
200
208
|
raise ValueError(
|
|
201
209
|
"""
|
|
@@ -203,29 +211,16 @@ Graph is simplicial, incompatible with minpres.
|
|
|
203
211
|
You can try using `multipers.slicer.to_simplextree`."""
|
|
204
212
|
)
|
|
205
213
|
else:
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
else:
|
|
217
|
-
blocks = st
|
|
218
|
-
slicer = _slicer_from_blocks(
|
|
219
|
-
blocks,
|
|
220
|
-
backend,
|
|
221
|
-
vineyard,
|
|
222
|
-
is_kcritical,
|
|
223
|
-
dtype,
|
|
224
|
-
column_type,
|
|
225
|
-
filtration_container,
|
|
226
|
-
)
|
|
227
|
-
if filtration_grid is not None:
|
|
228
|
-
slicer.filtration_grid = filtration_grid
|
|
214
|
+
blocks = st
|
|
215
|
+
slicer = _slicer_from_blocks(
|
|
216
|
+
blocks,
|
|
217
|
+
backend,
|
|
218
|
+
vineyard,
|
|
219
|
+
is_kcritical,
|
|
220
|
+
dtype,
|
|
221
|
+
column_type,
|
|
222
|
+
filtration_container,
|
|
223
|
+
)
|
|
229
224
|
if reduce:
|
|
230
225
|
slicer = mps.minimal_presentation(
|
|
231
226
|
slicer,
|
|
@@ -516,6 +516,158 @@ cdef inline vector[Flat_i32] python_2_vect_Flat_i32(int32_t[:,:] filtrations) no
|
|
|
516
516
|
f[j] = filtrations[i,j]
|
|
517
517
|
out.emplace_back(f)
|
|
518
518
|
return out
|
|
519
|
+
cdef inline KFlat_i64_2_python(KFlat_i64* x, bool copy=False, bool raw=False):
|
|
520
|
+
cdef Py_ssize_t k = dereference(x).num_generators()
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
cdef int num_parameters = 2
|
|
524
|
+
|
|
525
|
+
cdef int64_t[:] data_view = <int64_t[:k]>(&(dereference(x)(0,0)))
|
|
526
|
+
numpy_view = np.asarray(data_view, dtype=np.int64)
|
|
527
|
+
if raw:
|
|
528
|
+
return numpy_view
|
|
529
|
+
return np.concatenate([numpy_view[:,None], np.arange(k, dtype=np.int64)[:,None]], axis=1)
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
cdef inline vect_KFlat_i64_2_python(vector[KFlat_i64]& x, bool copy = False, bool raw=False):
|
|
533
|
+
cdef Py_ssize_t num_stuff = x.size()
|
|
534
|
+
return [KFlat_i64_2_python(&(x[i]), copy=copy, raw=raw) for i in range(num_stuff)]
|
|
535
|
+
|
|
536
|
+
cdef inline KFlat_i64 python_2_KFlat_i64(int64_t[:,:] filtrations) noexcept nogil:
|
|
537
|
+
cdef vector[double] f = vector[double](filtrations.shape[0] * filtrations.shape[1])
|
|
538
|
+
cdef int k = 0;
|
|
539
|
+
for i in range(filtrations.shape[0]):
|
|
540
|
+
for j in range(filtrations.shape[1]):
|
|
541
|
+
f[k] = filtrations[i,j]
|
|
542
|
+
k = k + 1
|
|
543
|
+
cdef KFlat_i64 out = KFlat_i64(f.begin(), f.end(), filtrations.shape[1])
|
|
544
|
+
out.simplify()
|
|
545
|
+
return out
|
|
546
|
+
|
|
547
|
+
cdef inline vector[KFlat_i64] python_2_vect_KFlat_i64(int64_t[:,:] filtrations) noexcept nogil:
|
|
548
|
+
# cdef double[:,:] filtrations = np.asarray(filtrations_, dtype=np.float64)
|
|
549
|
+
cdef vector[KFlat_i64] out
|
|
550
|
+
cdef vector[int64_t] f = vector[int64_t](filtrations.shape[1])
|
|
551
|
+
out.reserve(filtrations.shape[0])
|
|
552
|
+
for i in range(filtrations.shape[0]):
|
|
553
|
+
for j in range(filtrations.shape[1]):
|
|
554
|
+
f[j] = filtrations[i,j]
|
|
555
|
+
out.emplace_back(f)
|
|
556
|
+
return out
|
|
557
|
+
cdef inline Flat_i64_2_python(Flat_i64* x, bool copy=False, bool raw=False):
|
|
558
|
+
cdef Py_ssize_t k = dereference(x).num_generators()
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
cdef int num_parameters = 2
|
|
562
|
+
|
|
563
|
+
cdef int64_t[:] data_view = <int64_t[:k]>(&(dereference(x)(0,0)))
|
|
564
|
+
numpy_view = np.asarray(data_view, dtype=np.int64)
|
|
565
|
+
if raw:
|
|
566
|
+
return numpy_view
|
|
567
|
+
return np.concatenate([numpy_view[:,None], np.arange(k, dtype=np.int64)[:,None]], axis=1)
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
cdef inline vect_Flat_i64_2_python(vector[Flat_i64]& x, bool copy = False, bool raw=False):
|
|
571
|
+
cdef Py_ssize_t num_stuff = x.size()
|
|
572
|
+
return [Flat_i64_2_python(&(x[i]), copy=copy, raw=raw) for i in range(num_stuff)]
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
cdef inline Flat_i64 python_2_Flat_i64(int64_t[:] filtration) noexcept nogil:
|
|
577
|
+
cdef int num_parameters = filtration.shape[0]
|
|
578
|
+
cdef Flat_i64 out = Flat_i64(num_parameters)
|
|
579
|
+
cdef int64_t* x
|
|
580
|
+
for i in range(num_parameters):
|
|
581
|
+
x = &out(0,i)
|
|
582
|
+
x[0] = filtration[i]
|
|
583
|
+
return out
|
|
584
|
+
|
|
585
|
+
cdef inline vector[Flat_i64] python_2_vect_Flat_i64(int64_t[:,:] filtrations) noexcept nogil:
|
|
586
|
+
# cdef double[:,:] filtrations = np.asarray(filtrations_, dtype=np.float64)
|
|
587
|
+
cdef vector[Flat_i64] out
|
|
588
|
+
cdef vector[int64_t] f = vector[int64_t](filtrations.shape[1])
|
|
589
|
+
out.reserve(filtrations.shape[0])
|
|
590
|
+
for i in range(filtrations.shape[0]):
|
|
591
|
+
for j in range(filtrations.shape[1]):
|
|
592
|
+
f[j] = filtrations[i,j]
|
|
593
|
+
out.emplace_back(f)
|
|
594
|
+
return out
|
|
595
|
+
cdef inline KFlat_f32_2_python(KFlat_f32* x, bool copy=False, bool raw=False):
|
|
596
|
+
cdef Py_ssize_t k = dereference(x).num_generators()
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
cdef int num_parameters = 2
|
|
600
|
+
|
|
601
|
+
cdef float[:] data_view = <float[:k]>(&(dereference(x)(0,0)))
|
|
602
|
+
numpy_view = np.asarray(data_view, dtype=np.float32)
|
|
603
|
+
if raw:
|
|
604
|
+
return numpy_view
|
|
605
|
+
return np.concatenate([numpy_view[:,None], np.arange(k, dtype=np.float32)[:,None]], axis=1)
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
cdef inline vect_KFlat_f32_2_python(vector[KFlat_f32]& x, bool copy = False, bool raw=False):
|
|
609
|
+
cdef Py_ssize_t num_stuff = x.size()
|
|
610
|
+
return [KFlat_f32_2_python(&(x[i]), copy=copy, raw=raw) for i in range(num_stuff)]
|
|
611
|
+
|
|
612
|
+
cdef inline KFlat_f32 python_2_KFlat_f32(float[:,:] filtrations) noexcept nogil:
|
|
613
|
+
cdef vector[double] f = vector[double](filtrations.shape[0] * filtrations.shape[1])
|
|
614
|
+
cdef int k = 0;
|
|
615
|
+
for i in range(filtrations.shape[0]):
|
|
616
|
+
for j in range(filtrations.shape[1]):
|
|
617
|
+
f[k] = filtrations[i,j]
|
|
618
|
+
k = k + 1
|
|
619
|
+
cdef KFlat_f32 out = KFlat_f32(f.begin(), f.end(), filtrations.shape[1])
|
|
620
|
+
out.simplify()
|
|
621
|
+
return out
|
|
622
|
+
|
|
623
|
+
cdef inline vector[KFlat_f32] python_2_vect_KFlat_f32(float[:,:] filtrations) noexcept nogil:
|
|
624
|
+
# cdef double[:,:] filtrations = np.asarray(filtrations_, dtype=np.float64)
|
|
625
|
+
cdef vector[KFlat_f32] out
|
|
626
|
+
cdef vector[float] f = vector[float](filtrations.shape[1])
|
|
627
|
+
out.reserve(filtrations.shape[0])
|
|
628
|
+
for i in range(filtrations.shape[0]):
|
|
629
|
+
for j in range(filtrations.shape[1]):
|
|
630
|
+
f[j] = filtrations[i,j]
|
|
631
|
+
out.emplace_back(f)
|
|
632
|
+
return out
|
|
633
|
+
cdef inline Flat_f32_2_python(Flat_f32* x, bool copy=False, bool raw=False):
|
|
634
|
+
cdef Py_ssize_t k = dereference(x).num_generators()
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
cdef int num_parameters = 2
|
|
638
|
+
|
|
639
|
+
cdef float[:] data_view = <float[:k]>(&(dereference(x)(0,0)))
|
|
640
|
+
numpy_view = np.asarray(data_view, dtype=np.float32)
|
|
641
|
+
if raw:
|
|
642
|
+
return numpy_view
|
|
643
|
+
return np.concatenate([numpy_view[:,None], np.arange(k, dtype=np.float32)[:,None]], axis=1)
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
cdef inline vect_Flat_f32_2_python(vector[Flat_f32]& x, bool copy = False, bool raw=False):
|
|
647
|
+
cdef Py_ssize_t num_stuff = x.size()
|
|
648
|
+
return [Flat_f32_2_python(&(x[i]), copy=copy, raw=raw) for i in range(num_stuff)]
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
cdef inline Flat_f32 python_2_Flat_f32(float[:] filtration) noexcept nogil:
|
|
653
|
+
cdef int num_parameters = filtration.shape[0]
|
|
654
|
+
cdef Flat_f32 out = Flat_f32(num_parameters)
|
|
655
|
+
cdef float* x
|
|
656
|
+
for i in range(num_parameters):
|
|
657
|
+
x = &out(0,i)
|
|
658
|
+
x[0] = filtration[i]
|
|
659
|
+
return out
|
|
660
|
+
|
|
661
|
+
cdef inline vector[Flat_f32] python_2_vect_Flat_f32(float[:,:] filtrations) noexcept nogil:
|
|
662
|
+
# cdef double[:,:] filtrations = np.asarray(filtrations_, dtype=np.float64)
|
|
663
|
+
cdef vector[Flat_f32] out
|
|
664
|
+
cdef vector[float] f = vector[float](filtrations.shape[1])
|
|
665
|
+
out.reserve(filtrations.shape[0])
|
|
666
|
+
for i in range(filtrations.shape[0]):
|
|
667
|
+
for j in range(filtrations.shape[1]):
|
|
668
|
+
f[j] = filtrations[i,j]
|
|
669
|
+
out.emplace_back(f)
|
|
670
|
+
return out
|
|
519
671
|
cdef inline KFlat_f64_2_python(KFlat_f64* x, bool copy=False, bool raw=False):
|
|
520
672
|
cdef Py_ssize_t k = dereference(x).num_generators()
|
|
521
673
|
|
|
@@ -663,6 +815,148 @@ cdef inline vector[Contiguous_i32] python_2_vect_Contiguous_i32(int32_t[:,:] fil
|
|
|
663
815
|
f[j] = filtrations[i,j]
|
|
664
816
|
out.emplace_back(f)
|
|
665
817
|
return out
|
|
818
|
+
cdef inline KContiguous_i64_2_python(KContiguous_i64* x, bool copy=False, bool raw=False):
|
|
819
|
+
cdef Py_ssize_t k = dereference(x).num_generators()
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
cdef Py_ssize_t p = dereference(x).num_parameters()
|
|
823
|
+
if dereference(x).is_finite():
|
|
824
|
+
duplicate = 0
|
|
825
|
+
else:
|
|
826
|
+
duplicate = p
|
|
827
|
+
# TODO : make it contiguous
|
|
828
|
+
return [_ff21cview2_i64(&(dereference(x)(i,0)), p, duplicate, copy=copy) for i in range(k)]
|
|
829
|
+
|
|
830
|
+
|
|
831
|
+
cdef inline vect_KContiguous_i64_2_python(vector[KContiguous_i64]& x, bool copy = False, bool raw=False):
|
|
832
|
+
cdef Py_ssize_t num_stuff = x.size()
|
|
833
|
+
return [KContiguous_i64_2_python(&(x[i]), copy=copy, raw=raw) for i in range(num_stuff)]
|
|
834
|
+
|
|
835
|
+
cdef inline KContiguous_i64 python_2_KContiguous_i64(int64_t[:,:] filtrations) noexcept nogil:
|
|
836
|
+
cdef vector[double] f = vector[double](filtrations.shape[0] * filtrations.shape[1])
|
|
837
|
+
cdef int k = 0;
|
|
838
|
+
for i in range(filtrations.shape[0]):
|
|
839
|
+
for j in range(filtrations.shape[1]):
|
|
840
|
+
f[k] = filtrations[i,j]
|
|
841
|
+
k = k + 1
|
|
842
|
+
cdef KContiguous_i64 out = KContiguous_i64(f.begin(), f.end(), filtrations.shape[1])
|
|
843
|
+
out.simplify()
|
|
844
|
+
return out
|
|
845
|
+
|
|
846
|
+
cdef inline vector[KContiguous_i64] python_2_vect_KContiguous_i64(int64_t[:,:] filtrations) noexcept nogil:
|
|
847
|
+
# cdef double[:,:] filtrations = np.asarray(filtrations_, dtype=np.float64)
|
|
848
|
+
cdef vector[KContiguous_i64] out
|
|
849
|
+
cdef vector[int64_t] f = vector[int64_t](filtrations.shape[1])
|
|
850
|
+
out.reserve(filtrations.shape[0])
|
|
851
|
+
for i in range(filtrations.shape[0]):
|
|
852
|
+
for j in range(filtrations.shape[1]):
|
|
853
|
+
f[j] = filtrations[i,j]
|
|
854
|
+
out.emplace_back(f)
|
|
855
|
+
return out
|
|
856
|
+
# Assumes it's contiguous
|
|
857
|
+
cdef inline Contiguous_i64_2_python(Contiguous_i64* x, bool copy=False, bool raw=False):
|
|
858
|
+
cdef Py_ssize_t num_parameters = dereference(x).num_parameters()
|
|
859
|
+
if not dereference(x).is_finite():
|
|
860
|
+
return np.full(shape=num_parameters, fill_value=dereference(x)(0,0))
|
|
861
|
+
cdef int64_t[:] x_view = <int64_t[:num_parameters]>(&(dereference(x)(0,0)))
|
|
862
|
+
return np.array(x_view) if copy else np.asarray(x_view)
|
|
863
|
+
|
|
864
|
+
cdef inline vect_Contiguous_i64_2_python(vector[Contiguous_i64]& x, bool copy = False, bool raw=False):
|
|
865
|
+
cdef Py_ssize_t num_stuff = x.size()
|
|
866
|
+
return [Contiguous_i64_2_python(&(x[i]), copy=copy, raw=raw) for i in range(num_stuff)]
|
|
867
|
+
|
|
868
|
+
|
|
869
|
+
|
|
870
|
+
cdef inline Contiguous_i64 python_2_Contiguous_i64(int64_t[:] filtration) noexcept nogil:
|
|
871
|
+
cdef int num_parameters = filtration.shape[0]
|
|
872
|
+
cdef Contiguous_i64 out = Contiguous_i64(num_parameters)
|
|
873
|
+
cdef int64_t* x
|
|
874
|
+
for i in range(num_parameters):
|
|
875
|
+
x = &out(0,i)
|
|
876
|
+
x[0] = filtration[i]
|
|
877
|
+
return out
|
|
878
|
+
|
|
879
|
+
cdef inline vector[Contiguous_i64] python_2_vect_Contiguous_i64(int64_t[:,:] filtrations) noexcept nogil:
|
|
880
|
+
# cdef double[:,:] filtrations = np.asarray(filtrations_, dtype=np.float64)
|
|
881
|
+
cdef vector[Contiguous_i64] out
|
|
882
|
+
cdef vector[int64_t] f = vector[int64_t](filtrations.shape[1])
|
|
883
|
+
out.reserve(filtrations.shape[0])
|
|
884
|
+
for i in range(filtrations.shape[0]):
|
|
885
|
+
for j in range(filtrations.shape[1]):
|
|
886
|
+
f[j] = filtrations[i,j]
|
|
887
|
+
out.emplace_back(f)
|
|
888
|
+
return out
|
|
889
|
+
cdef inline KContiguous_f32_2_python(KContiguous_f32* x, bool copy=False, bool raw=False):
|
|
890
|
+
cdef Py_ssize_t k = dereference(x).num_generators()
|
|
891
|
+
|
|
892
|
+
|
|
893
|
+
cdef Py_ssize_t p = dereference(x).num_parameters()
|
|
894
|
+
if dereference(x).is_finite():
|
|
895
|
+
duplicate = 0
|
|
896
|
+
else:
|
|
897
|
+
duplicate = p
|
|
898
|
+
# TODO : make it contiguous
|
|
899
|
+
return [_ff21cview2_f32(&(dereference(x)(i,0)), p, duplicate, copy=copy) for i in range(k)]
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
cdef inline vect_KContiguous_f32_2_python(vector[KContiguous_f32]& x, bool copy = False, bool raw=False):
|
|
903
|
+
cdef Py_ssize_t num_stuff = x.size()
|
|
904
|
+
return [KContiguous_f32_2_python(&(x[i]), copy=copy, raw=raw) for i in range(num_stuff)]
|
|
905
|
+
|
|
906
|
+
cdef inline KContiguous_f32 python_2_KContiguous_f32(float[:,:] filtrations) noexcept nogil:
|
|
907
|
+
cdef vector[double] f = vector[double](filtrations.shape[0] * filtrations.shape[1])
|
|
908
|
+
cdef int k = 0;
|
|
909
|
+
for i in range(filtrations.shape[0]):
|
|
910
|
+
for j in range(filtrations.shape[1]):
|
|
911
|
+
f[k] = filtrations[i,j]
|
|
912
|
+
k = k + 1
|
|
913
|
+
cdef KContiguous_f32 out = KContiguous_f32(f.begin(), f.end(), filtrations.shape[1])
|
|
914
|
+
out.simplify()
|
|
915
|
+
return out
|
|
916
|
+
|
|
917
|
+
cdef inline vector[KContiguous_f32] python_2_vect_KContiguous_f32(float[:,:] filtrations) noexcept nogil:
|
|
918
|
+
# cdef double[:,:] filtrations = np.asarray(filtrations_, dtype=np.float64)
|
|
919
|
+
cdef vector[KContiguous_f32] out
|
|
920
|
+
cdef vector[float] f = vector[float](filtrations.shape[1])
|
|
921
|
+
out.reserve(filtrations.shape[0])
|
|
922
|
+
for i in range(filtrations.shape[0]):
|
|
923
|
+
for j in range(filtrations.shape[1]):
|
|
924
|
+
f[j] = filtrations[i,j]
|
|
925
|
+
out.emplace_back(f)
|
|
926
|
+
return out
|
|
927
|
+
# Assumes it's contiguous
|
|
928
|
+
cdef inline Contiguous_f32_2_python(Contiguous_f32* x, bool copy=False, bool raw=False):
|
|
929
|
+
cdef Py_ssize_t num_parameters = dereference(x).num_parameters()
|
|
930
|
+
if not dereference(x).is_finite():
|
|
931
|
+
return np.full(shape=num_parameters, fill_value=dereference(x)(0,0))
|
|
932
|
+
cdef float[:] x_view = <float[:num_parameters]>(&(dereference(x)(0,0)))
|
|
933
|
+
return np.array(x_view) if copy else np.asarray(x_view)
|
|
934
|
+
|
|
935
|
+
cdef inline vect_Contiguous_f32_2_python(vector[Contiguous_f32]& x, bool copy = False, bool raw=False):
|
|
936
|
+
cdef Py_ssize_t num_stuff = x.size()
|
|
937
|
+
return [Contiguous_f32_2_python(&(x[i]), copy=copy, raw=raw) for i in range(num_stuff)]
|
|
938
|
+
|
|
939
|
+
|
|
940
|
+
|
|
941
|
+
cdef inline Contiguous_f32 python_2_Contiguous_f32(float[:] filtration) noexcept nogil:
|
|
942
|
+
cdef int num_parameters = filtration.shape[0]
|
|
943
|
+
cdef Contiguous_f32 out = Contiguous_f32(num_parameters)
|
|
944
|
+
cdef float* x
|
|
945
|
+
for i in range(num_parameters):
|
|
946
|
+
x = &out(0,i)
|
|
947
|
+
x[0] = filtration[i]
|
|
948
|
+
return out
|
|
949
|
+
|
|
950
|
+
cdef inline vector[Contiguous_f32] python_2_vect_Contiguous_f32(float[:,:] filtrations) noexcept nogil:
|
|
951
|
+
# cdef double[:,:] filtrations = np.asarray(filtrations_, dtype=np.float64)
|
|
952
|
+
cdef vector[Contiguous_f32] out
|
|
953
|
+
cdef vector[float] f = vector[float](filtrations.shape[1])
|
|
954
|
+
out.reserve(filtrations.shape[0])
|
|
955
|
+
for i in range(filtrations.shape[0]):
|
|
956
|
+
for j in range(filtrations.shape[1]):
|
|
957
|
+
f[j] = filtrations[i,j]
|
|
958
|
+
out.emplace_back(f)
|
|
959
|
+
return out
|
|
666
960
|
cdef inline KContiguous_f64_2_python(KContiguous_f64* x, bool copy=False, bool raw=False):
|
|
667
961
|
cdef Py_ssize_t k = dereference(x).num_generators()
|
|
668
962
|
|
|
@@ -6,6 +6,7 @@ from .filtrations import (
|
|
|
6
6
|
DelaunayLowerstar,
|
|
7
7
|
RipsCodensity,
|
|
8
8
|
RipsLowerstar,
|
|
9
|
+
RhomboidBifiltration,
|
|
9
10
|
)
|
|
10
11
|
|
|
11
12
|
__all__ = [
|
|
@@ -16,4 +17,5 @@ __all__ = [
|
|
|
16
17
|
"DelaunayLowerstar",
|
|
17
18
|
"RipsCodensity",
|
|
18
19
|
"RipsLowerstar",
|
|
20
|
+
"RhomboidBifiltration",
|
|
19
21
|
]
|