Loading...
Searching...
No Matches
Gudhi::persistence_matrix::Base_swap< Master_matrix, Base_matrix > Class Template Reference
Persistence Matrix

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

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

## Public Types

using | Column_container = typename Master_matrix::Column_container
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.
| Base_swap (const Base_swap &matrixToCopy)=default
| Copy constructor.
| Base_swap (Base_swap &&other) noexcept
| Move constructor.
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 entries. This will be done when calling _orderRows().
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().
Base_swap & | operator= (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_matrix | An instantiation of Matrix from which all types and options are deduced.
  Base_matrix | Either Base_matrix or Boundary_matrix.

## Member Typedef Documentation

## Column_container

template<class Master_matrix, class Base_matrix>

using Gudhi::persistence_matrix::Base_swap< Master_matrix, Base_matrix >::Column_container = typename Master_matrix::Column_container

Column container type.

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

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

  numberOfColumns | Number 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 | ) |

default

Copy constructor.

Parameters

  matrixToCopy | Matrix 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 | ) |

inline noexcept

Move constructor.

Parameters

  other | Matrix 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 entries. This will be done when calling _orderRows().

Parameters

  columnIndex1 | First MatIdx column index.
  columnIndex2 | Second 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

  rowIndex1 | First row index.
  rowIndex2 | Second row index.

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

- include/gudhi/Persistence_matrix/base_swap.h