Loading...
Searching...
No Matches
Gudhi::persistence_matrix::PersistenceMatrixColumn Class Reference
Persistence Matrix

Concept of the column classes used by the Matrix class. The classes the columns inherit from are either real or dummy classes, see Row_access_option, Column_dimension_option, Chain_column_option. If used with column compression, the column type has to have its std::hash method. More...

`#include <concept/Persistence_matrix/PersistenceMatrixColumn.h>`

## Public Types

using | Master = unspecified
using | Index = unspecified
using | ID_index = unspecified
using | Dimension = unspecified
using | Field_element = unspecified
using | Entry = unspecified
using | Column_settings = unspecified
using | iterator = unspecified
using | const_iterator = unspecified
using | reverse_iterator = unspecified
using | const_reverse_iterator = unspecified
Public Types inherited from Gudhi::persistence_matrix::Row_access< Master_matrix >
using | Index = typename Master_matrix::Index
using | ID_index = typename Master_matrix::ID_index
using | Matrix_entry = typename Master_matrix::Matrix_entry
using | Row_container = typename Master_matrix::Row_container
Public Types inherited from Gudhi::persistence_matrix::Column_dimension_holder< Master_matrix >
using | Dimension = typename Master_matrix::Dimension
Public Types inherited from Gudhi::persistence_matrix::Chain_column_extra_properties< Master_matrix >
using | Index = typename Master_matrix::Index
using | ID_index = typename Master_matrix::ID_index

## Public Member Functions

