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


Public Member Functions | |
| INLINE | Array () |
| Generate array of logical and physical size asize. | |
| INLINE | Array (TSIZE asize) |
| INLINE | Array (TSIZE asize, T *adata) |
| Generate array in user data. | |
| INLINE | Array (TSIZE asize, LocalHeap &lh) |
| Generate array in user data. | |
| INLINE | Array (Array &&a2) |
| INLINE | Array (const Array &a2) |
| array copy | |
| template<typename TA > | |
| Array (const BaseArrayObject< TA > &a2) | |
| Array (std::initializer_list< T > list) | |
| Array (const Array< T > &a2, const Array< T > &a3) | |
| array merge-copy | |
| INLINE | ~Array () |
| if responsible, deletes memory | |
| INLINE void | NothingToDelete () |
| we tell the compiler that there is no need for deleting the array .. | |
| INLINE void | SetSize (TSIZE nsize) |
| Change logical size. If necessary, do reallocation. Keeps contents. | |
| INLINE void | SetSize0 () |
| INLINE void | SetAllocSize (TSIZE nallocsize) |
| Change physical size. Keeps logical size. Keeps contents. | |
| INLINE TSIZE | AllocSize () const |
| Change physical size. Keeps logical size. Keeps contents. | |
| INLINE const Array & | Assign (TSIZE asize, LocalHeap &lh) |
| assigns memory from local heap | |
| INLINE TSIZE | Append (const T &el) |
| Add element at end of array. reallocation if necessary. | |
| INLINE Array< T > & | operator+= (const T &el) |
| INLINE TSIZE | Append (FlatArray< T > source) |
| Append array at end of array. reallocation if necessary. | |
| INLINE void | DeleteElement (int i) |
| Delete element i. Move last element to position i. | |
| INLINE void | RemoveElement (TSIZE i) |
| Delete element i. Move all remaining elements forward. | |
| INLINE void | DeleteLast () |
| Delete last element. | |
| INLINE void | DeleteAll () |
| Deallocate memory. | |
| INLINE Array & | operator= (const T &val) |
| Fill array with val. | |
| INLINE Array & | operator= (const Array &a2) |
| array copy | |
| INLINE Array & | operator= (Array &&a2) |
| steal array | |
| INLINE Array & | operator= (const FlatArray< T, TSIZE > &a2) |
| array copy | |
| template<typename T2 > | |
| Array & | operator= (const BaseArrayObject< T2 > &a2) |
| template<typename... ARGS> | |
| Array & | operator= (Tuple< ARGS...> tup) |
| INLINE void | Swap (Array &b) |
Protected Attributes | |
| TSIZE | allocsize |
| physical size of array | |
| T * | mem_to_delete |
| that's the data we have to delete, nullptr for not owning the memory | |
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