Loading...
Searching...
No Matches
Gudhi::persistence_matrix::Matrix_row_access< Row, Row_container, has_removable_rows, ID_index > Class Template Reference
Persistence Matrix

Class managing the row access for the inheriting matrix. More...

`#include <gudhi/Persistence_matrix/matrix_row_access.h>`

## Public Member Functions

| Matrix_row_access ()
| Default constructor.
| Matrix_row_access (unsigned int numberOfRows)
| Constructor reserving space for the given number of rows.
| Matrix_row_access (const Matrix_row_access &toCopy)
| Copy constructor.
| Matrix_row_access (Matrix_row_access &&other) noexcept
| Move constructor.
| ~Matrix_row_access ()
| Destructor.
Row & | get_row (ID_index rowIndex)
| Returns the row at the given row index. The type of the row depends on the chosen options, see PersistenceMatrixOptions::has_intrusive_rows.
const Row & | get_row (ID_index rowIndex) const
| Returns the row at the given row index. The type of the row depends on the chosen options, see PersistenceMatrixOptions::has_intrusive_rows.
void | erase_empty_row (ID_index rowIndex)
| Only available if PersistenceMatrixOptions::has_removable_rows is true. Removes the given row from the row container if the row exists and is empty.
Matrix_row_access & | operator= (const Matrix_row_access &other)
| Assign operator.

## Friends

void | swap (Matrix_row_access &matrix1, Matrix_row_access &matrix2)
| Swap operator.

## Detailed Description

template<typename Row, typename Row_container, bool has_removable_rows, typename ID_index>
class Gudhi::persistence_matrix::Matrix_row_access< Row, Row_container, has_removable_rows, ID_index >

Class managing the row access for the inheriting matrix.

Template Parameters

  Row | Either boost::intrusive::list<Matrix_entry,...> if PersistenceMatrixOptions::has_intrusive_rows is true, or std::set<Matrix_entry, RowEntryComp> otherwise.
  Row_container | Either std::map<Index,Row> if PersistenceMatrixOptions::has_removable_rows is true, or std::vector<Row> otherwise.
  has_removable_rows | Value of PersistenceMatrixOptions::has_removable_rows.
  ID_index | IDIdx index type.

## Constructor & Destructor Documentation

## Matrix_row_access() [1/3]

template<typename Row, typename Row_container, bool has_removable_rows, typename ID_index>

Gudhi::persistence_matrix::Matrix_row_access< Row, Row_container, has_removable_rows, ID_index >::Matrix_row_access | ( | unsigned int | numberOfRows | ) |

inline

Constructor reserving space for the given number of rows.

Has only an effect if PersistenceMatrixOptions::has_removable_rows is false.

Parameters

  numberOfRows | Number of rows to reserve space for.

## Matrix_row_access() [2/3]

template<typename Row, typename Row_container, bool has_removable_rows, typename ID_index>

Gudhi::persistence_matrix::Matrix_row_access< Row, Row_container, has_removable_rows, ID_index >::Matrix_row_access | ( | const Matrix_row_access< Row, Row_container, has_removable_rows, ID_index > & | toCopy | ) |

inline

Copy constructor.

Parameters

  toCopy | Matrix to copy.

## Matrix_row_access() [3/3]

template<typename Row, typename Row_container, bool has_removable_rows, typename ID_index>

Gudhi::persistence_matrix::Matrix_row_access< Row, Row_container, has_removable_rows, ID_index >::Matrix_row_access | ( | Matrix_row_access< Row, Row_container, has_removable_rows, ID_index > && | other | ) |

inline noexcept

Move constructor.

Parameters

  other | Matrix to move.

## Member Function Documentation

## erase_empty_row()

template<typename Row, typename Row_container, bool has_removable_rows, typename ID_index>

void Gudhi::persistence_matrix::Matrix_row_access< Row, Row_container, has_removable_rows, ID_index >::erase_empty_row | ( | ID_index | rowIndex | ) |

inline

Only available if PersistenceMatrixOptions::has_removable_rows is true. Removes the given row from the row container if the row exists and is empty.

Parameters

  rowIndex | Row index of the row to remove.

## get_row() [1/2]

template<typename Row, typename Row_container, bool has_removable_rows, typename ID_index>

Row & Gudhi::persistence_matrix::Matrix_row_access< Row, Row_container, has_removable_rows, ID_index >::get_row | ( | ID_index | rowIndex | ) |

inline

Returns the row at the given row index. The type of the row depends on the chosen options, see PersistenceMatrixOptions::has_intrusive_rows.

Parameters

  rowIndex | Row index of the row to return: IDIdx for chain matrices or updated IDIdx for boundary matrices if swaps occurred.

Returns
  Reference to the row.

## get_row() [2/2]

template<typename Row, typename Row_container, bool has_removable_rows, typename ID_index>

const Row & Gudhi::persistence_matrix::Matrix_row_access< Row, Row_container, has_removable_rows, ID_index >::get_row | ( | ID_index | rowIndex | ) | const

inline

Returns the row at the given row index. The type of the row depends on the chosen options, see PersistenceMatrixOptions::has_intrusive_rows.

Parameters

  rowIndex | Row index of the row to return: IDIdx for chain matrices or updated IDIdx for boundary matrices if swaps occurred.

Returns
  Const reference to the row.

The documentation for this class was generated from the following file:

- include/gudhi/Persistence_matrix/matrix_row_access.h