| PersistenceMatrixColumn (Column_settings *colSettings=nullptr)
| Constructs an empty column. If `entryConstructor` is not specified or is set to nullptr, the column can only be used as a dummy, i.e., no modifying method should be used or there will be a segmentation fault. Same goes for `operators` if PersistenceMatrixOptions::is_z2 is false.
template<class Container = typename Master_matrix::Boundary>
| PersistenceMatrixColumn (const Container &nonZeroRowIndices, Column_settings *colSettings)
| Constructs a column from the given range of Matrix::Entry_representative. If the dimension is stored, the cell is assumed to be simplicial and its dimension to be nonZeroRowIndices length - 1 or 0. Otherwise, the dimension should be specified with another constructor.
template<class Container = typename Master_matrix::Boundary, class Row_container>
| PersistenceMatrixColumn (Index columnIndex, const Container &nonZeroRowIndices, Row_container *rowContainer, Column_settings *colSettings)
| Constructs a column from the given range of Matrix::Entry_representative such that the rows can be accessed. Each new entry in the column is also inserted in a row using Row_access::insert_entry. If the dimension is stored, the cell is assumed to be simplicial and its dimension to be nonZeroRowIndices length - 1 or 0. Otherwise, the dimension should be specified with another constructor.
template<class Container = typename Master_matrix::Boundary>
| PersistenceMatrixColumn (const Container &nonZeroChainRowIndices, Dimension dimension, Column_settings *colSettings)
| Constructs a column from the given range of Matrix::Entry_representative and stores the given dimension if Column_dimension_option is not a dummy.
template<class Container = typename Master_matrix::Boundary, class Row_container>
| PersistenceMatrixColumn (Index columnIndex, const Container &nonZeroChainRowIndices, Dimension dimension, Row_container *rowContainer, Column_settings *colSettings)
| Constructs a column from the given range of Matrix::Entry_representative such that the rows can be accessed. Each new entry in the column is also inserted in a row using Row_access::insert_entry. Stores the given dimension if Column_dimension_option is not a dummy.
| PersistenceMatrixColumn (const PersistenceMatrixColumn &column, Column_settings *colSettings=nullptr)
| Copy constructor. If `operators` or `entryConstructor` is not a null pointer, its value is kept instead of the one in the copied column.
template<class Row_container>
| PersistenceMatrixColumn (const PersistenceMatrixColumn &column, Index columnIndex, Row_container *rowContainer, Column_settings *colSettings=nullptr)
| Copy constructor with row access. If `operators` or `entryConstructor` stored in `colSettings` is not a null pointer, its value is kept instead of the one in the copied column.
| PersistenceMatrixColumn (PersistenceMatrixColumn &&column) noexcept
| Move constructor.
| ~PersistenceMatrixColumn ()
| Destructor.
std::vector< Field_element > | get_content (int columnLength=-1) const
| Returns the values of the column, zero values included.
bool | is_non_zero (ID_index rowIndex) const
| Indicates if the entry at given row index has value zero.
bool | is_empty ()
| Indicates if the column is empty or has only zero values.
std::size_t | size () const
| Returns the size of the underlying container.
template<class Row_index_map>
void | reorder (const Row_index_map &valueMap, Index columnIndex=Matrix::get_null_value< Index >())
| Reorders the column with the given map of row indices. Also changes the column index stored in the entries if row access is enabled and `columnIndex` is not the null index.
void | clear ()
| Zeros/empties the column.
void | clear (ID_index rowIndex)
| Zeros the entry at given row index.
ID_index | get_pivot ()
| Returns the row index of the pivot. If the column does not have a pivot, returns null index.
Field_element | get_pivot_value ()
| Returns the value of the pivot. If the column does not have a pivot, returns 0.
iterator | begin () noexcept
| Returns a begin Entry iterator to iterate over all entries contained in the underlying container.
const_iterator | begin () const noexcept
| Returns a begin Entry const iterator to iterate over all entries contained in the underlying container.
iterator | end () noexcept
| Returns an end Entry iterator, iterating over all entries contained in the underlying container.
const_iterator | end () const noexcept
| Returns an end Entry const iterator, iterating over all entries contained in the underlying container.
reverse_iterator | rbegin () noexcept
| Returns a begin Entry reverse iterator to iterate over all entries contained in the underlying container.
const_reverse_iterator | rbegin () const noexcept
| Returns a begin Entry const reverse iterator to iterate over all entries contained in the underlying container.
reverse_iterator | rend () noexcept
| Returns an end Entry reverse iterator, iterating over all entries contained in the underlying container.
const_reverse_iterator | rend () const noexcept
| Returns an end Entry const reverse iterator, iterating over all entries contained in the underlying container.
template<class Entry_range>
PersistenceMatrixColumn & | operator+= (const Entry_range &column)
| Adds the given Entry range onto the column.
PersistenceMatrixColumn & | operator+= (PersistenceMatrixColumn &column)
| Adds the given column onto this column.
PersistenceMatrixColumn & | operator*= (const Field_element &val)
| Multiplies all values in the column with the given value.
template<class Entry_range>
PersistenceMatrixColumn & | multiply_target_and_add (const Field_element &val, const Entry_range &column)
| this = val * this + column
template<class Entry_range>
PersistenceMatrixColumn & | multiply_source_and_add (const Entry_range &column, const Field_element &val)
| this = this + column * val
void | push_back (const Entry &entry)
| Adds a copy of the given entry at the end of the column. It is therefore assumed that the row index of the entry is higher than the current pivot of the column. Not available for chain matrices and is only needed for RU matrices.
PersistenceMatrixColumn & | operator= (const PersistenceMatrixColumn &other)
| Assign operator. Should be disabled when row access is enabled.
Public Member Functions inherited from Gudhi::persistence_matrix::Row_access< Master_matrix >
| Row_access ()
| Default constructor. Sets the column index to null index and the row container to nullptr. Should only be used by dummy columns.
| Row_access (Index columnIndex, Row_container *rows)
| Constructor setting the column index and the row container by the given values.
| Row_access (Row_access &&other) noexcept
| Move constructor.
void | insert_entry (ID_index rowIndex, Matrix_entry *entry)
| Inserts the given entry at the given row index.
void | unlink (Matrix_entry *entry)
| Removes the given entry from its row.
void | update_entry (const Matrix_entry &entry)
| If PersistenceMatrixOptions::has_intrusive_rows is false, updates the copy of the entry in its row. Otherwise does nothing.
Index | get_column_index () const
| Returns the MatIdx column index.
Public Member Functions inherited from Gudhi::persistence_matrix::Column_dimension_holder< Master_matrix >
| Column_dimension_holder ()
| Default constructor. Sets the dimension to 0 for boundary matrices and to null index for chain matrices.
| Column_dimension_holder (Dimension dim)
| Constructor setting the dimension to the given value.
| Column_dimension_holder (const Column_dimension_holder &col)
| Copy constructor.
| Column_dimension_holder (Column_dimension_holder &&col)
| Move constructor.
Dimension | get_dimension () const
| Returns the dimension of the column.
Column_dimension_holder & | operator= (const Column_dimension_holder &other)
| Assign operator.
Public Member Functions inherited from Gudhi::persistence_matrix::Chain_column_extra_properties< Master_matrix >
| Chain_column_extra_properties ()
| Default constructor. Sets the pivot and pair to null index, which means "not existing".
| Chain_column_extra_properties (ID_index pivot)
| Constructor setting the pivot at the given value and the pair to null index (i.e. not paired).
| Chain_column_extra_properties (ID_index pivot, Index pair)
| Constructor setting the pivot and the pair at the given values.
| Chain_column_extra_properties (const Chain_column_extra_properties &col)
| Copy constructor.
| Chain_column_extra_properties (Chain_column_extra_properties &&col)
| Move constructor.
Index | get_paired_chain_index () const
| Returns null index if the column is not paired, the MatIdx of the pair otherwise.
bool | is_paired () const
| Indicates if the column is paired or not.
void | assign_paired_chain (Index other_col)
| Sets the value of the pair.
void | unassign_paired_chain ()
| Un-pairs a column.
Chain_column_extra_properties & | operator= (const Chain_column_extra_properties &other)
| Assign operator.

