Gudhi::persistence_matrix::Entry< Master_matrix > Class Template Reference

Matrix entry class. Stores by default only the row index it belongs to, but can also store its column index when the row access is enabled, as well as its value when they are different from only 0 and 1. Zero-valued entries are never made explicit in the matrix. More...

#include <gudhi/Persistence_matrix/columns/entry_types.h>

Public Types

using Master = Master_matrix
 
using Index = typename Master_matrix::Index
 
using ID_index = typename Master_matrix::ID_index
 
using Field_element = typename Master_matrix::Element
 

Public Member Functions

 Entry ()
 Constructs an entry with all attributes at default values.
 
 Entry (ID_index rowIndex)
 Constructs an entry with given row index. Other possible attributes are set at default values. More...
 
 Entry (Index columnIndex, ID_index rowIndex)
 Constructs an entry with given row and column index. Other possible attributes are set at default values. More...
 
 Entry (const Entry &entry)
 Copy constructor. More...
 
 Entry (Entry &&entry) noexcept
 Move constructor. More...
 
ID_index get_row_index () const
 Returns the row index stored in the entry. More...
 
void set_row_index (ID_index rowIndex)
 Sets the row index stored in the entry. More...
 
Entryoperator= (Entry other)
 Assign operator.
 
 operator ID_index () const
 Converts the entry into a row index. More...
 
 operator std::pair< ID_index, Field_element > () const
 Converts the entry into a pair of row index and entry value. More...
 

Friends

bool operator< (const Entry &c1, const Entry &c2)
 Strictly smaller than comparator. More...
 
bool operator== (const Entry &c1, const Entry &c2)
 Equality comparator. More...
 

Detailed Description

template<class Master_matrix>
class Gudhi::persistence_matrix::Entry< Master_matrix >

Matrix entry class. Stores by default only the row index it belongs to, but can also store its column index when the row access is enabled, as well as its value when they are different from only 0 and 1. Zero-valued entries are never made explicit in the matrix.

Template Parameters
Master_matrixAn instantiation of Matrix from which all types and options are deduced.

Member Typedef Documentation

◆ Field_element

template<class Master_matrix >
using Gudhi::persistence_matrix::Entry< Master_matrix >::Field_element = typename Master_matrix::Element

Value type.

◆ ID_index

template<class Master_matrix >
using Gudhi::persistence_matrix::Entry< Master_matrix >::ID_index = typename Master_matrix::ID_index

Row index type.

◆ Index

template<class Master_matrix >
using Gudhi::persistence_matrix::Entry< Master_matrix >::Index = typename Master_matrix::Index

Column index type.

◆ Master

template<class Master_matrix >
using Gudhi::persistence_matrix::Entry< Master_matrix >::Master = Master_matrix

Access to options from outside.

Constructor & Destructor Documentation

◆ Entry() [1/4]

template<class Master_matrix >
Gudhi::persistence_matrix::Entry< Master_matrix >::Entry ( ID_index  rowIndex)
inline

Constructs an entry with given row index. Other possible attributes are set at default values.

Parameters
rowIndexRow index of the entry.

◆ Entry() [2/4]

template<class Master_matrix >
Gudhi::persistence_matrix::Entry< Master_matrix >::Entry ( Index  columnIndex,
ID_index  rowIndex 
)
inline

Constructs an entry with given row and column index. Other possible attributes are set at default values.

Parameters
columnIndexColumn index of the entry.
rowIndexRow index of the entry.

◆ Entry() [3/4]

template<class Master_matrix >
Gudhi::persistence_matrix::Entry< Master_matrix >::Entry ( const Entry< Master_matrix > &  entry)
inline

Copy constructor.

Parameters
entryEntry to copy.

◆ Entry() [4/4]

template<class Master_matrix >
Gudhi::persistence_matrix::Entry< Master_matrix >::Entry ( Entry< Master_matrix > &&  entry)
inlinenoexcept

Move constructor.

Parameters
entryEntry to move.

Member Function Documentation

◆ get_row_index()

template<class Master_matrix >
ID_index Gudhi::persistence_matrix::Entry< Master_matrix >::get_row_index ( ) const
inline

Returns the row index stored in the entry.

Returns
Row index of the entry.

◆ operator ID_index()

template<class Master_matrix >
Gudhi::persistence_matrix::Entry< Master_matrix >::operator ID_index ( ) const
inline

Converts the entry into a row index.

Returns
The row index of the entry.

◆ operator std::pair< ID_index, Field_element >()

template<class Master_matrix >
Gudhi::persistence_matrix::Entry< Master_matrix >::operator std::pair< ID_index, Field_element > ( ) const
inline

Converts the entry into a pair of row index and entry value.

Returns
A std::pair with first element the row index and second element the value.

◆ set_row_index()

template<class Master_matrix >
void Gudhi::persistence_matrix::Entry< Master_matrix >::set_row_index ( ID_index  rowIndex)
inline

Sets the row index stored in the entry.

Parameters
rowIndexRow index of the entry.

Friends And Related Function Documentation

◆ operator<

template<class Master_matrix >
bool operator< ( const Entry< Master_matrix > &  c1,
const Entry< Master_matrix > &  c2 
)
friend

Strictly smaller than comparator.

Parameters
c1First entry to compare.
c2Second entry to compare.
Returns
true If the row index of the first entry is strictly smaller than the row index of the second entry.
false Otherwise.

◆ operator==

template<class Master_matrix >
bool operator== ( const Entry< Master_matrix > &  c1,
const Entry< Master_matrix > &  c2 
)
friend

Equality comparator.

Parameters
c1First entry to compare.
c2Second entry to compare.
Returns
true If the row index of the first entry is equal to the row index of the second entry.
false Otherwise.

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