Loading...
Searching...
No Matches
Position_to_index_overlay.h
Go to the documentation of this file.
/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT.
* See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details.
* Author(s): Hannah Schreiber
*
* Copyright (C) 2022-24 Inria
*
* Modification(s):
* - YYYY/MM Author: Description of the modification
*/
#ifndef PM_POS_TO_ID_TRANSLATION_H
#define PM_POS_TO_ID_TRANSLATION_H
#include <vector>
#include <utility> //std::swap, std::move & std::exchange
#include <algorithm> //std::transform
namespace Gudhi {
namespace persistence_matrix {
template <class Underlying_matrix, class Master_matrix>
class Position_to_index_overlay
{
public:
using Index = typename Master_matrix::Index;
using ID_index = typename Master_matrix::ID_index;
using Pos_index = typename Master_matrix::Pos_index;
using Dimension = typename Master_matrix::Dimension;
using Field_operators = typename Master_matrix::Field_operators;
using Field_element = typename Master_matrix::Element;
using Boundary = typename Master_matrix::Boundary;
using Column = typename Master_matrix::Column;
using Row = typename Master_matrix::Row;
using Bar = typename Master_matrix::Bar;
using Barcode = typename Master_matrix::Barcode;
using Cycle = typename Master_matrix::Cycle;
using Entry_representative = typename Master_matrix::Entry_representative;
using Entry_constructor = typename Master_matrix::Entry_constructor;
using Column_settings = typename Master_matrix::Column_settings;
Position_to_index_overlay(Column_settings* colSettings);
template <class Boundary_range = Boundary>
Position_to_index_overlay(const std::vector<Boundary_range>& orderedBoundaries,
Column_settings* colSettings);
Position_to_index_overlay(unsigned int numberOfColumns,
Column_settings* colSettings);
template <typename BirthComparatorFunction, typename DeathComparatorFunction>
Position_to_index_overlay(Column_settings* colSettings,
const BirthComparatorFunction& birthComparator,
const DeathComparatorFunction& deathComparator);
template <typename BirthComparatorFunction, typename DeathComparatorFunction, class Boundary_range>
Position_to_index_overlay(const std::vector<Boundary_range>& orderedBoundaries,
Column_settings* colSettings,
const BirthComparatorFunction& birthComparator,
const DeathComparatorFunction& deathComparator);
template <typename BirthComparatorFunction, typename DeathComparatorFunction>
Position_to_index_overlay(unsigned int numberOfColumns,
Column_settings* colSettings,
const BirthComparatorFunction& birthComparator,
const DeathComparatorFunction& deathComparator);
Position_to_index_overlay(const Position_to_index_overlay& matrixToCopy,
Column_settings* colSettings = nullptr);
Position_to_index_overlay(Position_to_index_overlay&& other) noexcept;
template <class Boundary_range = Boundary>
void insert_boundary(const Boundary_range& boundary,
Dimension dim = Master_matrix::template get_null_value<Dimension>());
template <class Boundary_range = Boundary>
void insert_boundary(ID_index cellIndex, const Boundary_range& boundary,
Dimension dim = Master_matrix::template get_null_value<Dimension>());
Column& get_column(Pos_index position);
const Column& get_column(Pos_index position) const;
Row& get_row(ID_index rowIndex);
const Row& get_row(ID_index rowIndex) const;
void erase_empty_row(ID_index rowIndex);
void remove_maximal_cell(Pos_index position);
void remove_last();
Dimension get_max_dimension() const;
Index get_number_of_columns() const;
Dimension get_column_dimension(Pos_index position) const;
void add_to(Pos_index sourcePosition, Pos_index targetPosition);
void multiply_target_and_add_to(Pos_index sourcePosition,
const Field_element& coefficient,
Pos_index targetPosition);
void multiply_source_and_add_to(const Field_element& coefficient,
Pos_index sourcePosition,
Pos_index targetPosition);
bool is_zero_entry(Pos_index position, ID_index rowIndex) const;
bool is_zero_column(Pos_index position);
Pos_index get_column_with_pivot(ID_index cellIndex) const; // assumes that pivot exists
ID_index get_pivot(Pos_index position);
void reset(Column_settings* colSettings) {
matrix_.reset(colSettings);
positionToIndex_.clear();
nextPosition_ = 0;
nextIndex_ = 0;
}
// void set_operators(Field_operators* operators) { matrix_.set_operators(operators); }
Position_to_index_overlay& operator=(const Position_to_index_overlay& other);
friend void swap(Position_to_index_overlay& matrix1, Position_to_index_overlay& matrix2) {
swap(matrix1.matrix_, matrix2.matrix_);
matrix1.positionToIndex_.swap(matrix2.positionToIndex_);
std::swap(matrix1.nextPosition_, matrix2.nextPosition_);
std::swap(matrix1.nextIndex_, matrix2.nextIndex_);
}
void print(); // for debug
// access to optional methods
const Barcode& get_current_barcode() const;
void update_representative_cycles();
const std::vector<Cycle>& get_representative_cycles();
const Cycle& get_representative_cycle(const Bar& bar);
bool vine_swap_with_z_eq_1_case(Pos_index position);
bool vine_swap(Pos_index position);
private:
Underlying_matrix matrix_;
std::vector<Index> positionToIndex_;
Pos_index nextPosition_;
Index nextIndex_;
};
template <class Underlying_matrix, class Master_matrix>
inline Position_to_index_overlay<Underlying_matrix, Master_matrix>::Position_to_index_overlay(
Column_settings* colSettings)
: matrix_(colSettings), nextPosition_(0), nextIndex_(0)
{}
template <class Underlying_matrix, class Master_matrix>
template <class Boundary_range>
inline Position_to_index_overlay<Underlying_matrix, Master_matrix>::Position_to_index_overlay(
const std::vector<Boundary_range>& orderedBoundaries, Column_settings* colSettings)
: matrix_(orderedBoundaries, colSettings),
positionToIndex_(orderedBoundaries.size()),
nextPosition_(orderedBoundaries.size()),
nextIndex_(orderedBoundaries.size())
{
for (Index i = 0; i < orderedBoundaries.size(); i++) {
positionToIndex_[i] = i;
}
}
template <class Underlying_matrix, class Master_matrix>
inline Position_to_index_overlay<Underlying_matrix, Master_matrix>::Position_to_index_overlay(
unsigned int numberOfColumns, Column_settings* colSettings)
: matrix_(numberOfColumns, colSettings),
positionToIndex_(numberOfColumns),
nextPosition_(0),
nextIndex_(0)
{}
template <class Underlying_matrix, class Master_matrix>
template <typename BirthComparatorFunction, typename DeathComparatorFunction>
inline Position_to_index_overlay<Underlying_matrix, Master_matrix>::Position_to_index_overlay(
Column_settings* colSettings,
const BirthComparatorFunction& birthComparator,
const DeathComparatorFunction& deathComparator)
: matrix_(colSettings, birthComparator, deathComparator), nextPosition_(0), nextIndex_(0)
{}
template <class Underlying_matrix, class Master_matrix>
template <typename BirthComparatorFunction, typename DeathComparatorFunction, class Boundary_range>
inline Position_to_index_overlay<Underlying_matrix, Master_matrix>::Position_to_index_overlay(
const std::vector<Boundary_range>& orderedBoundaries,
Column_settings* colSettings,
const BirthComparatorFunction& birthComparator,
const DeathComparatorFunction& deathComparator)
: matrix_(orderedBoundaries, colSettings, birthComparator, deathComparator),
positionToIndex_(orderedBoundaries.size()),
nextPosition_(orderedBoundaries.size()),
nextIndex_(orderedBoundaries.size())
{
for (Index i = 0; i < orderedBoundaries.size(); i++) {
positionToIndex_[i] = i;
}
}
template <class Underlying_matrix, class Master_matrix>
template <typename BirthComparatorFunction, typename DeathComparatorFunction>
inline Position_to_index_overlay<Underlying_matrix, Master_matrix>::Position_to_index_overlay(
unsigned int numberOfColumns,
Column_settings* colSettings,
const BirthComparatorFunction& birthComparator,
const DeathComparatorFunction& deathComparator)
: matrix_(numberOfColumns, colSettings, birthComparator, deathComparator),
positionToIndex_(numberOfColumns),
nextPosition_(0),
nextIndex_(0)
{}
template <class Underlying_matrix, class Master_matrix>
inline Position_to_index_overlay<Underlying_matrix, Master_matrix>::Position_to_index_overlay(
const Position_to_index_overlay& matrixToCopy, Column_settings* colSettings)
: matrix_(matrixToCopy.matrix_, colSettings),
positionToIndex_(matrixToCopy.positionToIndex_),
nextPosition_(matrixToCopy.nextPosition_),
nextIndex_(matrixToCopy.nextIndex_)
{}
template <class Underlying_matrix, class Master_matrix>
inline Position_to_index_overlay<Underlying_matrix, Master_matrix>::Position_to_index_overlay(
Position_to_index_overlay&& other) noexcept
: matrix_(std::move(other.matrix_)),
positionToIndex_(std::move(other.positionToIndex_)),
nextPosition_(std::exchange(other.nextPosition_, 0)),
nextIndex_(std::exchange(other.nextIndex_, 0))
{}
template <class Underlying_matrix, class Master_matrix>
template <class Boundary_range>
inline void Position_to_index_overlay<Underlying_matrix, Master_matrix>::insert_boundary(const Boundary_range& boundary,
Dimension dim)
{
if (positionToIndex_.size() <= nextPosition_) {
positionToIndex_.resize(nextPosition_ * 2 + 1);
}
positionToIndex_[nextPosition_++] = nextIndex_++;
matrix_.insert_boundary(boundary, dim);
}
template <class Underlying_matrix, class Master_matrix>
template <class Boundary_range>
inline void Position_to_index_overlay<Underlying_matrix, Master_matrix>::insert_boundary(ID_index cellIndex,
const Boundary_range& boundary,
Dimension dim)
{
if (positionToIndex_.size() <= nextPosition_) {
positionToIndex_.resize(nextPosition_ * 2 + 1);
}
positionToIndex_[nextPosition_++] = nextIndex_++;
matrix_.insert_boundary(cellIndex, boundary, dim);
}
template <class Underlying_matrix, class Master_matrix>
inline typename Position_to_index_overlay<Underlying_matrix, Master_matrix>::Column&
Position_to_index_overlay<Underlying_matrix, Master_matrix>::get_column(Pos_index position)
{
return matrix_.get_column(positionToIndex_[position]);
}
template <class Underlying_matrix, class Master_matrix>
inline const typename Position_to_index_overlay<Underlying_matrix, Master_matrix>::Column&
Position_to_index_overlay<Underlying_matrix, Master_matrix>::get_column(Pos_index position) const
{
return matrix_.get_column(positionToIndex_[position]);
}
template <class Underlying_matrix, class Master_matrix>
inline typename Position_to_index_overlay<Underlying_matrix, Master_matrix>::Row&
Position_to_index_overlay<Underlying_matrix, Master_matrix>::get_row(ID_index rowIndex)
{
return matrix_.get_row(rowIndex);
}
template <class Underlying_matrix, class Master_matrix>
inline const typename Position_to_index_overlay<Underlying_matrix, Master_matrix>::Row&
Position_to_index_overlay<Underlying_matrix, Master_matrix>::get_row(ID_index rowIndex) const
{
return matrix_.get_row(rowIndex);
}
template <class Underlying_matrix, class Master_matrix>
inline void Position_to_index_overlay<Underlying_matrix, Master_matrix>::erase_empty_row(ID_index rowIndex)
{
return matrix_.erase_empty_row(rowIndex);
}
template <class Underlying_matrix, class Master_matrix>
inline void Position_to_index_overlay<Underlying_matrix, Master_matrix>::remove_maximal_cell(Pos_index position)
{
--nextPosition_;
ID_index pivot = matrix_.get_pivot(positionToIndex_[position]);
std::vector<Index> columnsToSwap(nextPosition_ - position);
if (nextPosition_ != position) {
positionToIndex_[position] = positionToIndex_[position + 1];
for (Pos_index p = position + 1; p < nextPosition_; ++p) {
columnsToSwap[p - position - 1] = positionToIndex_[p];
positionToIndex_[p] = positionToIndex_[p + 1];
}
columnsToSwap.back() = positionToIndex_[nextPosition_];
}
matrix_.remove_maximal_cell(pivot, columnsToSwap);
}
template <class Underlying_matrix, class Master_matrix>
inline void Position_to_index_overlay<Underlying_matrix, Master_matrix>::remove_last()
{
--nextPosition_;
if constexpr (Master_matrix::Option_list::has_vine_update) {
std::vector<Index> columnsToSwap;
matrix_.remove_maximal_cell(matrix_.get_pivot(positionToIndex_[nextPosition_]), columnsToSwap);
} else {
matrix_.remove_last(); // linear with vine updates, so it is better to use remove_maximal_cell
}
}
template <class Underlying_matrix, class Master_matrix>
inline typename Position_to_index_overlay<Underlying_matrix, Master_matrix>::Dimension
Position_to_index_overlay<Underlying_matrix, Master_matrix>::get_max_dimension() const
{
return matrix_.get_max_dimension();
}
template <class Underlying_matrix, class Master_matrix>
inline typename Position_to_index_overlay<Underlying_matrix, Master_matrix>::Index
Position_to_index_overlay<Underlying_matrix, Master_matrix>::get_number_of_columns() const
{
return matrix_.get_number_of_columns();
}
template <class Underlying_matrix, class Master_matrix>
inline typename Position_to_index_overlay<Underlying_matrix, Master_matrix>::Dimension
Position_to_index_overlay<Underlying_matrix, Master_matrix>::get_column_dimension(Pos_index position) const
{
return matrix_.get_column_dimension(positionToIndex_[position]);
}
template <class Underlying_matrix, class Master_matrix>
inline void Position_to_index_overlay<Underlying_matrix, Master_matrix>::add_to(Pos_index sourcePosition,
Pos_index targetPosition)
{
return matrix_.add_to(positionToIndex_[sourcePosition], positionToIndex_[targetPosition]);
}
template <class Underlying_matrix, class Master_matrix>
inline void Position_to_index_overlay<Underlying_matrix, Master_matrix>::multiply_target_and_add_to(
Pos_index sourcePosition, const Field_element& coefficient, Pos_index targetPosition)
{
return matrix_.multiply_target_and_add_to(positionToIndex_[sourcePosition],
coefficient,
positionToIndex_[targetPosition]);
}
template <class Underlying_matrix, class Master_matrix>
inline void Position_to_index_overlay<Underlying_matrix, Master_matrix>::multiply_source_and_add_to(
const Field_element& coefficient, Pos_index sourcePosition, Pos_index targetPosition)
{
return matrix_.multiply_source_and_add_to(coefficient,
positionToIndex_[sourcePosition],
positionToIndex_[targetPosition]);
}
template <class Underlying_matrix, class Master_matrix>
inline bool Position_to_index_overlay<Underlying_matrix, Master_matrix>::is_zero_entry(Pos_index position,
ID_index rowIndex) const
{
return matrix_.is_zero_entry(positionToIndex_[position], rowIndex);
}
template <class Underlying_matrix, class Master_matrix>
inline bool Position_to_index_overlay<Underlying_matrix, Master_matrix>::is_zero_column(Pos_index position)
{
return matrix_.is_zero_column(positionToIndex_[position]);
}
template <class Underlying_matrix, class Master_matrix>
inline typename Position_to_index_overlay<Underlying_matrix, Master_matrix>::Pos_index
Position_to_index_overlay<Underlying_matrix, Master_matrix>::get_column_with_pivot(ID_index cellIndex) const
{
Index id = matrix_.get_column_with_pivot(cellIndex);
Pos_index i = 0;
while (positionToIndex_[i] != id) ++i;
return i;
}
template <class Underlying_matrix, class Master_matrix>
inline typename Position_to_index_overlay<Underlying_matrix, Master_matrix>::ID_index
Position_to_index_overlay<Underlying_matrix, Master_matrix>::get_pivot(Pos_index position)
{
return matrix_.get_pivot(positionToIndex_[position]);
}
template <class Underlying_matrix, class Master_matrix>
inline Position_to_index_overlay<Underlying_matrix, Master_matrix>&
Position_to_index_overlay<Underlying_matrix, Master_matrix>::operator=(const Position_to_index_overlay& other)
{
matrix_ = other.matrix_;
positionToIndex_ = other.positionToIndex_;
nextPosition_ = other.nextPosition_;
nextIndex_ = other.nextIndex_;
return *this;
}
template <class Underlying_matrix, class Master_matrix>
inline void Position_to_index_overlay<Underlying_matrix, Master_matrix>::print()
{
return matrix_.print();
}
template <class Underlying_matrix, class Master_matrix>
inline const typename Position_to_index_overlay<Underlying_matrix, Master_matrix>::Barcode&
Position_to_index_overlay<Underlying_matrix, Master_matrix>::get_current_barcode() const
{
return matrix_.get_current_barcode();
}
template <class Underlying_matrix, class Master_matrix>
inline void Position_to_index_overlay<Underlying_matrix, Master_matrix>::update_representative_cycles()
{
matrix_.update_representative_cycles();
}
template <class Underlying_matrix, class Master_matrix>
inline const std::vector<typename Position_to_index_overlay<Underlying_matrix, Master_matrix>::Cycle>&
Position_to_index_overlay<Underlying_matrix, Master_matrix>::get_representative_cycles()
{
return matrix_.get_representative_cycles();
}
template <class Underlying_matrix, class Master_matrix>
inline const typename Position_to_index_overlay<Underlying_matrix, Master_matrix>::Cycle&
Position_to_index_overlay<Underlying_matrix, Master_matrix>::get_representative_cycle(const Bar& bar)
{
return matrix_.get_representative_cycle(bar);
}
template <class Underlying_matrix, class Master_matrix>
inline bool Position_to_index_overlay<Underlying_matrix, Master_matrix>::vine_swap_with_z_eq_1_case(Pos_index position)
{
Index next = matrix_.vine_swap_with_z_eq_1_case(positionToIndex_[position], positionToIndex_[position + 1]);
if (next == positionToIndex_[position]) {
std::swap(positionToIndex_[position], positionToIndex_[position + 1]);
return true;
}
return false;
}
template <class Underlying_matrix, class Master_matrix>
inline bool Position_to_index_overlay<Underlying_matrix, Master_matrix>::vine_swap(Pos_index position)
{
Index next = matrix_.vine_swap(positionToIndex_[position], positionToIndex_[position + 1]);
if (next == positionToIndex_[position]) {
std::swap(positionToIndex_[position], positionToIndex_[position + 1]);
return true;
}
return false;
}
} // namespace persistence_matrix
} // namespace Gudhi
#endif // PM_POS_TO_ID_TRANSLATION_H
Gudhi::persistence_matrix::Position_to_index_overlay
Overlay for chain matrices replacing all input and output MatIdx indices of the original methods with...
Definition Position_to_index_overlay.h:40
Gudhi::persistence_matrix::Position_to_index_overlay::is_zero_entry
bool is_zero_entry(Pos_index position, ID_index rowIndex) const
Indicates if the entry at given coordinates has value zero.
Definition Position_to_index_overlay.h:760
Gudhi::persistence_matrix::Position_to_index_overlay::Index
typename Master_matrix::Index Index
Definition Position_to_index_overlay.h:42
Gudhi::persistence_matrix::Position_to_index_overlay::get_representative_cycles
const std::vector< Cycle > & get_representative_cycles()
Only available if PersistenceMatrixOptions::can_retrieve_representative_cycles is true....
Definition Position_to_index_overlay.h:822
Gudhi::persistence_matrix::Position_to_index_overlay::swap
friend void swap(Position_to_index_overlay &matrix1, Position_to_index_overlay &matrix2)
Swap operator.
Definition Position_to_index_overlay.h:454
Gudhi::persistence_matrix::Position_to_index_overlay::Row
typename Master_matrix::Row Row
Definition Position_to_index_overlay.h:53
Gudhi::persistence_matrix::Position_to_index_overlay::get_number_of_columns
Index get_number_of_columns() const
Returns the current number of columns in the matrix.
Definition Position_to_index_overlay.h:722
Gudhi::persistence_matrix::Position_to_index_overlay::Entry_representative
typename Master_matrix::Entry_representative Entry_representative
Definition Position_to_index_overlay.h:58
Gudhi::persistence_matrix::Position_to_index_overlay::get_column_dimension
Dimension get_column_dimension(Pos_index position) const
Returns the dimension of the given cell.
Definition Position_to_index_overlay.h:729
Gudhi::persistence_matrix::Position_to_index_overlay::Cycle
typename Master_matrix::Cycle Cycle
Definition Position_to_index_overlay.h:57
Gudhi::persistence_matrix::Position_to_index_overlay::get_representative_cycle
const Cycle & get_representative_cycle(const Bar &bar)
Only available if PersistenceMatrixOptions::can_retrieve_representative_cycles is true....
Definition Position_to_index_overlay.h:829
Gudhi::persistence_matrix::Position_to_index_overlay::get_max_dimension
Dimension get_max_dimension() const
Returns the maximal dimension of a cell stored in the matrix. Only available if PersistenceMatrixOpti...
Definition Position_to_index_overlay.h:715
Gudhi::persistence_matrix::Position_to_index_overlay::Field_operators
typename Master_matrix::Field_operators Field_operators
Field operators class. Necessary only if PersistenceMatrixOptions::is_z2 is false.
Definition Position_to_index_overlay.h:49
Gudhi::persistence_matrix::Position_to_index_overlay::Field_element
typename Master_matrix::Element Field_element
Definition Position_to_index_overlay.h:50
Gudhi::persistence_matrix::Position_to_index_overlay::insert_boundary
void insert_boundary(const Boundary_range &boundary, Dimension dim=Master_matrix::template get_null_value< Dimension >())
Inserts at the end of the matrix a new ordered column corresponding to the given boundary....
Definition Position_to_index_overlay.h:620
Gudhi::persistence_matrix::Position_to_index_overlay::erase_empty_row
void erase_empty_row(ID_index rowIndex)
Only available if PersistenceMatrixOptions::has_row_access and PersistenceMatrixOptions::has_removabl...
Definition Position_to_index_overlay.h:676
Gudhi::persistence_matrix::Position_to_index_overlay::get_current_barcode
const Barcode & get_current_barcode() const
Returns the current barcode of the matrix. Available only if PersistenceMatrixOptions::has_column_pai...
Definition Position_to_index_overlay.h:809
Gudhi::persistence_matrix::Position_to_index_overlay::Barcode
typename Master_matrix::Barcode Barcode
Definition Position_to_index_overlay.h:56
Gudhi::persistence_matrix::Position_to_index_overlay::is_zero_column
bool is_zero_column(Pos_index position)
Indicates if the column at given index has value zero.
Definition Position_to_index_overlay.h:767
Gudhi::persistence_matrix::Position_to_index_overlay::multiply_target_and_add_to
void multiply_target_and_add_to(Pos_index sourcePosition, const Field_element &coefficient, Pos_index targetPosition)
Multiplies the target column with the coefficient and then adds the source column to it....
Definition Position_to_index_overlay.h:742
Gudhi::persistence_matrix::Position_to_index_overlay::update_representative_cycles
void update_representative_cycles()
Only available if PersistenceMatrixOptions::can_retrieve_representative_cycles is true....
Definition Position_to_index_overlay.h:815
Gudhi::persistence_matrix::Position_to_index_overlay::Pos_index
typename Master_matrix::Pos_index Pos_index
Definition Position_to_index_overlay.h:44
Gudhi::persistence_matrix::Position_to_index_overlay::Position_to_index_overlay
Position_to_index_overlay(Column_settings *colSettings)
Constructs an empty matrix.
Definition Position_to_index_overlay.h:533
Gudhi::persistence_matrix::Position_to_index_overlay::get_pivot
ID_index get_pivot(Pos_index position)
Returns the row index of the pivot of the given column.
Definition Position_to_index_overlay.h:784
Gudhi::persistence_matrix::Position_to_index_overlay::ID_index
typename Master_matrix::ID_index ID_index
Definition Position_to_index_overlay.h:43
Gudhi::persistence_matrix::Position_to_index_overlay::add_to
void add_to(Pos_index sourcePosition, Pos_index targetPosition)
Adds column corresponding to sourcePosition onto the column corresponding to targetPosition.
Definition Position_to_index_overlay.h:735
Gudhi::persistence_matrix::Position_to_index_overlay::remove_maximal_cell
void remove_maximal_cell(Pos_index position)
Only available if PersistenceMatrixOptions::has_removable_columns, PersistenceMatrixOptions::has_vine...
Definition Position_to_index_overlay.h:682
Gudhi::persistence_matrix::Position_to_index_overlay::reset
void reset(Column_settings *colSettings)
Resets the matrix to an empty matrix.
Definition Position_to_index_overlay.h:438
Gudhi::persistence_matrix::Position_to_index_overlay::Column_settings
typename Master_matrix::Column_settings Column_settings
Definition Position_to_index_overlay.h:60
Gudhi::persistence_matrix::Position_to_index_overlay::remove_last
void remove_last()
Only available if PersistenceMatrixOptions::has_removable_columns is true and, if PersistenceMatrixOp...
Definition Position_to_index_overlay.h:702
Gudhi::persistence_matrix::Position_to_index_overlay::get_row
Row & get_row(ID_index rowIndex)
Only available if PersistenceMatrixOptions::has_row_access is true. Returns the row at the given row ...
Definition Position_to_index_overlay.h:663
Gudhi::persistence_matrix::Position_to_index_overlay::Entry_constructor
typename Master_matrix::Entry_constructor Entry_constructor
Definition Position_to_index_overlay.h:59
Gudhi::persistence_matrix::Position_to_index_overlay::Bar
typename Master_matrix::Bar Bar
Definition Position_to_index_overlay.h:55
Gudhi::persistence_matrix::Position_to_index_overlay::Dimension
typename Master_matrix::Dimension Dimension
Definition Position_to_index_overlay.h:45
Gudhi::persistence_matrix::Position_to_index_overlay::Column
typename Master_matrix::Column Column
Definition Position_to_index_overlay.h:52
Gudhi::persistence_matrix::Position_to_index_overlay::Boundary
typename Master_matrix::Boundary Boundary
Definition Position_to_index_overlay.h:51
Gudhi::persistence_matrix::Position_to_index_overlay::operator=
Position_to_index_overlay & operator=(const Position_to_index_overlay &other)
Assign operator.
Definition Position_to_index_overlay.h:791
Gudhi::persistence_matrix::Position_to_index_overlay::multiply_source_and_add_to
void multiply_source_and_add_to(const Field_element &coefficient, Pos_index sourcePosition, Pos_index targetPosition)
Multiplies the source column with the coefficient before adding it to the target column....
Definition Position_to_index_overlay.h:751
Gudhi::persistence_matrix::Position_to_index_overlay::get_column
Column & get_column(Pos_index position)
Returns the column at the given PosIdx index. The type of the column depends on the chosen options,...
Definition Position_to_index_overlay.h:649
Gudhi::persistence_matrix::Position_to_index_overlay::get_column_with_pivot
Pos_index get_column_with_pivot(ID_index cellIndex) const
Returns the PosIdx index of the column which has the given row index as pivot. Assumes that the pivot...
Definition Position_to_index_overlay.h:774
Gudhi::persistence_matrix::Position_to_index_overlay::vine_swap_with_z_eq_1_case
bool vine_swap_with_z_eq_1_case(Pos_index position)
Only available if PersistenceMatrixOptions::has_vine_update is true. Does the same than vine_swap,...
Definition Position_to_index_overlay.h:835
Gudhi::persistence_matrix::Position_to_index_overlay::vine_swap
bool vine_swap(Pos_index position)
Only available if PersistenceMatrixOptions::has_vine_update is true. Does a vine swap between two cel...
Definition Position_to_index_overlay.h:847
Gudhi::persistence_matrix
Persistence matrix namespace.
Definition FieldOperators.h:18
Gudhi
Gudhi namespace.
Definition SimplicialComplexForAlpha.h:14