HLIBpro
2.4
|
Standard vector in basic linear algebra, i.e. BLAS/LAPACK. More...
#include <VectorBase.hh>
Public Types | |
using | value_t = T_value |
internal value type | |
using | super_t = MemBlock< value_t > |
super class type | |
Public Types inherited from MemBlock< T_value > | |
using | value_t = T_value |
internal value type | |
Public Member Functions | |
Vector () noexcept | |
create zero sized vector | |
Vector (const size_t n) | |
create vector of size n | |
Vector (const Vector &v, const copy_policy_t p=copy_reference) | |
copy ctor | |
Vector (Vector &&v) noexcept | |
move ctor | |
Vector (const Matrix< value_t > &M, const Range &ar, const idx_t col, const copy_policy_t p=copy_reference) | |
create copy of column of matrix M defined by r and col | |
Vector (const Matrix< value_t > &M, const idx_t row, const Range &ar, const copy_policy_t p=copy_reference) | |
create copy/reference to row of matrix M defined by r and row | |
Vector & | operator= (const Vector &v) |
copy operator (always copy reference! for data copy, use BLAS::copy!) | |
Vector & | operator= (Vector &&v) noexcept |
move operator (move ownership of data) | |
size_t | length () const noexcept |
return length of vector | |
size_t | stride () const noexcept |
return stride of index set | |
value_t | operator() (const idx_t i) const noexcept |
return coefficient at position i | |
value_t & | operator() (const idx_t i) noexcept |
return reference to coefficient at position i | |
Vector | operator() (const Range &r) const |
return reference to sub vector defined by r | |
value_t * | data () const noexcept |
give access to internal data | |
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 | |
defines basic interface for vectors
Standard vector class in linear algebra routines. It holds a reference to a memory block, which is controlled by this vector, e.g. if the vector is gone or resized, the memory block is also gone.