18#ifndef PM_CHAIN_COLUMN_PROP_H
19#define PM_CHAIN_COLUMN_PROP_H
24namespace persistence_matrix {
55template <
class Master_matrix>
59 using Index =
typename Master_matrix::Index;
60 using ID_index =
typename Master_matrix::ID_index;
67 : pivot_(Master_matrix::template get_null_value<
ID_index>()),
68 pairedColumn_(Master_matrix::template get_null_value<
Index>()) {}
77 : pivot_(pivot), pairedColumn_(Master_matrix::template get_null_value<
Index>()) {}
92 : pivot_(col.pivot_), pairedColumn_(col.pairedColumn_) {}
99 : pivot_(
std::exchange(col.pivot_, Master_matrix::template get_null_value<
ID_index>())),
100 pairedColumn_(
std::exchange(col.pairedColumn_, Master_matrix::template get_null_value<
Index>())) {}
116 bool is_paired()
const {
return pairedColumn_ != Master_matrix::template get_null_value<Index>(); }
132 pivot_ = other.pivot_;
133 pairedColumn_ = other.pairedColumn_;
140 std::swap(col1.pivot_, col2.pivot_);
141 std::swap(col1.pairedColumn_, col2.pairedColumn_);
145 ID_index get_pivot()
const {
return pivot_; }
Class managing the pivot and partitioning of columns in Chain_matrix.
Definition: chain_column_extra_properties.h:57
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:85
void assign_paired_chain(Index other_col)
Sets the value of the pair.
Definition: chain_column_extra_properties.h:122
void unassign_paired_chain()
Un-pairs a column.
Definition: chain_column_extra_properties.h:126
bool is_paired() const
Indicates if the column is paired or not.
Definition: chain_column_extra_properties.h:116
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:109
Chain_column_extra_properties(const Chain_column_extra_properties &col)
Copy constructor.
Definition: chain_column_extra_properties.h:91
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:76
friend void swap(Chain_column_extra_properties &col1, Chain_column_extra_properties &col2)
Swap operator.
Definition: chain_column_extra_properties.h:139
typename Master_matrix::Index Index
Definition: chain_column_extra_properties.h:59
Chain_column_extra_properties & operator=(const Chain_column_extra_properties &other)
Assign operator.
Definition: chain_column_extra_properties.h:131
typename Master_matrix::ID_index ID_index
Definition: chain_column_extra_properties.h:60
Chain_column_extra_properties(Chain_column_extra_properties &&col)
Move constructor.
Definition: chain_column_extra_properties.h:98
Chain_column_extra_properties()
Default constructor. Sets the pivot and pair to null index, which means "not existing".
Definition: chain_column_extra_properties.h:66
Gudhi namespace.
Definition: SimplicialComplexForAlpha.h:14
Empty structure. Inherited instead of Chain_column_extra_properties, when the columns are not meant f...
Definition: chain_column_extra_properties.h:34