Class computing the zigzag persistent homology of a zigzag filtration. Algorithm based on [zigzag]. Even though the insertions and removals are given in a "stream-like" way, the barcode and other values are stored during the whole process and not removed. It is therefore suited for smaller filtrations where the clean ups produce a higher overhead than the memory consumption.
More...
|
| Filtered_zigzag_persistence_with_storage (unsigned int preallocationSize=0, int ignoreCyclesAboveDim=-1) |
| Constructor.
|
|
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.
|
|
Internal_key | remove_cell (Cell_key cellID, Filtration_value filtrationValue) |
| Updates the zigzag persistence diagram after the removal of the given cell if the cell was contained in the current complex (note that it will not contain cells of dimension > ignoreCyclesAboveDim if the latter was non negative at construction of the class). Otherwise, just increases the operation count by one.
|
|
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.
|
|
const std::vector< Index_interval > & | get_index_persistence_diagram () const |
| Returns the "index persistence diagram" of the current filtration, that is, the pairs of atomic arrow numbers corresponding to a birth-death pair. Does not contain points at infinity, only the cycle classes which already died are represented.
|
|
Filtration_value | get_filtration_value_from_index (Internal_key idx) |
| Returns the filtration value \(f(idx)\) associated to the index \(idx\) returned by get_index_persistence_diagram.
|
|
std::vector< Filtration_value_interval > | get_persistence_diagram (Filtration_value shortestInterval=0., bool includeInfiniteBars=true) |
| Returns the current persistence diagram.
|
|
template<class
FilteredZigzagOptions = Default_filtered_zigzag_options>
class Gudhi::zigzag_persistence::Filtered_zigzag_persistence_with_storage< FilteredZigzagOptions >
Class computing the zigzag persistent homology of a zigzag filtration. Algorithm based on [zigzag]. Even though the insertions and removals are given in a "stream-like" way, the barcode and other values are stored during the whole process and not removed. It is therefore suited for smaller filtrations where the clean ups produce a higher overhead than the memory consumption.
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. To retrieve the current persistence diagram at any moment of the filtration, use get_persistence_diagram or get_index_persistence_diagram.
Minimalistic example of usage
Includes
Contains the implementation of the Gudhi::zigzag_persistence::Default_filtered_zigzag_options structu...
Useful aliases
Class computing the zigzag persistent homology of a zigzag filtration. Algorithm based on ....
Definition filtered_zigzag_persistence.h:121
Construction with default values
Input of the zigzag sequence/filtration
Internal_key remove_cell(Cell_key cellID, Filtration_value filtrationValue)
Updates the zigzag persistence diagram after the removal of the given cell if the cell was contained ...
Definition filtered_zigzag_persistence.h:221
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.
Definition filtered_zigzag_persistence.h:180
Finalizations
for (auto& bar : barcode) {
std::cout << bar << std::endl;
}
std::vector< Filtration_value_interval > get_persistence_diagram(Filtration_value shortestInterval=0., bool includeInfiniteBars=true)
Returns the current persistence diagram.
Definition filtered_zigzag_persistence.h:286
- Template Parameters
-
- Examples
- example_usage_filtered_zigzag_persistence_with_storage.cpp, example_zigzag_filtration_as_input_loop.cpp, and example_zzfiltration_from_file.cpp.