Loading...
Searching...
No Matches
Gudhi::persistence_matrix::Persistence_interval< Dimension, Event_value > Class Template Reference
Persistence Matrix

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>`

## Public Member Functions

| Persistence_interval (Event_value birth=inf, Event_value death=inf, Dimension dim=-1)
| Constructor.
template<std::size_t I>
constexpr auto & | get () &noexcept
| Specialization of get for Gudhi::persistence_matrix::Persistence_interval.
template<std::size_t I>
constexpr const auto & | get () const &noexcept
| Specialization of get for Gudhi::persistence_matrix::Persistence_interval.
template<std::size_t I>
constexpr auto && | get () &&noexcept
| Specialization of get for Gudhi::persistence_matrix::Persistence_interval.
template<std::size_t I>
constexpr const auto && | get () const &&noexcept
| Specialization of get for Gudhi::persistence_matrix::Persistence_interval.

## Public Attributes

Dimension | dim
Event_value | birth
Event_value | death

## Static Public Attributes

static constexpr Event_value | inf
| Stores the infinity value for birth and death events. Its value depends on the template parameter Event_value:

## Friends

std::ostream & | operator<< (std::ostream &stream, const Persistence_interval &interval)
| operator<<

## Detailed Description

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.

## Constructor & Destructor Documentation

## Persistence_interval()

template<typename Dimension, typename Event_value>

Gudhi::persistence_matrix::Persistence_interval< Dimension, Event_value >::Persistence_interval | ( | Event_value | birth = inf,
|  | Event_value | death = inf,
|  | Dimension | dim = -1 )

inline

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.

## Member Function Documentation

## get() [1/4]

template<typename Dimension, typename Event_value>
template<std::size_t I>

auto && Gudhi::persistence_matrix::Persistence_interval< Dimension, Event_value >::get | ( |  | ) | &&

inline constexpr noexcept

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>

auto & Gudhi::persistence_matrix::Persistence_interval< Dimension, Event_value >::get | ( |  | ) | &

inline constexpr noexcept

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>

const auto && Gudhi::persistence_matrix::Persistence_interval< Dimension, Event_value >::get | ( |  | ) | const &&

inline constexpr noexcept

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>

const auto & Gudhi::persistence_matrix::Persistence_interval< Dimension, Event_value >::get | ( |  | ) | const &

inline constexpr noexcept

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.

## Friends And Related Symbol Documentation

## 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

## Member Data Documentation

## birth

template<typename Dimension, typename Event_value>

Event_value Gudhi::persistence_matrix::Persistence_interval< Dimension, Event_value >::birth

Birth value of the cycle.

## death

template<typename Dimension, typename Event_value>

Event_value Gudhi::persistence_matrix::Persistence_interval< Dimension, Event_value >::death

Death value of the cycle.

## dim

template<typename Dimension, typename Event_value>

Dimension Gudhi::persistence_matrix::Persistence_interval< Dimension, Event_value >::dim

Dimension of the cycle.

## inf

template<typename Dimension, typename Event_value>

Event_value Gudhi::persistence_matrix::Persistence_interval< Dimension, Event_value >::inf

static constexpr

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:

- include/gudhi/persistence_interval.h