|
NGSolve
5.3
|
A simple array container. More...
#include <array.hpp>


Public Member Functions | |
| INLINE | FlatArray () |
| initialize array | |
| template<typename TSIZE2 > | |
| INLINE | FlatArray (const FlatArray< T, TSIZE2 > &a2) |
| copy constructor allows size-type conversion | |
| INLINE | FlatArray (TSIZE asize, T *adata) |
| provide size and memory | |
| INLINE | FlatArray (TSIZE asize, LocalHeap &lh) |
| memory from local heap | |
| INLINE TSIZE | Size () const |
| the size | |
| INLINE const FlatArray & | operator= (const T &val) const |
| Fill array with value val. | |
| INLINE const FlatArray & | operator= (const FlatArray &a2) const |
| copies array | |
| template<typename T2 > | |
| INLINE const FlatArray & | operator= (const BaseArrayObject< T2 > &a2) const |
| INLINE const FlatArray & | operator= (const std::function< T(int)> &func) const |
| INLINE const FlatArray & | Assign (const FlatArray &a2) |
| copies pointers | |
| INLINE const FlatArray & | Assign (TSIZE asize, LocalHeap &lh) |
| assigns memory from local heap | |
| INLINE T & | operator[] (TSIZE i) const |
| Access array. range check by macro CHECK_RANGE. | |
| INLINE T_Range< TSIZE > | Range () const |
| INLINE const CArray< T > | Addr (int pos) |
| INLINE T * | operator+ (int pos) |
| T & | Last () const |
| access last element. check by macro CHECK_RANGE | |
| INLINE const FlatArray< T > | Part (int pos) |
| takes sub-array starting from position pos | |
| INLINE const FlatArray< T > | Part (int pos, int subsize) |
| takes subsize elements starting from position pos | |
| INLINE FlatArray< T > | Range (TSIZE start, TSIZE end) const |
| takes range starting from position start of end-start elements | |
| INLINE FlatArray< T, TSIZE > | Range (T_Range< TSIZE > range) const |
| takes range starting from position start of end-start elements | |
| INLINE const FlatArray< T > | operator[] (const IntRange range) const |
| takes range starting from position start of end-start elements | |
| template<typename TI1 > | |
| IndirectArray< T, BaseArrayObject< TI1 > > | operator[] (const BaseArrayObject< TI1 > &ind_array) const |
| INLINE int | Pos (const T &elem) const |
| first position of element elem, returns -1 if element not contained in array | |
| INLINE bool | Contains (const T &elem) const |
| does the array contain element elem ? | |
| ArrayIterator< T, TSIZE > | begin () const |
| ArrayIterator< T, TSIZE > | end () const |
| FlatArray< T, TSIZE > | OmpSplit () const |
Protected Attributes | |
| TSIZE | size |
| the size | |
| T *__restrict | data |
| the data | |
A simple array container.
Array represented by size and data-pointer. No memory allocation and deallocation, must be provided by user. Helper functions for printing. Optional range check by macro CHECK_RANGE
1.7.6.1