|
NGSolve
4.9
|
Dynamic array container. More...
#include <array.hpp>
Public Member Functions | |
| Array () | |
| Generate array of logical and physical size asize. | |
| Array (TSIZE asize) | |
| Array (TSIZE asize, T *adata) | |
| Generate array in user data. | |
| Array (TSIZE asize, LocalHeap &lh) | |
| Generate array in user data. | |
| Array (const Array< T > &a2) | |
| array copy | |
| Array (const Array< T > &a2, const Array< T > &a3) | |
| array merge-copy | |
| ~Array () | |
| if responsible, deletes memory | |
| void | SetSize (TSIZE nsize) |
| Change logical size. If necessary, do reallocation. Keeps contents. | |
| void | SetAllocSize (int nallocsize) |
| Change physical size. Keeps logical size. Keeps contents. | |
| int | Append (const T &el) |
| Add element at end of array. reallocation if necessary. | |
| Array< T > & | operator+= (const T &el) |
| int | Append (const Array< T > &source) |
| Append array at end of array. reallocation if necessary. | |
| void | DeleteElement (int i) |
| Delete element i. Move last element to position i. | |
| void | RemoveElement (int i) |
| Delete element i. Move all remaining elements forward. | |
| void | DeleteLast () |
| Delete last element. | |
| void | DeleteAll () |
| Deallocate memory. | |
| Array & | operator= (const T &val) |
| Fill array with val. | |
| Array & | operator= (const Array &a2) |
| array copy | |
| Array & | operator= (const FlatArray< T, TSIZE > &a2) |
| array copy | |
| template<typename T2 , typename TA > | |
| Array & | operator= (const BaseArrayObject< T2, TA > &a2) |
| void | Swap (Array &b) |
Protected Attributes | |
| TSIZE | allocsize |
| physical size of array | |
| bool | ownmem |
| memory is responsibility of container | |
Dynamic array container.
Array<T> is an automatically increasing array container. The allocated memory doubles on overflow. Either the container takes care of memory allocation and deallocation, or the user provides one block of data.
1.7.6.1