Class computing the zigzag persistent homology of a zigzag filtration. Algorithm based on [41]. More...
#include <include/gudhi/filtered_zigzag_persistence.h>
Public Types | |
using | Options = FilteredZigzagOptions |
using | Internal_key = typename Options::Internal_key |
using | Cell_key = typename Options::Cell_key |
using | Filtration_value = typename Options::Filtration_value |
using | Dimension = typename Options::Dimension |
Public Member Functions | |
template<typename F > | |
Filtered_zigzag_persistence (F &&stream_interval, unsigned int preallocationSize=0) | |
Constructor. More... | |
template<class BoundaryRange = std::initializer_list<Cell_key>> | |
Internal_key | insert_cell (Cell_key cellID, const BoundaryRange &boundary, Dimension dimension, Filtration_value filtrationValue) |
Updates the zigzag persistence diagram after the insertion of the given cell. More... | |
Internal_key | remove_cell (Cell_key cellID, Filtration_value filtrationValue) |
Updates the zigzag persistence diagram after the removal of the given cell. preallocationSize. More... | |
Internal_key | apply_identity () |
To use when a cell is neither inserted nor removed, but the filtration moves along the identity operator on homology level. Useful to keep the birth/death indices aligned when insertions/removals are purposely skipped to avoid useless computation. | |
template<typename F > | |
void | get_current_infinite_intervals (F &&stream_infinite_interval) |
Outputs through the given callback method all current infinite bars. More... | |
Class computing the zigzag persistent homology of a zigzag filtration. Algorithm based on [41].
After construction of the class, the zigzag filtration should be given in a streaming like way, i.e., call insert_cell, remove_cell or apply_identity for each step of the filtration in order of the filtration. The bars of the diagram are retrieved via the given callback method every time a pair with non-zero length is closed. To retrieve the open/infinite bars, use get_current_infinite_intervals.
FilteredZigzagOptions | Structure following the FilteredZigzagOptions concept. Default value: Default_filtered_zigzag_options. |
using Gudhi::zigzag_persistence::Filtered_zigzag_persistence< FilteredZigzagOptions >::Cell_key = typename Options::Cell_key |
Cell ID type from external inputs.
using Gudhi::zigzag_persistence::Filtered_zigzag_persistence< FilteredZigzagOptions >::Dimension = typename Options::Dimension |
Type for dimension values.
using Gudhi::zigzag_persistence::Filtered_zigzag_persistence< FilteredZigzagOptions >::Filtration_value = typename Options::Filtration_value |
Type for filtration values.
using Gudhi::zigzag_persistence::Filtered_zigzag_persistence< FilteredZigzagOptions >::Internal_key = typename Options::Internal_key |
Key and index type, has to be signed.
using Gudhi::zigzag_persistence::Filtered_zigzag_persistence< FilteredZigzagOptions >::Options = FilteredZigzagOptions |
Zigzag options.
|
inline |
Constructor.
After construction of the class, the zigzag filtration should be given in a streaming like way, i.e., call insert_cell, remove_cell or apply_identity for each step of the filtration in order of the filtration. The bars of the diagram are retrieved via the given callback method every time a pair with non-zero length is closed. To retrieve the open/infinite bars, use get_current_infinite_intervals.
stream_interval | Callback method to process the birth and death values of a persistence bar. Has to take three arguments as input: first the dimension of the cycle, then the birth value of the cycle and third the death value of the cycle. The values corresponds to the filtration values which were given at insertions or removals. Note that bars of length 0 will not be token into account. |
preallocationSize | Reserves space for preallocationSize cells in the internal data structure. This is optional and just helps skip a few reallocations. The optimal value (no reallocation, no wasted space) is the number of cells in the biggest complex of the filtration. Default value: 0. |
F | Type of callback method. |
|
inline |
Outputs through the given callback method all current infinite bars.
F | Type of the callback method. Takes two arguments: the dimension of the cycle and the birth value of the cycle. |
stream_infinite_interval | Method processing the unpaired birth values. |
|
inline |
Updates the zigzag persistence diagram after the insertion of the given cell.
BoundaryRange | Range type needing size, begin and end members. |
cellID | ID representing the inserted cell. |
boundary | Boundary of the inserted cell. The range should be composed of the IDs of all cells contained in the boundary (i.e. with non-zero coefficients), using the ID specified as cellID when the corresponding cell was previously inserted (recall that the cells should be inserted in order of filtration). |
dimension | Dimension of the inserted cell. |
filtrationValue | Filtration value associated to the cell. Assumed to be always larger or equal to previously used filtration values or always smaller or equal than previous values, ie. the changes are monotonous. |
|
inline |
Updates the zigzag persistence diagram after the removal of the given cell. preallocationSize.
cellID | ID representing the cell to remove. Should be the same than the one used to insert it. |
filtrationValue | Filtration value associated to the removal. Assumed to be always larger or equal to previously used filtration values or always smaller or equal than previous values, ie. the changes are monotonous. |