## Friends

bool | operator== (const PersistenceMatrixColumn &c1, const PersistenceMatrixColumn &c2)
| Equality comparator. Equal in the sense that what is "supposed" to be contained in the columns is equal, not what is actually stored in the underlying container. For example, the underlying container of Vector_column can contain entries which were erased explicitly by clear(Index). Those entries should not be taken into account while comparing.
bool | operator< (const PersistenceMatrixColumn &c1, const PersistenceMatrixColumn &c2)

"Strictly smaller than" comparator. Usually a lexicographical order, but what matters is that the order is total. The order should apply on what is "supposed" to be contained in the columns, not what is actually stored in the underlying container. For example, the underlying container of Vector_column can contain entries which were erased explicitly by clear(Index). Those entries should not be taken into account while comparing.

void | swap (PersistenceMatrixColumn &col1, PersistenceMatrixColumn &col2)
| Swap operator.

## Detailed Description

Concept of the column classes used by the Matrix class. The classes the columns inherit from are either real or dummy classes, see Row_access_option, Column_dimension_option, Chain_column_option. If used with column compression, the column type has to have its std::hash method.

Implementations of this concept are Heap_column, List_column, Vector_column, Naive_vector_column Set_column, Unordered_set_column, Intrusive_list_column and Intrusive_set_column.

## Member Typedef Documentation

## Column_settings

using Gudhi::persistence_matrix::PersistenceMatrixColumn::Column_settings = unspecified

Structure giving access to external classes eventually necessary, like an entry pool for example.

## const_iterator

using Gudhi::persistence_matrix::PersistenceMatrixColumn::const_iterator = unspecified

Column const_iterator type.

## const_reverse_iterator

using Gudhi::persistence_matrix::PersistenceMatrixColumn::const_reverse_iterator = unspecified

Column const_reverse_iterator type.

## Dimension

