HLIBpro
2.1
|
Standard dense matrix in basic linear algebra, i.e. BLAS/LAPACK. More...
#include <Matrix.hh>
Public Types | |
typedef T_value | value_t |
internal value type | |
typedef MemBlock< value_t > | super_t |
super class type | |
Public Types inherited from MatrixBase< Matrix< T_value > > | |
typedef matrix_trait< Matrix < T_value > >::value_t | value_t |
scalar value type of matrix | |
Public Types inherited from MemBlock< T_value > | |
typedef T_value | value_t |
internal value type | |
Public Member Functions | |
Matrix () | |
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) | |
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) |
move operator | |
size_t | nrows () const |
return number of rows of matrix | |
size_t | ncols () const |
return number of columns of matrix | |
blasview_t | blas_view () const |
return BLAS matrix view of matrix object | |
size_t | blas_nrows () const |
return number of rows of actual BLAS matrix | |
size_t | blas_ncols () const |
return number of columns of actual BLAS matrix | |
value_t | operator() (const idx_t i, const idx_t j) const |
return coefficient (i,j) | |
value_t & | operator() (const idx_t i, const idx_t j) |
return reference to coefficient (i,j) | |
value_t * | data () const |
return pointer to internal data | |
size_t | row_stride () const |
return stride w.r.t. row index set | |
size_t | col_stride () const |
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 |
return number of rows of matrix | |
size_t | ncols () const |
return number of columns of matrix | |
Range | row_range () const |
return number of rows of matrix | |
Range | col_range () const |
return number of columns of matrix | |
value_t | operator() (const idx_t i, const idx_t j) const |
return coefficient (i,j) | |
value_t & | operator() (const idx_t i, const idx_t j) |
return reference to coefficient (i,j) | |
value_t * | data () const |
return pointer to internal data | |
size_t | row_stride () const |
return stride w.r.t. row index set | |
size_t | col_stride () const |
return stride w.r.t. column index set | |
blasview_t | blas_view () const |
return BLAS matrix view of matrix object | |
size_t | blas_nrows () const |
return number of rows of actual BLAS matrix | |
size_t | blas_ncols () const |
return number of columns of actual BLAS matrix | |
Public Member Functions inherited from MemBlock< T_value > | |
MemBlock () | |
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) | |
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) |
move ctor (move ownership) | |
value_t * | data () |
return pointer to internal array | |
const value_t * | data () const |
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.