HLIBpro
2.1
|
Standard vector in basic linear algebra, i.e. BLAS/LAPACK. More...
#include <VectorBase.hh>
Public Types | |
typedef T_value | value_t |
internal value type | |
typedef MemBlock< value_t > | super_t |
super class type | |
Public Types inherited from MemBlock< T_value > | |
typedef T_value | value_t |
internal value type | |
Public Member Functions | |
Vector () | |
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) | |
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) |
move operator (move ownership of data) | |
size_t | length () const |
return length of vector | |
size_t | stride () const |
return stride of index set | |
value_t | operator() (const idx_t i) const |
return coefficient at position i | |
value_t & | operator() (const idx_t i) |
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 |
give access to internal data | |
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 | |
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.