using Gudhi::persistence_matrix::PersistenceMatrixColumn::Dimension = unspecified

Type for dimension value.

## Entry

using Gudhi::persistence_matrix::PersistenceMatrixColumn::Entry = unspecified

Entry.

## Field_element

using Gudhi::persistence_matrix::PersistenceMatrixColumn::Field_element = unspecified

Type of a field element.

## ID_index

using Gudhi::persistence_matrix::PersistenceMatrixColumn::ID_index = unspecified

Type of IDIdx index.

## Index

using Gudhi::persistence_matrix::PersistenceMatrixColumn::Index = unspecified

Type of MatIdx index.

## iterator

using Gudhi::persistence_matrix::PersistenceMatrixColumn::iterator = unspecified

Column iterator type.

## Master

using Gudhi::persistence_matrix::PersistenceMatrixColumn::Master = unspecified

Master matrix, that is a templated Matrix.

## reverse_iterator

using Gudhi::persistence_matrix::PersistenceMatrixColumn::reverse_iterator = unspecified

Column reverse_iterator type.

## Constructor & Destructor Documentation

## PersistenceMatrixColumn() [1/8]

Gudhi::persistence_matrix::PersistenceMatrixColumn::PersistenceMatrixColumn | ( | Column_settings * | colSettings = nullptr | ) |

Constructs an empty column. If `entryConstructor` is not specified or is set to nullptr, the column can only be used as a dummy, i.e., no modifying method should be used or there will be a segmentation fault. Same goes for `operators` if PersistenceMatrixOptions::is_z2 is false.

Parameters

  colSettings | Pointer to a setting structure or nullptr. The structure should contain all the necessary classes specific to the column type, such as custom allocators. The specificities are this way hidden behind a common interface for all column types. If `colSettings` is not specified or is equal to nullptr, the column should still be constructable even though not necessarily "usable".

## PersistenceMatrixColumn() [2/8]

template<class Container = typename Master_matrix::Boundary>

Gudhi::persistence_matrix::PersistenceMatrixColumn::PersistenceMatrixColumn | ( | const Container & | nonZeroRowIndices,
|  | Column_settings * | colSettings )

Constructs a column from the given range of Matrix::Entry_representative. If the dimension is stored, the cell is assumed to be simplicial and its dimension to be nonZeroRowIndices length - 1 or 0. Otherwise, the dimension should be specified with another constructor.

Template Parameters

  Container | Range of Matrix::Entry_representative. Assumed to have a begin(), end() and size() method.

Parameters

  nonZeroRowIndices | Range of Matrix::Entry_representative representing all rows with non zero values.
  colSettings | Pointer to an existing setting structure. The structure should contain all the necessary classes specific to the column type, such as custom allocators. The specificities are this way hidden behind a common interface for all column types.

## PersistenceMatrixColumn() [3/8]

template<class Container = typename Master_matrix::Boundary, class Row_container>

Gudhi::persistence_matrix::PersistenceMatrixColumn::PersistenceMatrixColumn | ( | Index | columnIndex,
|  | const Container & | nonZeroRowIndices,
|  | Row_container * | rowContainer,
|  | Column_settings * | colSettings )

Constructs a column from the given range of Matrix::Entry_representative such that the rows can be accessed. Each new entry in the column is also inserted in a row using Row_access::insert_entry. If the dimension is stored, the cell is assumed to be simplicial and its dimension to be nonZeroRowIndices length - 1 or 0. Otherwise, the dimension should be specified with another constructor.

Template Parameters

  Container | Range of Matrix::Entry_representative. Assumed to have a begin(), end() and size() method.
  Row_container | Either std::map if PersistenceMatrixOptions::has_removable_rows is true or std::vector<Row>.

Parameters

  columnIndex | MatIdx column index that should be specified to the entries.
  nonZeroRowIndices | Range of Matrix::Entry_representative representing all rows with non zero values.
  rowContainer | Pointer to the row container that will be forwarded to Row_access at construction.
  colSettings | Pointer to an existing setting structure. The structure should contain all the necessary classes specific to the column type, such as custom allocators. The specificities are this way hidden behind a common interface for all column types.

