|
IntaRNA 3.4.1
RNA-RNA interaction prediction | C++ API
|
#include <Matrix.h>
Public Types | |
| using | value_type = T |
| Type of one stored cell. | |
Public Member Functions | |
| UpperTriangularMatrix ()=default | |
| UpperTriangularMatrix (std::size_t rows, std::size_t columns) | |
| UpperTriangularMatrix (const UpperTriangularMatrix &)=default | |
| UpperTriangularMatrix & | operator= (const UpperTriangularMatrix &)=default |
| UpperTriangularMatrix (UpperTriangularMatrix &&other) noexcept | |
| UpperTriangularMatrix & | operator= (UpperTriangularMatrix &&other) noexcept |
| std::size_t | size1 () const noexcept |
| std::size_t | size2 () const noexcept |
| std::size_t | storageSize () const noexcept |
| T & | operator() (std::size_t i, std::size_t j) |
| const T & | operator() (std::size_t i, std::size_t j) const |
| void | clear () |
| void | swap (UpperTriangularMatrix &other) noexcept |
| void | resize (std::size_t rows, std::size_t columns, bool preserve=true) |
Square upper-triangular matrix with exactly n*(n+1)/2 stored cells. Rows are packed consecutively. A one-dimensional mdspan addresses the packed storage because triangular row lengths are not an affine 2D layout. Const access below the diagonal returns zero; writes require i <= j.
| using IntaRNA::UpperTriangularMatrix< T >::value_type = T |
Type of one stored cell.
|
default |
Construct an empty matrix.
|
inline |
Allocate a default-initialized square upper triangle.
| rows | logical row count |
| columns | logical column count; must equal rows |
| std::invalid_argument | if the shape is not square |
| std::length_error | if the storage size overflows |
|
default |
Copy the shape and values into independent storage.
|
inlinenoexcept |
Take ownership of another matrix and leave it empty.
| other | matrix whose storage is moved |
|
inline |
Reset stored cells to default values without changing the shape.
|
inline |
Access a cell with i <= j < size2().
| i | zero-based row within the logical shape |
| j | zero-based column within the logical shape |
|
inline |
Read a logical cell; structural zeros are returned outside stored cells.
| i | zero-based row within the logical shape |
| j | zero-based column within the logical shape |
|
default |
Copy the shape and values into independent storage.
|
inlinenoexcept |
Take ownership of another matrix; self-move leaves this matrix unchanged.
| other | matrix whose storage is moved; emptied on a non-self move |
|
inline |
Resize, preserving overlapping logical cells when requested.
| rows | new row count |
| columns | new column count; must equal rows |
| preserve | retain overlapping cells and default-initialize new cells; otherwise callers must overwrite cells before reading |
| std::length_error | if the storage size overflows |
| std::invalid_argument | if the requested shape or band is unsupported |
|
inlinenoexcept |
Number of logical rows.
|
inlinenoexcept |
Number of logical columns.
|
inlinenoexcept |
Number of stored elements, including any band padding.
|
inlinenoexcept |
Exchange shape and owned storage.
| other | matrix to exchange with |