Gudhi::persistence_matrix::Base_swap< Master_matrix, Base_matrix > Class Template Reference

Class managing the column and row swaps in Base_matrix and Boundary_matrix. More...

Public Types

using matrix_type = typename Master_matrix::column_container_type
 
using index = typename Master_matrix::index
 
using id_index = typename Master_matrix::id_index
 

Public Member Functions

 Base_swap ()
 Default constructor.
 
 Base_swap (unsigned int numberOfColumns)
 As default constructor, but reserves spaces for numberOfColumns columns. More...
 
 Base_swap (const Base_swap &matrixToCopy)
 Copy constructor. More...
 
 Base_swap (Base_swap &&other) noexcept
 Move constructor. More...
 
void swap_columns (index columnIndex1, index columnIndex2)
 Swaps the two columns at given indices in the column container. Does not updates the column index value, potentially stored in the cells. This will be done when calling _orderRows(). More...
 
void swap_rows (id_index rowIndex1, id_index rowIndex2)
 Swaps the two rows at the given indices, but in a lazy manner. That is, the swap is registered but not executed. The reordering will be done when calling _orderRows(). More...
 
Base_swapoperator= (Base_swap other)
 Assign operator.
 

Friends

void swap (Base_swap &base1, Base_swap &base2)
 Swap operator.
 

Detailed Description

template<class Master_matrix, class Base_matrix>
class Gudhi::persistence_matrix::Base_swap< Master_matrix, Base_matrix >

Class managing the column and row swaps in Base_matrix and Boundary_matrix.

Template Parameters
Master_matrixAn instanciation of Matrix from which all types and options are deduced.
Base_matrixEither Base_matrix or Boundary_matrix.

Member Typedef Documentation

◆ id_index

template<class Master_matrix , class Base_matrix >
using Gudhi::persistence_matrix::Base_swap< Master_matrix, Base_matrix >::id_index = typename Master_matrix::id_index

IDIdx index type.

◆ index

template<class Master_matrix , class Base_matrix >
using Gudhi::persistence_matrix::Base_swap< Master_matrix, Base_matrix >::index = typename Master_matrix::index

Container index type.

◆ matrix_type

template<class Master_matrix , class Base_matrix >
using Gudhi::persistence_matrix::Base_swap< Master_matrix, Base_matrix >::matrix_type = typename Master_matrix::column_container_type

Column container type.

Constructor & Destructor Documentation

◆ Base_swap() [1/3]

template<class Master_matrix , class Base_matrix >
Gudhi::persistence_matrix::Base_swap< Master_matrix, Base_matrix >::Base_swap ( unsigned int  numberOfColumns)
inline

As default constructor, but reserves spaces for numberOfColumns columns.

Parameters
numberOfColumnsNumber of columns to reserve space for.

◆ Base_swap() [2/3]

template<class Master_matrix , class Base_matrix >
Gudhi::persistence_matrix::Base_swap< Master_matrix, Base_matrix >::Base_swap ( const Base_swap< Master_matrix, Base_matrix > &  matrixToCopy)

Copy constructor.

Parameters
matrixToCopyMatrix to copy.

◆ Base_swap() [3/3]

template<class Master_matrix , class Base_matrix >
Gudhi::persistence_matrix::Base_swap< Master_matrix, Base_matrix >::Base_swap ( Base_swap< Master_matrix, Base_matrix > &&  other)
noexcept

Move constructor.

Parameters
otherMatrix to move.

Member Function Documentation

◆ swap_columns()

template<class Master_matrix , class Base_matrix >
void Gudhi::persistence_matrix::Base_swap< Master_matrix, Base_matrix >::swap_columns ( index  columnIndex1,
index  columnIndex2 
)
inline

Swaps the two columns at given indices in the column container. Does not updates the column index value, potentially stored in the cells. This will be done when calling _orderRows().

Parameters
columnIndex1First MatIdx column index.
columnIndex2Second MatIdx column index.

◆ swap_rows()

template<class Master_matrix , class Base_matrix >
void Gudhi::persistence_matrix::Base_swap< Master_matrix, Base_matrix >::swap_rows ( id_index  rowIndex1,
id_index  rowIndex2 
)
inline

Swaps the two rows at the given indices, but in a lazy manner. That is, the swap is registered but not executed. The reordering will be done when calling _orderRows().

Parameters
rowIndex1First row index.
rowIndex2Second row index.

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