Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP first sketch (won't compile) * [CPP] Fix compilation issue, refactor retrieving representative simplices Currently it should not work Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [CPP] Retrieve representative simplices from computation in CPP Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [CPP] Disable sorting of barcodes to keep alignment with representative simplices Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [CPP] Fix not enough memory pre-allocated for all dimensions Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [PY] Add draft of Python interface and Bindings support for representative simplices Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [CPP] Retrieve only "True" representative simplices Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [CPP] Retrieve representative simplices with an indexing 1:1 with barcodes Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [CPP] Refactor with clang-format Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [CPP] Update size of representative simplices, to go from dim 1 to dim N Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [CPP] Allow to sort barcodes and reproduce the same sort on rep simplices Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [CPP] Add representative simplicies for dim 0 Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [PY] Add output of representative simplices for dim 0 (finite and ess) Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [TEST] Add test for verify that all edges in rpsm are valid in the dm Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * Remove array conversions, enforce int type for indices, ensure array shapes are correct * [PY] Change dtype to int64 in flag generators * [CPP] Refactor get_youngest_edge_simplex function Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [CPP] Refactor code related to representative simplicies Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [CPP] Fix vertices order in dimension 0 for representative simplicies Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [PY/TEST] Add exception if user uses collapser + representatives. test added to verify this behavior Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [DOC] Add draft for input and output documentation of representative Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [EXAMPLE] Add a section about representative simplices example Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * Fix birth simplices for finite 0-dimensional bars * Actual fix for 0-dimensional persistence generator * [CPP] Refactor @ulupo fix for representative in dim 0 Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * Add @ctralie in copyright notice * Add inline comment as suggested by @MonkeyBreaker * [CPP] Update as suggested by @ulupo method link of class union_find The link function now also returns the birth vertex and allows to simplify logic in the computation of 0-dim Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [CPP] Revert latest commit link method works on the vertex index and the rank of the vertices but the logic to retrieve the correct birth (value_t) value requires comparison of birth values that IMO should not be integrated in the link method. To be discussed later But for the moment I prefer revert this change Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [CPP] Attempt fix for link_and_get_birth_vertex - Extract birth using dset.get_birth - FIXME avoid calling find twice for u and v by using an "unsafe" version of link_and_get_birth_vertex called _link_and_get_birth_vertex * Fix _link_and_get_birth_vertex * Address else branch forgotten in e04203c * [CPP] Refactor union_find related code Rename link function as suggested by @ulupo to link_roots_and_get_birth_vertex Add comments for documentation about shorcuts used compared to original Kruskal's algorithm Ensure that link is always computed if u != v Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [CPP] Add @ulupo update on comment for link_roots_and_get_birth_vertex Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [TEST] Add regression test for rpsm with non 0 values on diagonal Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [CPP] Fix suggested by @ulupo for non 0 values on diagonal of dm Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [TEST] Update comment and add additional test in test_rpsm_non_0_diagonal_dim0 Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * Rename ret_representative_simplices to return_generators and refactor docs and tests * Update kwarg name in tests * Change name to return_generators in bindings * Mathematically intelligible solution to 0-dimensional generators computation * Improve jupyter tutorial * Use np.inf instead of np.infty * Notebook refactor * Mention of ripser.py in basic tutorial * [CPP] Add inline comments in link_roots_and_get_birth_vertex * [TEST] add to test_..._diagonal_dim0 check for the number of points Fix that no value in the diagonal should be bigger than a non diagonal value Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [TEST] Add simple test for finite generate at dim > 0 suggested by @ulupo Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [CPP] Rename representative by generator Refactor slighly compute_dim_0 Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * [CPP] Fix typos in two inline comments * [CPP] fix small errors in inline comments * [TEST] Update test for higher dimensions as suggested by @ulupo If get_youngest_edge_simplex does not implement the correct logic it could per example return [4, 0, 5, 4] Signed-off-by: julian <julian.burellaperez@heig-vd.ch> * Fix import in flag_persistence_generators.ipynb * [PY] Improve test docstring Co-authored-by: julian <julian.burellaperez@heig-vd.ch>
- Loading branch information