## PersistenceMatrixColumn() [4/8]

template<class Container = typename Master_matrix::Boundary>

Gudhi::persistence_matrix::PersistenceMatrixColumn::PersistenceMatrixColumn | ( | const Container & | nonZeroChainRowIndices,
|  | Dimension | dimension,
|  | Column_settings * | colSettings )

Constructs a column from the given range of Matrix::Entry_representative and stores the given dimension if Column_dimension_option is not a dummy.

Template Parameters

  Container | Range of Matrix::Entry_representative. Assumed to have a begin(), end() and size() method.

Parameters

  nonZeroChainRowIndices | Range of Matrix::Entry_representative representing all rows with non zero values.
  dimension | Dimension of the column. Is ignored if the dimension is not stored.
  colSettings | Pointer to an existing setting structure. The structure should contain all the necessary classes specific to the column type, such as custom allocators. The specificities are this way hidden behind a common interface for all column types.

## PersistenceMatrixColumn() [5/8]

template<class Container = typename Master_matrix::Boundary, class Row_container>

Gudhi::persistence_matrix::PersistenceMatrixColumn::PersistenceMatrixColumn | ( | Index | columnIndex,
|  | const Container & | nonZeroChainRowIndices,
|  | Dimension | dimension,
|  | Row_container * | rowContainer,
|  | Column_settings * | colSettings )

Constructs a column from the given range of Matrix::Entry_representative such that the rows can be accessed. Each new entry in the column is also inserted in a row using Row_access::insert_entry. Stores the given dimension if Column_dimension_option is not a dummy.

Template Parameters

  Container | Range of Matrix::Entry_representative. Assumed to have a begin(), end() and size() method.
  Row_container | Either std::map if PersistenceMatrixOptions::has_removable_rows is true or std::vector<Row>.

Parameters

  columnIndex | MatIdx column index that should be specified to the entries.
  nonZeroChainRowIndices | Range of Matrix::Entry_representative representing all rows with non zero values.
  dimension | Dimension of the column. Is ignored if the dimension is not stored.
  rowContainer | Pointer to the row container that will be forwarded to Row_access at construction.
  colSettings | Pointer to an existing setting structure. The structure should contain all the necessary classes specific to the column type, such as custom allocators. The specificities are this way hidden behind a common interface for all column types.

## PersistenceMatrixColumn() [6/8]

Gudhi::persistence_matrix::PersistenceMatrixColumn::PersistenceMatrixColumn | ( | const PersistenceMatrixColumn & | column,
|  | Column_settings * | colSettings = nullptr )

Copy constructor. If `operators` or `entryConstructor` is not a null pointer, its value is kept instead of the one in the copied column.

Parameters

  column | Column to copy.
  colSettings | Pointer to a setting structure or nullptr. The structure should contain all the necessary classes specific to the column type, such as custom allocators. The specificities are this way hidden behind a common interface for all column types. If `colSettings` is not specified or is equal to nullptr, the structure stored in `column` is used instead.

## PersistenceMatrixColumn() [7/8]

template<class Row_container>

Gudhi::persistence_matrix::PersistenceMatrixColumn::PersistenceMatrixColumn | ( | const PersistenceMatrixColumn & | column,
|  | Index | columnIndex,
|  | Row_container * | rowContainer,
|  | Column_settings * | colSettings = nullptr )

Copy constructor with row access. If `operators` or `entryConstructor` stored in `colSettings` is not a null pointer, its value is kept instead of the one in the copied column.

Template Parameters

  Row_container | Either std::map if PersistenceMatrixOptions::has_removable_rows is true or std::vector<Row>.

