|
| Base_matrix_with_column_compression (Column_settings *colSettings) |
| Constructs an empty matrix. More...
|
|
template<class Container_type > |
| Base_matrix_with_column_compression (const std::vector< Container_type > &columns, Column_settings *colSettings) |
| Constructs a matrix from the given ordered columns. The columns are inserted in the given order. If no identical column already existed, a copy of the column is stored. If an identical one existed, no new column is constructed and the relationship between the two is registered in an union-find structure. More...
|
|
| Base_matrix_with_column_compression (unsigned int numberOfColumns, Column_settings *colSettings) |
| Constructs a new empty matrix and reserves space for the given number of columns. More...
|
|
| Base_matrix_with_column_compression (const Base_matrix_with_column_compression &matrixToCopy, Column_settings *colSettings=nullptr) |
| Copy constructor. If colSettings is not a null pointer, its value is kept instead of the one in the copied matrix. More...
|
|
| Base_matrix_with_column_compression (Base_matrix_with_column_compression &&other) noexcept |
| Move constructor. More...
|
|
| ~Base_matrix_with_column_compression () |
| Destructor.
|
|
template<class Container_type > |
void | insert_column (const Container_type &column) |
| Inserts a new ordered column at the end of the matrix by copying the given range of Matrix::cell_rep_type. The content of the range is assumed to be sorted by increasing ID value. More...
|
|
template<class Boundary_type > |
void | insert_boundary (const Boundary_type &boundary, dimension_type dim=-1) |
| Same as insert_column, only for interface purposes. The given dimension is ignored and not stored. More...
|
|
const Column_type & | get_column (index columnIndex) |
| Returns the column at the given MatIdx index. The type of the column depends on the choosen options, see PersistenceMatrixOptions::column_type. More...
|
|
const Row_type & | get_row (index rowIndex) const |
| Only available if PersistenceMatrixOptions::has_row_access is true. Returns the row at the given row index of the compressed matrix. The type of the row depends on the choosen options, see PersistenceMatrixOptions::has_intrusive_rows. Note that the row will be from the compressed matrix, that is, the one with only unique columns. More...
|
|
void | erase_empty_row (index rowIndex) |
| If PersistenceMatrixOptions::has_row_access and PersistenceMatrixOptions::has_removable_rows are true: assumes that the row is empty and removes it. Otherwise, does nothing. More...
|
|
index | get_number_of_columns () const |
| Returns the current number of columns in the matrix, counting also the redundant columns. More...
|
|
template<class Cell_range_or_column_index > |
void | add_to (const Cell_range_or_column_index &sourceColumn, index targetColumnIndex) |
| Adds column represented by sourceColumn onto the column at targetColumnIndex in the matrix. More...
|
|
template<class Cell_range_or_column_index > |
void | multiply_target_and_add_to (const Cell_range_or_column_index &sourceColumn, const Field_element_type &coefficient, index targetColumnIndex) |
| Multiplies the target column with the coefficiant and then adds the source column to it. That is: targetColumn = (targetColumn * coefficient) + sourceColumn . More...
|
|
template<class Cell_range_or_column_index > |
void | multiply_source_and_add_to (const Field_element_type &coefficient, const Cell_range_or_column_index &sourceColumn, index targetColumnIndex) |
| Multiplies the source column with the coefficiant before adding it to the target column. That is: targetColumn += (coefficient * sourceColumn) . The source column will not be modified. More...
|
|
bool | is_zero_cell (index columnIndex, index rowIndex) |
| Indicates if the cell at given coordinates has value zero. More...
|
|
bool | is_zero_column (index columnIndex) |
| Indicates if the column at given index has value zero. More...
|
|
void | reset (Column_settings *colSettings) |
| Resets the matrix to an empty matrix. More...
|
|
Base_matrix_with_column_compression & | operator= (const Base_matrix_with_column_compression &other) |
| Assign operator.
|
|
template<class Master_matrix>
class Gudhi::persistence_matrix::Base_matrix_with_column_compression< Master_matrix >
A base matrix (also see Base_matrix), but with column compression. That is, all identical columns in the matrix are compressed together as the same column. For matrices with a lot of redundant columns, this will save a lot of space. Also, any addition made onto a column will be performed at the same time on all other identical columns, which is an advantage for the cohomology algorithm for example.
- Template Parameters
-
Master_matrix | An instanciation of Matrix from which all types and options are deduced. |
template<class Master_matrix >
template<class Cell_range_or_column_index >
Adds column represented by sourceColumn
onto the column at targetColumnIndex
in the matrix.
The representatives of redundant columns are summed together, which means that all column compressed together with the target column are affected by the change, not only the target.
- Template Parameters
-
Cell_range_or_column_index | Either a range of Cell with a begin() and end() method, or any integer type. |
- Parameters
-
sourceColumn | Either a cell range or the MatIdx index of the column to add. |
targetColumnIndex | MatIdx index of the target column. |
template<class Master_matrix >
template<class Cell_range_or_column_index >
Multiplies the source column with the coefficiant before adding it to the target column. That is: targetColumn += (coefficient * sourceColumn)
. The source column will not be modified.
The representatives of redundant columns are summed together, which means that all column compressed together with the target column are affected by the change, not only the target.
- Template Parameters
-
Cell_range_or_column_index | Either a range of Cell with a begin() and end() method, or any integer type. |
- Parameters
-
coefficient | Value to multiply. |
sourceColumn | Either a Cell range or the MatIdx index of the column to add. |
targetColumnIndex | MatIdx index of the target column. |
template<class Master_matrix >
template<class Cell_range_or_column_index >
Multiplies the target column with the coefficiant and then adds the source column to it. That is: targetColumn = (targetColumn * coefficient) + sourceColumn
.
The representatives of redundant columns are summed together, which means that all column compressed together with the target column are affected by the change, not only the target.
- Template Parameters
-
Cell_range_or_column_index | Either a range of Cell with a begin() and end() method, or any integer type. |
- Parameters
-
sourceColumn | Either a Cell range or the MatIdx index of the column to add. |
coefficient | Value to multiply. |
targetColumnIndex | MatIdx index of the target column. |