|
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 | |
| Matrix ()=default | |
| Matrix (std::size_t rows, std::size_t columns, const T &value=T{}) | |
| Matrix (const Matrix &)=default | |
| Matrix & | operator= (const Matrix &)=default |
| Matrix (Matrix &&other) noexcept | |
| Matrix & | operator= (Matrix &&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 (Matrix &other) noexcept |
| void | resize (std::size_t newRows, std::size_t newColumns, bool preserve=true) |
Owning row-major matrix. Views are constructed on access, so copies, moves and resizes cannot leave a cached mdspan pointing into another allocation. resize preserves the overlapping rectangle unless preserve=false is passed. Preserving resize value-initializes new cells. With preserve=false, callers must overwrite all cells before reading. clear resets cells without changing shape.
| using IntaRNA::Matrix< T >::value_type = T |
Type of one stored cell.
|
default |
Construct an empty matrix.
|
inline |
Allocate a dense matrix initialized to one value.
| rows | logical row count |
| columns | logical column count |
| value | initial value for each cell |
| 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 logical shape.
| i | zero-based row within the logical shape |
| j | zero-based column within the logical shape |
|
inline |
Access a cell within the logical shape.
| 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.
| newRows | new row count |
| newColumns | new column count |
| preserve | retain overlapping cells and default-initialize new cells; otherwise callers must overwrite cells before reading |
| std::length_error | if the storage size overflows |
|
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 |