Type for an interval in a persistent diagram or barcode. Stores the birth, death and dimension of the interval. It can be used as a tuple with get
/std::get
(birth, death and dimension in this order), std::tuple_element
and std::tuple_size
, as well as structured binding.
More...
#include <gudhi/persistence_interval.h>
|
static constexpr Event_value | inf |
| Stores the infinity value for birth and death events. Its value depends on the template parameter Event_value : More...
|
|
template<typename Dimension, typename Event_value>
class Gudhi::persistence_matrix::Persistence_interval< Dimension, Event_value >
Type for an interval in a persistent diagram or barcode. Stores the birth, death and dimension of the interval. It can be used as a tuple with get
/std::get
(birth, death and dimension in this order), std::tuple_element
and std::tuple_size
, as well as structured binding.
- Template Parameters
-
Dimension | Type of the dimension value. |
Event_value | Type of the birth and death value. |
- Examples
- example_zigzag_filtration_as_input_loop.cpp.
◆ Persistence_interval()
template<typename Dimension , typename Event_value >
Constructor.
- Parameters
-
birth | Birth value of the cycle. Default value: inf. |
death | Death value of the cycle. Default value: inf. |
dim | Dimension of the cycle. Default value: -1. |
◆ get() [1/4]
template<typename Dimension , typename Event_value >
template<std::size_t I>
Specialization of get
for Gudhi::persistence_matrix::Persistence_interval.
- Template Parameters
-
I | Index of the value to return: 0 for the birth value, 1 for the death value and 2 for the dimension. |
- Returns
- Either the birth value if
I
== 0, the death value if I
== 1 or the dimension if I
== 2.
◆ get() [2/4]
template<typename Dimension , typename Event_value >
template<std::size_t I>
Specialization of get
for Gudhi::persistence_matrix::Persistence_interval.
- Template Parameters
-
I | Index of the value to return: 0 for the birth value, 1 for the death value and 2 for the dimension. |
- Returns
- Either the birth value if
I
== 0, the death value if I
== 1 or the dimension if I
== 2.
◆ get() [3/4]
template<typename Dimension , typename Event_value >
template<std::size_t I>
Specialization of get
for Gudhi::persistence_matrix::Persistence_interval.
- Template Parameters
-
I | Index of the value to return: 0 for the birth value, 1 for the death value and 2 for the dimension. |
- Returns
- Either the birth value if
I
== 0, the death value if I
== 1 or the dimension if I
== 2.
◆ get() [4/4]
template<typename Dimension , typename Event_value >
template<std::size_t I>
Specialization of get
for Gudhi::persistence_matrix::Persistence_interval.
- Template Parameters
-
I | Index of the value to return: 0 for the birth value, 1 for the death value and 2 for the dimension. |
- Returns
- Either the birth value if
I
== 0, the death value if I
== 1 or the dimension if I
== 2.
◆ operator<<
template<typename Dimension , typename Event_value >
std::ostream & operator<< |
( |
std::ostream & |
stream, |
|
|
const Persistence_interval< Dimension, Event_value > & |
interval |
|
) |
| |
|
friend |
operator<<
- Parameters
-
stream | outstream |
interval | interval to stream |
◆ birth
template<typename Dimension , typename Event_value >
Birth value of the cycle.
◆ death
template<typename Dimension , typename Event_value >
Death value of the cycle.
◆ dim
template<typename Dimension , typename Event_value >
◆ inf
template<typename Dimension , typename Event_value >
Initial value:= std::numeric_limits<Event_value>::has_infinity
? std::numeric_limits<Event_value>::infinity()
: static_cast<Event_value>(-1)
Stores the infinity value for birth and death events. Its value depends on the template parameter Event_value
:
- if
Event_value
has a native infinity value, it takes this value,
- otherwise, if
Event_value
is a signed type, it takes value -1,
- otherwise, if
Event_value
is a unsigned type, it takes the maximal possible value.
Is also used as default value for birth and death attributes when not initialized.
The documentation for this class was generated from the following file: