Gudhi::persistence_matrix::Matrix_row_access< Row_type, Row_container_type, has_removable_rows, id_index > Class Template Reference

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

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_type & get_row (id_index rowIndex)
 Returns the row at the given row index. The type of the row depends on the choosen options, see PersistenceMatrixOptions::has_intrusive_rows. More...
 
const Row_type & get_row (id_index rowIndex) const
 Returns the row at the given row index. The type of the row depends on the choosen 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_type, typename Row_container_type, bool has_removable_rows, typename id_index>
class Gudhi::persistence_matrix::Matrix_row_access< Row_type, Row_container_type, has_removable_rows, id_index >

Class managing the row access for the inheritating matrix.

Template Parameters
Row_typeEither boost::intrusive::list<Cell_type,...> if PersistenceMatrixOptions::has_intrusive_rows is true, or std::set<Cell_type, RowCellComp> otherwise.
Row_container_typeEither std::map<index,Row_type> if PersistenceMatrixOptions::has_removable_rows is true, or std::vector<Row_type> otherwise.
has_removable_rowsValue of PersistenceMatrixOptions::has_removable_rows.
id_indexIDIdx index type.

Constructor & Destructor Documentation

◆ Matrix_row_access() [1/3]

template<typename Row_type , typename Row_container_type , bool has_removable_rows, typename id_index >
Gudhi::persistence_matrix::Matrix_row_access< Row_type, Row_container_type, 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_type , typename Row_container_type , bool has_removable_rows, typename id_index >
Gudhi::persistence_matrix::Matrix_row_access< Row_type, Row_container_type, has_removable_rows, id_index >::Matrix_row_access ( const Matrix_row_access< Row_type, Row_container_type, has_removable_rows, id_index > &  toCopy)
inline

Copy constructor.

Parameters
toCopyMatrix to copy.

◆ Matrix_row_access() [3/3]

template<typename Row_type , typename Row_container_type , bool has_removable_rows, typename id_index >
Gudhi::persistence_matrix::Matrix_row_access< Row_type, Row_container_type, has_removable_rows, id_index >::Matrix_row_access ( Matrix_row_access< Row_type, Row_container_type, has_removable_rows, id_index > &&  other)
inlinenoexcept

Move constructor.

Parameters
otherMatrix to move.

Member Function Documentation

◆ erase_empty_row()

template<typename Row_type , typename Row_container_type , bool has_removable_rows, typename id_index >
void Gudhi::persistence_matrix::Matrix_row_access< Row_type, Row_container_type, 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_type , typename Row_container_type , bool has_removable_rows, typename id_index >
Row_type& Gudhi::persistence_matrix::Matrix_row_access< Row_type, Row_container_type, 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 choosen 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 occured.
Returns
Reference to the row.

◆ get_row() [2/2]

template<typename Row_type , typename Row_container_type , bool has_removable_rows, typename id_index >
const Row_type& Gudhi::persistence_matrix::Matrix_row_access< Row_type, Row_container_type, 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 choosen 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 occured.
Returns
Const reference to the row.

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