Matrix cell class. Stores by default only the row index it belongs to, but can also store its column index when the row access is enabled, as well as its value when they are different from only 0 and 1. Zero-valued cells are never explicited in the matrix. More...
Public Types | |
using | Master = Master_matrix |
using | index = typename Master_matrix::index |
using | id_index = typename Master_matrix::id_index |
using | Field_element_type = typename Master_matrix::element_type |
Public Member Functions | |
Cell () | |
Constructs an cell with all attributes at default values. | |
Cell (id_index rowIndex) | |
Constructs a cell with given row index. Other possible attributes are set at default values. More... | |
Cell (index columnIndex, id_index rowIndex) | |
Constructs a cell with given row and column index. Other possible attributes are set at default values. More... | |
Cell (const Cell &cell) | |
Copy constructor. More... | |
Cell (Cell &&cell) noexcept | |
Move constructor. More... | |
id_index | get_row_index () const |
Returns the row index stored in the cell. More... | |
void | set_row_index (id_index rowIndex) |
Sets the row index stored in the cell. More... | |
Cell & | operator= (Cell other) |
Assign operator. | |
operator id_index () const | |
Converts the cell into a row index. More... | |
operator std::pair< id_index, Field_element_type > () const | |
Converts the cell into a pair of row index and cell value. More... | |
Friends | |
bool | operator< (const Cell &c1, const Cell &c2) |
Strictly smaller than comparator. More... | |
bool | operator== (const Cell &c1, const Cell &c2) |
Equality comparator. More... | |
Matrix cell class. Stores by default only the row index it belongs to, but can also store its column index when the row access is enabled, as well as its value when they are different from only 0 and 1. Zero-valued cells are never explicited in the matrix.
Master_matrix | An instanciation of Matrix from which all types and options are deduced. |
using Gudhi::persistence_matrix::Cell< Master_matrix >::Field_element_type = typename Master_matrix::element_type |
Value type.
using Gudhi::persistence_matrix::Cell< Master_matrix >::id_index = typename Master_matrix::id_index |
Row index type.
using Gudhi::persistence_matrix::Cell< Master_matrix >::index = typename Master_matrix::index |
Column index type.
using Gudhi::persistence_matrix::Cell< Master_matrix >::Master = Master_matrix |
Access to options from outside.
|
inline |
Constructs a cell with given row index. Other possible attributes are set at default values.
rowIndex | Row index of the cell. |
|
inline |
Constructs a cell with given row and column index. Other possible attributes are set at default values.
columnIndex | Column index of the cell. |
rowIndex | Row index of the cell. |
|
inline |
Copy constructor.
cell | Cell to copy. |
|
inlinenoexcept |
Move constructor.
cell | Cell to move. |
|
inline |
Returns the row index stored in the cell.
|
inline |
Converts the cell into a row index.
|
inline |
Converts the cell into a pair of row index and cell value.
|
inline |
Sets the row index stored in the cell.
rowIndex | Row index of the cell. |
|
friend |
Strictly smaller than comparator.
c1 | First cell to compare. |
c2 | Second cell to compare. |
|
friend |
Equality comparator.
c1 | First cell to compare. |
c2 | Second cell to compare. |