|
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 | |
| UpperBandedMatrix ()=default | |
| UpperBandedMatrix (std::size_t rows, std::size_t columns, std::size_t lower, std::size_t upper) | |
| UpperBandedMatrix (const UpperBandedMatrix &)=default | |
| UpperBandedMatrix & | operator= (const UpperBandedMatrix &)=default |
| UpperBandedMatrix (UpperBandedMatrix &&other) noexcept | |
| UpperBandedMatrix & | operator= (UpperBandedMatrix &&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 |
| std::span< T > | row (std::size_t i) |
| std::span< const T > | row (std::size_t i) const |
| void | clear () |
| void | swap (UpperBandedMatrix &other) noexcept |
| void | resize (std::size_t rows, std::size_t newColumns, std::size_t lower, std::size_t upper, bool preserve=true) |
Upper band including the diagonal and 'upper' superdiagonals. Stores rows * min(columns, upper+1) cells, never a dense square for a narrow band. Logical (i,j) maps to mdspan[i,j-i] in the owning Matrix. Const access outside the band returns zero; writes must be in the band.
| using IntaRNA::UpperBandedMatrix< T >::value_type = T |
Type of one stored cell.
|
default |
Construct an empty matrix.
|
inline |
Allocate a default-initialized upper band.
| rows | logical row count |
| columns | logical column count |
| lower | lower bandwidth; must be zero |
| upper | number of stored superdiagonals |
| std::invalid_argument | if lower is not zero |
| 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 within the stored upper band.
| 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 |
| newColumns | new column count |
| lower | lower bandwidth; must be zero |
| upper | number of stored superdiagonals |
| 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 |
|
inline |
View the contiguous stored cells (i,i), (i,i+1), ... in one row. Excludes structural zeros and row-end padding. The view aliases this matrix and must not outlive its storage or be retained across resize, move, swap or assignment.
| i | zero-based row, less than size1() |
|
inline |
|
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 |