18#ifndef PM_CHAIN_COLUMN_PROP_H
19#define PM_CHAIN_COLUMN_PROP_H
33struct Dummy_chain_properties {
34 Dummy_chain_properties([[maybe_unused]]
int pivot = 0, [[maybe_unused]]
int pair = 0) {}
36 friend void swap([[maybe_unused]] Dummy_chain_properties& col1,
37 [[maybe_unused]] Dummy_chain_properties& col2)
noexcept
56template <
class Master_matrix>
60 using Index =
typename Master_matrix::Index;
61 using ID_index =
typename Master_matrix::ID_index;
68 : pivot_(Master_matrix::template get_null_value<
ID_index>()),
69 pairedColumn_(Master_matrix::template get_null_value<
Index>())
80 : pivot_(pivot), pairedColumn_(Master_matrix::template get_null_value<
Index>())
105 : pivot_(std::exchange(col.pivot_, Master_matrix::template get_null_value<ID_index>())),
106 pairedColumn_(std::exchange(col.pairedColumn_, Master_matrix::template get_null_value<Index>()))
126 bool is_paired()
const {
return pairedColumn_ != Master_matrix::template get_null_value<Index>(); }
150 if (
this == &other)
return *
this;
152 pivot_ = std::exchange(other.pivot_, Master_matrix::template get_null_value<ID_index>());
153 pairedColumn_ = std::exchange(other.pairedColumn_, Master_matrix::template get_null_value<Index>());
162 std::swap(col1.pivot_, col2.pivot_);
163 std::swap(col1.pairedColumn_, col2.pairedColumn_);
167 ID_index _get_pivot()
const {
return pivot_; }
Class managing the pivot and partitioning of columns in Chain_matrix.
Definition chain_column_extra_properties.h:58
friend void swap(Chain_column_extra_properties &col1, Chain_column_extra_properties &col2) noexcept
Swap operator.
Definition chain_column_extra_properties.h:160
Chain_column_extra_properties(ID_index pivot, Index pair)
Constructor setting the pivot and the pair at the given values.
Definition chain_column_extra_properties.h:90
void assign_paired_chain(Index other_col)
Sets the value of the pair.
Definition chain_column_extra_properties.h:133
void unassign_paired_chain()
Un-pairs a column.
Definition chain_column_extra_properties.h:138
bool is_paired() const
Indicates if the column is paired or not.
Definition chain_column_extra_properties.h:126
Index get_paired_chain_index() const
Returns null index if the column is not paired, the MatIdx of the pair otherwise.
Definition chain_column_extra_properties.h:118
Chain_column_extra_properties(const Chain_column_extra_properties &col)=default
Copy constructor.
Chain_column_extra_properties(Chain_column_extra_properties &&col) noexcept
Move constructor.
Definition chain_column_extra_properties.h:104
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).
Definition chain_column_extra_properties.h:79
typename Master_matrix::Index Index
Definition chain_column_extra_properties.h:60
Chain_column_extra_properties & operator=(const Chain_column_extra_properties &other)=default
Assign operator.
typename Master_matrix::ID_index ID_index
Definition chain_column_extra_properties.h:61
Chain_column_extra_properties & operator=(Chain_column_extra_properties &&other) noexcept
Move assign operator.
Definition chain_column_extra_properties.h:148
Chain_column_extra_properties()
Default constructor. Sets the pivot and pair to null index, which means "not existing".
Definition chain_column_extra_properties.h:67
Persistence matrix namespace.
Definition FieldOperators.h:18
Gudhi namespace.
Definition SimplicialComplexForAlpha.h:14