#include <array.hh>
Public Member Functions | |
| Array (const uint sz=0) | |
| Constructor. | |
| Array (const uint sz, const F &dft) | |
| Array (const F *dft, const uint sz) | |
| Array (const uint sz, const F &first, const F &diff) | |
| template<class H > | |
| Array (const Array< H > &a, F fnc(const H &)) | |
| Array (const Array< F > &a) | |
| Copy constructor. | |
| template<class H > | |
| Array (const Array< H > &a) | |
| Type conversion constructor. | |
| void | resize (const uint sz) |
| void | resizePreserve (const uint sz) |
| void | zeros () |
| Fills the memory with zeros. | |
| operator F* () | |
| Returns a pointer to the array. | |
| operator const F * () const | |
| Returns a pointer to the array. | |
| const F & | operator[] (const int i) const |
| Index operator. | |
| F & | operator[] (const int i) |
| Index operator. | |
| template<class G > | |
| Array< F > & | operator*= (const G n) |
| Scaling operator. | |
| template<class H > | |
| Array< F > & | operator*= (const Array< H > &a) |
| Multiplication operator. | |
| Array< F > & | operator= (const F n) |
| Assignement operator. | |
| Array< F > & | operator= (const Array< F > &a) |
| Assignement operator. | |
| template<class H > | |
| Array< F > & | operator= (const Array< H > &a) |
| Assignement operator. | |
| Array< F > & | operator+= (const F n) |
| Addition operator. | |
| template<class H > | |
| Array< F > & | operator+= (const Array< H > &a) |
| Addition operator. | |
| Array< F > & | operator-= (const F n) |
| Subtraction operator. | |
| template<class H > | |
| Array< F > & | operator-= (const Array< H > &a) |
| Subtraction operator. | |
| Array< F > | operator- () const |
| Negation operator. | |
| Array< F > & | apply (F &fnc(F &)) |
| template<class H > | |
| Array< F > & | apply (const Array< H > &a, F fnc(const H &)) |
| template<class H > | |
| Array< F > & | apply (const Array< H > &a, F fnc(const H &, const F &)) |
| uint | size () const |
| Returns the requested size of the array. | |
| uint | cursize () const |
| Returns the size of the allocated memory. | |
| int | memory () const |
| Returns the memory usage in bytes. | |
| Array< F > & | reverse () |
| Reverse the order of the entries. | |
| std::ostream & | info (std::ostream &os) const |
Protected Attributes | |
| F * | data_ |
| Data. | |
| uint | size_ |
| Current real size of the array. | |
| uint | n_ |
| Requested size of the array. | |
An array of objects. It does enlarge on request, zero out and more. In a sense a very minimalistic implementation of STLs vector. It's mainly intended to be an exception safe way to have an array of something. Especially suitable for vectors and matrices.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| std::ostream & concepts::Array< F >::info | ( | std::ostream & | os | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void concepts::Array< F >::resize | ( | const uint | sz | ) |
| void concepts::Array< F >::resizePreserve | ( | const uint | sz | ) |
| Array< F > & concepts::Array< F >::reverse | ( | ) |
|
inline |
Returns the requested size of the array.
|
inline |
|
protected |
|
protected |
|
protected |