multipers 2.4.0b1__tar.gz → 2.4.1__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.4.0b1 → multipers-2.4.1}/PKG-INFO +4 -2
- {multipers-2.4.0b1 → multipers-2.4.1}/README.md +3 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/_tempita_grid_gen.py +9 -7
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/__init__.py +9 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/_signed_measure_meta.py +1 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/_slicer_meta.py +2 -5
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/filtration_conversions.pxd +294 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/filtrations/filtrations.py +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/filtrations.pxd +240 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/Persistence_slices_interface.h +62 -51
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Degree_rips_bifiltration.h +10 -7
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Dynamic_multi_parameter_filtration.h +18 -4
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Fields/Multi_field.h +5 -3
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Fields/Multi_field_operators.h +5 -3
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Fields/Multi_field_shared.h +5 -3
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Fields/Multi_field_small.h +5 -3
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Fields/Multi_field_small_operators.h +5 -3
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Fields/Multi_field_small_shared.h +5 -3
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Fields/Z2_field.h +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Fields/Zp_field.h +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Matrix.h +13 -13
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Multi_filtration/Multi_parameter_generator.h +10 -5
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Multi_parameter_filtered_complex.h +27 -39
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Multi_parameter_filtration.h +26 -15
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Multi_persistence/Line.h +13 -2
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Multi_persistence/Multi_parameter_filtered_complex_pcoh_interface.h +16 -31
- multipers-2.4.1/multipers/gudhi/gudhi/Multi_persistence/Persistence_interface_cohomology.h +211 -0
- multipers-2.4.1/multipers/gudhi/gudhi/Multi_persistence/Persistence_interface_homology.h +255 -0
- multipers-2.4.1/multipers/gudhi/gudhi/Multi_persistence/Persistence_interface_vineyard.h +138 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/Base_matrix.h +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/Base_matrix_with_column_compression.h +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/Boundary_matrix.h +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/Chain_matrix.h +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/Id_to_index_overlay.h +11 -11
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/Position_to_index_overlay.h +11 -11
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/RU_matrix.h +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/base_pairing.h +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/base_swap.h +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/chain_pairing.h +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/chain_rep_cycles.h +22 -22
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/chain_vine_swap.h +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/columns/chain_column_extra_properties.h +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/columns/column_dimension_holder.h +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/columns/entry_types.h +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/columns/heap_column.h +3 -2
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/columns/intrusive_list_column.h +3 -2
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/columns/intrusive_set_column.h +6 -4
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/columns/list_column.h +3 -2
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/columns/naive_vector_column.h +3 -2
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/columns/row_access.h +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/columns/set_column.h +3 -2
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/columns/unordered_set_column.h +3 -2
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/columns/vector_column.h +3 -2
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/index_mapper.h +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/matrix_dimension_holders.h +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/matrix_row_access.h +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/ru_pairing.h +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/ru_rep_cycles.h +9 -9
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/ru_vine_swap.h +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Projective_cover_kernel.h +7 -6
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Slicer.h +60 -104
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Thread_safe_slicer.h +21 -22
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/persistence_matrix_options.h +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/slicer_helpers.h +52 -37
- multipers-2.4.1/multipers/gudhi/gudhi/vineyard_base.h +286 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/io.pyx +40 -33
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/mma_structures.pyx +1483 -78
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/mma_structures.pyx.tp +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/multi_parameter_rank_invariant/hilbert_function.h +151 -195
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/multi_parameter_rank_invariant/persistence_slices.h +45 -49
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/multi_parameter_rank_invariant/rank_invariant.h +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/multiparameter_module_approximation/approximation.h +19 -15
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/multiparameter_module_approximation.pyx +7 -6
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/ops.pyx +6 -3
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/plots.py +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/simplex_tree_multi.pyx +11821 -441
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/simplex_tree_multi.pyx.tp +9 -1
- multipers-2.4.1/multipers/slicer.pxd +5611 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/slicer.pxd.tp +3 -2
- multipers-2.4.1/multipers/slicer.pyx +35506 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/slicer.pyx.tp +20 -5
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers.egg-info/PKG-INFO +4 -2
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers.egg-info/SOURCES.txt +3 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/pyproject.toml +1 -1
- {multipers-2.4.0b1 → multipers-2.4.1}/setup.py +2 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/tests/test_slicer.py +7 -0
- multipers-2.4.0b1/multipers/gudhi/gudhi/Multi_persistence/Persistence_interface_cohomology.h +0 -159
- multipers-2.4.0b1/multipers/gudhi/gudhi/Multi_persistence/Persistence_interface_matrix.h +0 -463
- multipers-2.4.0b1/multipers/slicer.pxd +0 -2097
- multipers-2.4.0b1/multipers/slicer.pyx +0 -13042
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/aida.cpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/birth_death.cpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/brute_force_mpm_decomposition.cpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/generate_decompositions.cpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/include/aida_interface.hpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/include/config.hpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/include/option_parser.hpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/include/types.hpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/making_examples.cpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/minimize_pres.cpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/mpfree_clone.cpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/presentation_to_quiver.cpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/presentation_to_quiver_new.cpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/resolution.cpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/src/aida_decompose.cpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/src/aida_decompose.hpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/src/aida_functions.cpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/src/aida_functions.hpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/src/aida_helpers.cpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/src/aida_helpers.hpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/src/aida_interface.cpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/src/block.cpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/src/block.hpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/src/config.cpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/src/option_parser.cpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/AIDA/vectorspace_decompositions.cpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/LICENSE +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/MANIFEST.in +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/Persistence-Algebra/include/grlina/bitset_algebra.hpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/Persistence-Algebra/include/grlina/column_types.hpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/Persistence-Algebra/include/grlina/dense_matrix.hpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/Persistence-Algebra/include/grlina/draw_hf.hpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/Persistence-Algebra/include/grlina/general.hpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/Persistence-Algebra/include/grlina/graded_linalg.hpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/Persistence-Algebra/include/grlina/graded_matrix.hpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/Persistence-Algebra/include/grlina/grid_scheduler.hpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/Persistence-Algebra/include/grlina/homomorphisms.hpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/Persistence-Algebra/include/grlina/matrix_base.hpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/Persistence-Algebra/include/grlina/modules.hpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/Persistence-Algebra/include/grlina/orders_and_graphs.hpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/Persistence-Algebra/include/grlina/r2graded_matrix.hpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/Persistence-Algebra/include/grlina/r3graded_matrix.hpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/Persistence-Algebra/include/grlina/sparse_matrix.hpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/Persistence-Algebra/include/grlina/to_quiver.hpp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/array_api/__init__.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/array_api/numpy.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/array_api/torch.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/data/MOL2.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/data/UCR.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/data/__init__.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/data/graphs.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/data/immuno_regions.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/data/minimal_presentation_to_st_bf.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/data/pytorch2simplextree.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/data/shape3d.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/data/synthetic.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/distances.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/filtration_conversions.pxd.tp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/filtrations/__init__.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/filtrations/density.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/filtrations.pxd.tp +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/function_rips.pyx +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/grids.pyx +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/Simplex_tree_interface.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/Simplex_tree_multi_interface.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Bitmap_cubical_complex.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Bitmap_cubical_complex_base.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Bitmap_cubical_complex_periodic_boundary_conditions_base.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Debug_utils.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Fields/Z2_field_operators.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Fields/Zp_field_operators.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Fields/Zp_field_shared.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Flag_complex_edge_collapser.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Multi_filtration/multi_filtration_conversions.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Multi_filtration/multi_filtration_utils.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Multi_persistence/Box.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Multi_persistence/Point.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Off_reader.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/allocators/entry_constructors.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_matrix/columns/column_utilities.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_on_a_line.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistence_on_rectangle.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistent_cohomology/Field_Zp.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistent_cohomology/Multi_field.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistent_cohomology/Persistent_cohomology_column.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Persistent_cohomology.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Points_off_io.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Simple_object_pool.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Simplex_tree/Simplex_tree_iterators.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Simplex_tree/Simplex_tree_node_explicit_storage.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Simplex_tree/Simplex_tree_siblings.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Simplex_tree/Simplex_tree_star_simplex_iterators.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Simplex_tree/filtration_value_utils.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Simplex_tree/hooks_simplex_base.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Simplex_tree/indexing_tag.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Simplex_tree/serialization_utils.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Simplex_tree/simplex_tree_options.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/Simplex_tree.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/distance_functions.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/graph_simplicial_complex.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/multi_simplex_tree_helpers.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/persistence_interval.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/reader_utils.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/gudhi/simple_mdspan.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/tmp_h0_pers/mma_interface_h0.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/gudhi/tmp_h0_pers/naive_merge_tree.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/ml/__init__.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/ml/accuracies.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/ml/invariants_with_persistable.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/ml/kernels.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/ml/mma.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/ml/one.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/ml/point_clouds.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/ml/signed_measures.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/ml/sliced_wasserstein.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/ml/tools.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/mma_structures.pxd +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/multi_parameter_rank_invariant/diff_helpers.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/multi_parameter_rank_invariant/euler_characteristic.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/multi_parameter_rank_invariant/function_rips.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/multiparameter_edge_collapse.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/multiparameter_module_approximation/debug.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/multiparameter_module_approximation/format_python-cpp.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/multiparameter_module_approximation/utilities.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/pickle.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/point_measure.pyx +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/simplex_tree_multi.pxd +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/tensor/tensor.h +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/tensor.pxd +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/test.pyx +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/tests/__init__.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/torch/__init__.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/torch/diff_grids.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/torch/rips_density.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers/vector_interface.pxd +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers.egg-info/dependency_links.txt +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers.egg-info/requires.txt +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/multipers.egg-info/top_level.txt +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/setup.cfg +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/tests/test_aida.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/tests/test_diff_helper.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/tests/test_filtrations.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/tests/test_grids.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/tests/test_hilbert_function.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/tests/test_mma.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/tests/test_parallel.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/tests/test_point_clouds.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/tests/test_python-cpp_conversion.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/tests/test_signed_betti.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/tests/test_signed_measure.py +0 -0
- {multipers-2.4.0b1 → multipers-2.4.1}/tests/test_simplextreemulti.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: multipers
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.1
|
|
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>
|
|
@@ -86,11 +86,13 @@ This library features a bunch of different functions and helpers. See below for
|
|
|
86
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.
|
|
87
87
|
- [x] [[Multiparameter Persistence Landscapes, JMLR]](https://jmlr.org/papers/v21/19-054.html) A vectorization technic for multiparameter persistence modules.
|
|
88
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.
|
|
89
|
+
- [x] [[Fast free resolutions of bifiltered chain complexes]](https://arxiv.org/abs/2512.08652) One-critical representation of multicritical filtrations, using [multi_critical](https://bitbucket.org/mkerber/multi_critical).
|
|
89
90
|
- [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.
|
|
90
91
|
- [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.
|
|
91
|
-
- [
|
|
92
|
+
- [x] [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.
|
|
92
93
|
- [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.
|
|
93
94
|
- [x] [[Delaunay Core Bifiltration]](https://arxiv.org/abs/2405.01214) Bifiltration for point clouds, taking into account the density. Similar to Rips-Density.
|
|
95
|
+
- [x] [[Computing the Multicover Bifiltration, SOCG2021]](https://doi.org/10.4230/LIPIcs.SoCG.2021.27) Rhomboid Tiling bifiltration. Equivalent to the multicover bifiltration, using [rhomboidtiling](https://github.com/geoo89/rhomboidtiling).
|
|
94
96
|
- [x] [[Rivet]](https://github.com/rivetTDA/rivet) Interactive two parameter persistence
|
|
95
97
|
- [x] [[Kernel Operations on the GPU, with Autodiff, without Memory Overflows, JMLR]](http://jmlr.org/papers/v22/20-275.html) Although not linked, at first glance, to persistence in any way, this library allows computing blazingly fast signed measures convolutions (and more!) with custom kernels.
|
|
96
98
|
- [ ] [Backend only] [[Projected distances for multi-parameter persistence modules]](https://arxiv.org/abs/2206.08818) Provides a strategy to estimate the convolution distance between multiparameter persistence module using projected barcodes. Implementation is a WIP.
|
|
@@ -48,11 +48,13 @@ 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] [[Fast free resolutions of bifiltered chain complexes]](https://arxiv.org/abs/2512.08652) One-critical representation of multicritical filtrations, using [multi_critical](https://bitbucket.org/mkerber/multi_critical).
|
|
51
52
|
- [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
53
|
- [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
|
-
- [
|
|
54
|
+
- [x] [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
55
|
- [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
56
|
- [x] [[Delaunay Core Bifiltration]](https://arxiv.org/abs/2405.01214) Bifiltration for point clouds, taking into account the density. Similar to Rips-Density.
|
|
57
|
+
- [x] [[Computing the Multicover Bifiltration, SOCG2021]](https://doi.org/10.4230/LIPIcs.SoCG.2021.27) Rhomboid Tiling bifiltration. Equivalent to the multicover bifiltration, using [rhomboidtiling](https://github.com/geoo89/rhomboidtiling).
|
|
56
58
|
- [x] [[Rivet]](https://github.com/rivetTDA/rivet) Interactive two parameter persistence
|
|
57
59
|
- [x] [[Kernel Operations on the GPU, with Autodiff, without Memory Overflows, JMLR]](http://jmlr.org/papers/v22/20-275.html) Although not linked, at first glance, to persistence in any way, this library allows computing blazingly fast signed measures convolutions (and more!) with custom kernels.
|
|
58
60
|
- [ ] [Backend only] [[Projected distances for multi-parameter persistence modules]](https://arxiv.org/abs/2206.08818) Provides a strategy to estimate the convolution distance between multiparameter persistence module using projected barcodes. Implementation is a WIP.
|
|
@@ -24,13 +24,13 @@ 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")
|
|
32
32
|
REAL_VALUE_TYPE = ("double", "np.float64", "f64")
|
|
33
|
-
|
|
33
|
+
assert COARSENNED_VALUE_TYPE in value_types and REAL_VALUE_TYPE in value_types
|
|
34
34
|
|
|
35
35
|
## True needed for MMA, and False is default value
|
|
36
36
|
vineyards_values = [
|
|
@@ -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 = [
|
|
@@ -88,11 +88,11 @@ def check_combination(
|
|
|
88
88
|
if backend_type in ["Graph", "GudhiCohomology"]:
|
|
89
89
|
if column_type[0] != 0:
|
|
90
90
|
return False
|
|
91
|
-
if filtration_container == "
|
|
91
|
+
if filtration_container == "Degree_rips_bifiltration":
|
|
92
92
|
if not is_kcritical:
|
|
93
93
|
return False
|
|
94
|
-
if value_type[0] == "f":
|
|
95
|
-
|
|
94
|
+
# if value_type[-1][0] == "f": # needed for mma
|
|
95
|
+
# return False
|
|
96
96
|
return True
|
|
97
97
|
|
|
98
98
|
|
|
@@ -224,6 +224,8 @@ print("#----------------------")
|
|
|
224
224
|
print("Slicers")
|
|
225
225
|
print("#----------------------")
|
|
226
226
|
print("#----------------------")
|
|
227
|
+
print(*[s["PYTHON_TYPE"] for s in slicers], sep="\n")
|
|
228
|
+
print("----------------------")
|
|
227
229
|
print(*slicers, sep="\n")
|
|
228
230
|
with open("build/tmp/_slicer_names.pkl", "wb") as f:
|
|
229
231
|
pickle.dump(slicers, f)
|
|
@@ -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")
|
|
@@ -132,10 +132,6 @@ def Slicer(
|
|
|
132
132
|
- `multipers.module_approximation(this, *args)`
|
|
133
133
|
- `multipers.signed_measure(this, *args)`
|
|
134
134
|
|
|
135
|
-
Note : it is recommended and sometime required to apply
|
|
136
|
-
a minimal presentation before computing these functions !
|
|
137
|
-
`mp.slicer.minimal_presentation(slicer, *args, **kwargs)`
|
|
138
|
-
|
|
139
135
|
Input
|
|
140
136
|
-----
|
|
141
137
|
- st : SimplexTreeMulti or scc-like blocks or path to scc file
|
|
@@ -222,7 +218,8 @@ You can try using `multipers.slicer.to_simplextree`."""
|
|
|
222
218
|
filtration_container,
|
|
223
219
|
)
|
|
224
220
|
if reduce:
|
|
225
|
-
|
|
221
|
+
from multipers.ops import minimal_presentation
|
|
222
|
+
slicer = minimal_presentation(
|
|
226
223
|
slicer,
|
|
227
224
|
backend=reduce_backend,
|
|
228
225
|
slicer_backend=backend,
|
|
@@ -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
|
|