Class computing the zigzag persistent homology of a zigzag sequence. Algorithm based on [41].
More...
|
| Zigzag_persistence (std::function< void(Dimension, Index, Index)> stream_interval, unsigned int preallocationSize=0) |
| Constructor of the Zigzag_persistence class. More...
|
|
template<class BoundaryRange = std::initializer_list<Index>> |
Index | insert_cell (const BoundaryRange &boundary, Dimension dimension) |
| Updates the zigzag persistence diagram after the insertion of the given cell. More...
|
|
Index | remove_cell (Index arrowNumber) |
| Updates the zigzag persistence diagram after the removal of the given cell. More...
|
|
Index | 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. Increases the arrow number by one. More...
|
|
template<typename F > |
void | get_current_infinite_intervals (F &&stream_infinite_interval) |
| Outputs through the given callback method all birth indices which are currently not paired with a death index. More...
|
|
template<class
ZigzagOptions = Default_zigzag_options>
class Gudhi::zigzag_persistence::Zigzag_persistence< ZigzagOptions >
Class computing the zigzag persistent homology of a zigzag sequence. 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 pairs of birth and death indices are retrieved via the given callback method every time a pair is closed. To retrieve the open pairs (corresponding to infinite bars), use get_current_infinite_intervals.
Minimalistic example of usage
Includes
Contains the implementation of the Gudhi::zigzag_persistence::Zigzag_persistence class.
Useful aliases
Class computing the zigzag persistent homology of a zigzag filtration. Algorithm based on .
Definition: filtered_zigzag_persistence.h:442
Class computing the zigzag persistent homology of a zigzag sequence. Algorithm based on .
Definition: zigzag_persistence.h:149
typename Options::Dimension Dimension
Definition: zigzag_persistence.h:153
typename Options::Internal_key Index
Definition: zigzag_persistence.h:152
Construction with default values
std::cout << "[" << dim << "] " << birth << " - " << death << std::endl;
});
Input of the zigzag sequence/filtration
zp.insert_cell({}, 0);
zp.insert_cell({}, 0);
zp.insert_cell({0, 1}, 1);
zp.insert_cell({}, 0);
zp.insert_cell({0, 3}, 1);
zp.insert_cell({1, 3}, 1);
zp.remove_cell(4);
zp.remove_cell(2);
Finalizations
zp.get_current_infinite_intervals([](Dimension dim, Index birth){
std::cout << "[" << dim << "] " << birth << " - inf" << std::endl;
});
- Template Parameters
-
- Examples
- example_usage_zigzag_persistence.cpp.