Gudhi::persistence_matrix::Matrix_row_access< Row, Row_container, has_removable_rows, ID_index > Class Template Reference

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. More...
 
 Matrix_row_access (const Matrix_row_access &toCopy)
 Copy constructor. More...
 
 Matrix_row_access (Matrix_row_access &&other) noexcept
 Move constructor. More...
 
 ~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. More...
 
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. More...
 
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. More...
 
Matrix_row_accessoperator= (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
RowEither boost::intrusive::list<Matrix_entry,...> if PersistenceMatrixOptions::has_intrusive_rows is true, or std::set<Matrix_entry, RowEntryComp> otherwise.
Row_containerEither std::map<Index,Row> if PersistenceMatrixOptions::has_removable_rows is true, or std::vector<Row> otherwise.
has_removable_rowsValue of PersistenceMatrixOptions::has_removable_rows.
ID_indexIDIdx 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
numberOfRowsNumber 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
toCopyMatrix 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)
inlinenoexcept

Move constructor.

Parameters
otherMatrix 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
rowIndexRow 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
rowIndexRow 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
rowIndexRow 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: