|
NGSolve
4.9
|
A simple vector. More...
#include <vector.hpp>
Public Types | |
| enum | { HEIGHT = 1 } |
| enum | { WIDTH = 1 } |
| typedef T | TELEM |
| element type | |
| typedef T & | TREF |
| typedef mat_traits< T >::TSCAL | TSCAL |
| scalar of element type | |
| typedef FlatVector< T > | TV_COL |
| typedef double | TV_ROW |
Public Member Functions | |
| FlatVector () | |
| default constructor does nothing | |
| FlatVector (unsigned int as, T *adata) | |
| set size and mem | |
| FlatVector (unsigned int as, void *adata) | |
| set size and mem | |
| template<int S> | |
| FlatVector (const Vec< S, TSCAL > &v) | |
| put FlatVector over fixed size vector | |
| template<int S> | |
| FlatVector (const FlatVec< S, TSCAL > &v) | |
| FlatVector (int as, LocalHeap &lh) | |
| allocate FlatVector on local heap | |
| FlatVector (const SysVector< TSCAL > &sv) | |
| put FlatVector over systemvector | |
| void | AssignMemory (int as, LocalHeap &lh) |
| assign memory for vector on local heap | |
| void | AssignMemory (int as, T *mem) |
| assign memory for vector | |
| const FlatVector & | operator= (const FlatVector &v) const |
| copy vector. sizes must match | |
| template<typename TB > | |
| const FlatVector & | operator= (const Expr< TB > &v) const |
| evaluate matrix expression | |
| const FlatVector & | operator= (TSCAL scal) const |
| assign constant value | |
| template<typename TB > | |
| const FlatVector & | operator+= (const Expr< TB > &v) const |
| TELEM & | operator() (int i) const |
| constant element access | |
| RowsArrayExpr< FlatVector > | operator() (FlatArray< int > rows) const |
| TELEM & | operator() (int i, int j) const |
| element access. index j is ignored | |
| TELEM & | operator[] (int i) const |
| constant element access | |
| const CArray< T > | Addr (int i) const |
| const FlatVector< T > | Range (int first, int next) const |
| sub-vector of size next-first, starting at first | |
| const FlatVector< T > | Range (IntRange range) const |
| sub-vector given by range | |
| int | Size () const |
| vector size | |
| int | Height () const |
| vector is matrix of height size | |
| int | Width () const |
| vector is matrix of with 1 | |
| SliceVector< T > | Slice (int first, int dist) |
| take a slice of the vector. Take elements first+i * dist. | |
| const SliceVector< T > | Slice (int first, int dist) const |
| take a slice of the vector. Take elements first+i * dist. | |
| const void * | Data () const |
| access to data | |
| void * | Data () |
| access to data | |
Protected Attributes | |
| int | s |
| vector size | |
| T * | data |
| the data | |
A simple vector.
Has size and generic data-pointer. No memory allocation/deallocation. User must provide memory.
1.7.6.1