|
HLIBpro
2.3.1
|
Standard dense matrix in basic linear algebra, i.e. BLAS/LAPACK. More...
#include <Matrix.hh>
Public Types | |
| using | value_t = T_value |
| internal value type | |
| using | super_t = MemBlock< value_t > |
| super class type | |
Public Types inherited from MatrixBase< Matrix< T_value > > | |
| using | value_t = typename matrix_trait< Matrix< T_value > >::value_t |
| scalar value type of matrix | |
Public Types inherited from MemBlock< T_value > | |
| using | value_t = T_value |
| internal value type | |
Public Member Functions | |
| Matrix () noexcept | |
| creates zero sized matrix | |
| Matrix (const size_t anrows, const size_t ancols) | |
| creates matrix of size anrows × ancols | |
| Matrix (const Matrix &M, const copy_policy_t p=copy_reference) | |
| copy constructor | |
| template<typename T_matrix > | |
| Matrix (const T_matrix &M) | |
| copy constructor for other matrix types | |
| Matrix (Matrix &&M) noexcept | |
| move constructor | |
| Matrix (const Matrix &M, const Range &ar1, const Range &ar2, const copy_policy_t p=copy_reference) | |
| Matrix & | operator= (const Matrix &M) |
| copy operator for matrices (always copy reference! for real copy, use BLAS::copy) | |
| Matrix & | operator= (Matrix &&M) noexcept |
| move operator | |
| size_t | nrows () const noexcept |
| return number of rows of matrix | |
| size_t | ncols () const noexcept |
| return number of columns of matrix | |
| blasview_t | blas_view () const noexcept |
| return BLAS matrix view of matrix object | |
| size_t | blas_nrows () const noexcept |
| return number of rows of actual BLAS matrix | |
| size_t | blas_ncols () const noexcept |
| return number of columns of actual BLAS matrix | |
| value_t | operator() (const idx_t i, const idx_t j) const noexcept |
| return coefficient (i,j) | |
| value_t & | operator() (const idx_t i, const idx_t j) noexcept |
| return reference to coefficient (i,j) | |
| value_t * | data () const noexcept |
| return pointer to internal data | |
| size_t | row_stride () const noexcept |
| return stride w.r.t. row index set | |
| size_t | col_stride () const noexcept |
| return stride w.r.t. column index set | |
| void | resize (const size_t n, const size_t m) |
| optimised resize: only change if (n,m) != (nrows,ncols) | |
| Matrix< value_t > | copy () const |
| create real copy of matrix | |
| Matrix< value_t > | reference () const |
| create reference to this matrix | |
| Matrix< value_t > | operator() (const Range &r1, const Range &r2) const |
| return matrix referencing sub matrix defined by r1 × r2 | |
| Vector< value_t > | operator() (const Range &r, const idx_t j) const |
| return vector referencing part of column j defined by r | |
| Vector< value_t > | operator() (const idx_t i, const Range &r) const |
| return vector referencing part of row i defined by r | |
| Vector< value_t > | column (const idx_t j) const |
| return vector referencing column j | |
| Vector< value_t > | row (const idx_t i) const |
| return vector referencing row i | |
| void | check_data () const |
| test data for invalid values, e.g. INF and NAN | |
Public Member Functions inherited from MatrixBase< Matrix< T_value > > | |
| size_t | nrows () const noexcept |
| return number of rows of matrix | |
| size_t | ncols () const noexcept |
| return number of columns of matrix | |
| Range | row_range () const noexcept |
| return number of rows of matrix | |
| Range | col_range () const noexcept |
| return number of columns of matrix | |
| value_t | operator() (const idx_t i, const idx_t j) const noexcept |
| return coefficient (i,j) | |
| value_t & | operator() (const idx_t i, const idx_t j) noexcept |
| return reference to coefficient (i,j) | |
| value_t * | data () const noexcept |
| return pointer to internal data | |
| size_t | row_stride () const noexcept |
| return stride w.r.t. row index set | |
| size_t | col_stride () const noexcept |
| return stride w.r.t. column index set | |
| blasview_t | blas_view () const noexcept |
| return BLAS matrix view of matrix object | |
| size_t | blas_nrows () const noexcept |
| return number of rows of actual BLAS matrix | |
| size_t | blas_ncols () const noexcept |
| return number of columns of actual BLAS matrix | |
Public Member Functions inherited from MemBlock< T_value > | |
| MemBlock () noexcept | |
| ctor with nullptr data and 0 references | |
| MemBlock (const size_t n) | |
| ctor for n elements of value_t and 0 references | |
| MemBlock (const MemBlock &b) | |
| copy ctor (copy reference!) | |
| MemBlock (MemBlock &&b) noexcept | |
| move ctor (move ownership) | |
| ~MemBlock () | |
| dtor removing all data even if references exist ! | |
| MemBlock & | operator= (const MemBlock &b) |
| copy operator (copy reference!) | |
| MemBlock & | operator= (MemBlock &&b) noexcept |
| move ctor (move ownership) | |
| value_t * | data () noexcept |
| return pointer to internal array | |
| const value_t * | data () const noexcept |
| return const pointer to internal array | |
Standard dmatrixvector class in linear algebra routines. It holds a reference to a memory block, which is controlled by this matrix, e.g. if the matrix is gone or resized, the memory block is also gone.
1.8.9.1