Parameters

  column | Column to copy.
  columnIndex | MatIdx column index of the new column once copied.
  rowContainer | Pointer to the row container that will be forwarded to Row_access.
  colSettings | Pointer to a setting structure or nullptr. The structure should contain all the necessary classes specific to the column type, such as custom allocators. The specificities are this way hidden behind a common interface for all column types. If `colSettings` is not specified or is equal to nullptr, the structure stored in `column` is used instead.

## PersistenceMatrixColumn() [8/8]

Gudhi::persistence_matrix::PersistenceMatrixColumn::PersistenceMatrixColumn | ( | PersistenceMatrixColumn && | column | ) |

noexcept

Move constructor.

Parameters

  column | Column to move.

## Member Function Documentation

## begin() [1/2]

const_iterator Gudhi::persistence_matrix::PersistenceMatrixColumn::begin | ( |  | ) | const

noexcept

Returns a begin Entry const iterator to iterate over all entries contained in the underlying container.

Warning
  The iterators really just iterate over the underlying container. Depending of the column type, neither the content nor the order is guaranteed. See description of the actual Column class for more details.

Returns
  Entry const iterator.

## begin() [2/2]

iterator Gudhi::persistence_matrix::PersistenceMatrixColumn::begin | ( |  | ) |

noexcept

Returns a begin Entry iterator to iterate over all entries contained in the underlying container.

Warning
  The iterators really just iterate over the underlying container. Depending of the column type, neither the content nor the order is guaranteed. See description of the actual Column class for more details.

Returns
  Entry iterator.

## clear() [1/2]

void Gudhi::persistence_matrix::PersistenceMatrixColumn::clear | ( |  | ) |

Zeros/empties the column.

Only useful for base and boundary matrices. Used in Matrix::zero_column and in the reduction algorithm for the persistence barcode.

## clear() [2/2]

void Gudhi::persistence_matrix::PersistenceMatrixColumn::clear | ( | ID_index | rowIndex | ) |

Zeros the entry at given row index.

Only useful for base and boundary matrices. Used in Matrix::zero_entry and during vine swaps.

Warning
  For Vector_column, do not clear an entry that was already at zero or the results of size and is_empty will be wrong.

Parameters

  rowIndex | Row index of the entry to zero.

## end() [1/2]

const_iterator Gudhi::persistence_matrix::PersistenceMatrixColumn::end | ( |  | ) | const

noexcept

Returns an end Entry const iterator, iterating over all entries contained in the underlying container.

Warning
  The iterators really just iterate over the underlying container. Depending of the column type, neither the content nor the order is guaranteed. See description of the actual Column class for more details.

Returns
  Entry const iterator.

## end() [2/2]

iterator Gudhi::persistence_matrix::PersistenceMatrixColumn::end | ( |  | ) |

noexcept

Returns an end Entry iterator, iterating over all entries contained in the underlying container.

Warning
  The iterators really just iterate over the underlying container. Depending of the column type, neither the content nor the order is guaranteed. See description of the actual Column class for more details.

Returns
  Entry iterator.

## get_content()

std::vector< Field_element > Gudhi::persistence_matrix::PersistenceMatrixColumn::get_content | ( | int | columnLength = -1 | ) | const

Returns the values of the column, zero values included.

Parameters

  columnLength | Number of rows to be returned. If -1, the number of rows is fixed at the biggest row index with non zero value. Default value: -1.

Returns
  Vector of Field_element. At element \( i \) of the vector will be stored the value at row \( i \) of the column.

## get_pivot()

ID_index Gudhi::persistence_matrix::PersistenceMatrixColumn::get_pivot | ( |  | ) |

Returns the row index of the pivot. If the column does not have a pivot, returns null index.

Only useful for boundary and chain matrices.

Returns
  Row index of the pivot or null index.

## get_pivot_value()

Field_element Gudhi::persistence_matrix::PersistenceMatrixColumn::get_pivot_value | ( |  | ) |

Returns the value of the pivot. If the column does not have a pivot, returns 0.

Has to have value 1 if \( Z_2 \) coefficients are used.

Only useful for boundary and chain matrices.

Returns
  The value of the pivot or 0.

## is_empty()

bool Gudhi::persistence_matrix::PersistenceMatrixColumn::is_empty | ( |  | ) |

Indicates if the column is empty or has only zero values.

Returns
  true If the column is empty or only has zero values.
  false Otherwise.

## is_non_zero()

bool Gudhi::persistence_matrix::PersistenceMatrixColumn::is_non_zero | ( | ID_index | rowIndex | ) | const

Indicates if the entry at given row index has value zero.

Parameters

  rowIndex | Row index to look at.

Returns
  true If the entry has value zero.
  false Otherwise.

## multiply_source_and_add()

template<class Entry_range>

PersistenceMatrixColumn & Gudhi::persistence_matrix::PersistenceMatrixColumn::multiply_source_and_add | ( | const Entry_range & | column,
|  | const Field_element & | val )

this = this + column * val

Template Parameters

  Entry_range | Entry range with begin() and end() method. Has to be ordered by row index if not specified otherwise.

Parameters

  column | Entry range. Only the stored row index and the stored element value (if PersistenceMatrixOptions::is_z2 is false) are token into account for this method. Even if PersistenceMatrixOptions::has_row_access is true, the column index does not need to be correct.
  val | Value to multiply.

Returns
  Reference to this column.

## multiply_target_and_add()

template<class Entry_range>

PersistenceMatrixColumn & Gudhi::persistence_matrix::PersistenceMatrixColumn::multiply_target_and_add | ( | const Field_element & | val,
|  | const Entry_range & | column )

this = val * this + column

Template Parameters

  Entry_range | Entry range with begin() and end() method. Has to be ordered by row index if not specified otherwise.

Parameters

  val | Value to multiply.
  column | Entry range. Only the stored row index and the stored element value (if PersistenceMatrixOptions::is_z2 is false) are token into account for this method. Even if PersistenceMatrixOptions::has_row_access is true, the column index does not need to be correct.

Returns
  Reference to this column.

## operator*=()

PersistenceMatrixColumn & Gudhi::persistence_matrix::PersistenceMatrixColumn::operator*= | ( | const Field_element & | val | ) |

Multiplies all values in the column with the given value.

Parameters

  val | Value to multiply.

Returns
  Reference to this column.

## operator+=() [1/2]

template<class Entry_range>

PersistenceMatrixColumn & Gudhi::persistence_matrix::PersistenceMatrixColumn::operator+= | ( | const Entry_range & | column | ) |

Adds the given Entry range onto the column.

Template Parameters

  Entry_range | Entry range with begin() and end() method. Has to be ordered by row index if not specified otherwise.

Parameters

  column | Entry range. Only the stored row index and the stored element value (if PersistenceMatrixOptions::is_z2 is false) are token into account for this method. Even if PersistenceMatrixOptions::has_row_access is true, the column index does not need to be correct.

Returns
  Reference to this column.

## operator+=() [2/2]

PersistenceMatrixColumn & Gudhi::persistence_matrix::PersistenceMatrixColumn::operator+= | ( | PersistenceMatrixColumn & | column | ) |

Adds the given column onto this column.

Parameters

  column | Column to add.

Returns
  Reference to this column.

## push_back()

void Gudhi::persistence_matrix::PersistenceMatrixColumn::push_back | ( | const Entry & | entry | ) |

Adds a copy of the given entry at the end of the column. It is therefore assumed that the row index of the entry is higher than the current pivot of the column. Not available for chain matrices and is only needed for RU matrices.

Parameters

  entry | Entry to push back.

## rbegin() [1/2]

const_reverse_iterator Gudhi::persistence_matrix::PersistenceMatrixColumn::rbegin | ( |  | ) | const

noexcept

Returns a begin Entry const reverse iterator to iterate over all entries contained in the underlying container.

Warning
  The iterators really just iterate over the underlying container. Depending of the column type, neither the content nor the order is guaranteed. See description of the actual Column class for more details.

Returns
  Entry const reverse iterator.

## rbegin() [2/2]

reverse_iterator Gudhi::persistence_matrix::PersistenceMatrixColumn::rbegin | ( |  | ) |

noexcept

Returns a begin Entry reverse iterator to iterate over all entries contained in the underlying container.

Warning
  The iterators really just iterate over the underlying container. Depending of the column type, neither the content nor the order is guaranteed. See description of the actual Column class for more details.

Returns
  Entry reverse iterator.

## rend() [1/2]

const_reverse_iterator Gudhi::persistence_matrix::PersistenceMatrixColumn::rend | ( |  | ) | const

noexcept

Returns an end Entry const reverse iterator, iterating over all entries contained in the underlying container.

Warning
  The iterators really just iterate over the underlying container. Depending of the column type, neither the content nor the order is guaranteed. See description of the actual Column class for more details.

Returns
  Entry const reverse iterator.

## rend() [2/2]

reverse_iterator Gudhi::persistence_matrix::PersistenceMatrixColumn::rend | ( |  | ) |

noexcept

Returns an end Entry reverse iterator, iterating over all entries contained in the underlying container.

Warning
  The iterators really just iterate over the underlying container. Depending of the column type, neither the content nor the order is guaranteed. See description of the actual Column class for more details.

Returns
  Entry reverse iterator.

## reorder()

template<class Row_index_map>

void Gudhi::persistence_matrix::PersistenceMatrixColumn::reorder | ( | const Row_index_map & | valueMap,
|  | Index | columnIndex = Matrix::get_null_value< Index >() )

Reorders the column with the given map of row indices. Also changes the column index stored in the entries if row access is enabled and `columnIndex` is not the null index.

Only useful for base and boundary matrices using lazy swaps.

Template Parameters

  Row_index_map | Map with an at() method.

Parameters

  valueMap | Map such that valueMap.at(i) indicates the new row index of the entry at current row index i.
  columnIndex | New MatIdx column index of the column. If null index, the index does not change. Ignored if the row access is not enabled. Default value: null index.

## size()

std::size_t Gudhi::persistence_matrix::PersistenceMatrixColumn::size | ( |  | ) | const

Returns the size of the underlying container.

Warning
  Depending of the column type, the container does not have to contain only the non-zero entries. Even if for most of the types, the size of the container will correspond to the number of non-zero values in the column, it is not always the case. See description of the actual Column class for more details.

Returns
  Size of the underlying container.

## Friends And Related Symbol Documentation

## operator<

bool operator< | ( | const PersistenceMatrixColumn & | c1,
|  | const PersistenceMatrixColumn & | c2 )

friend

"Strictly smaller than" comparator. Usually a lexicographical order, but what matters is that the order is total. The order should apply on what is "supposed" to be contained in the columns, not what is actually stored in the underlying container. For example, the underlying container of Vector_column can contain entries which were erased explicitly by clear(Index). Those entries should not be taken into account while comparing.

Parameters

  c1 | First column to compare.
  c2 | Second column to compare.

Returns
  true If the first column is strictly smaller than the second one.
  false Otherwise.

## operator==

bool operator== | ( | const PersistenceMatrixColumn & | c1,
|  | const PersistenceMatrixColumn & | c2 )

friend

Equality comparator. Equal in the sense that what is "supposed" to be contained in the columns is equal, not what is actually stored in the underlying container. For example, the underlying container of Vector_column can contain entries which were erased explicitly by clear(Index). Those entries should not be taken into account while comparing.

Parameters

  c1 | First column to compare.
  c2 | Second column to compare.

Returns
  true If both column are equal.
  false Otherwise.

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

- concept/Persistence_matrix/PersistenceMatrixColumn.h