![]() |
MAOS
Multithreaded Adaptive Optics Simulator
|
Public Types | |
| typedef T | type |
Public Member Functions | |
| ~Array () | |
| T & | operator() (int ix, int iy) |
| const T & | operator() (int ix, int iy) const |
| T & | R (int ix, int iy=0) |
| T * | Col (int icol) |
| const T * | Col (int icol) const |
| long | Nx () const |
| long | Ny () const |
| long | N () const |
| operator bool () const | |
| void | init (long nxi=0, long nyi=1) |
| Array () | |
| Array (long nxi, long nyi=1, T *pi=NULL, int own=1) | |
| Array (long nxi, long nyi, const Array &pi, long offset=0) | |
| Array (const Array &in) | |
| Array & | operator= (const Array &in) |
| Array | Vector () const |
| void | deinit () |
| operator T* () | |
| T * | operator() () |
| const T * | operator() () const |
| T & | operator() (int i) |
| const T & | operator() (int i) const |
| int | NRef () const |
Data Fields | |
| string | keywords |
Protected Attributes | |
| long | nx =0 |
| long | ny =0 |
| T * | p |
Generic array of basic types and classes.
Does not defines operations that are different between Numerical and NumCell array.
Destructor. The data is released by RefP.
| Array< T, Dev >::Array | ( | ) |
Create an empty array.
| Array< T, Dev >::Array | ( | long | nxi, |
| long | nyi = 1, | ||
| T * | pi = NULL, | ||
| int | own = 1 ) |
Create an array.
| [in] | nxi | Number of rows. |
| [in] | nyi | Number of columns. |
| [in] | pi | Existing memory to use. Allocated (zeroed) if NULL. |
| [in] | own | Whether to free pi when the last reference is released. |
| Array< T, Dev >::Array | ( | long | nxi, |
| long | nyi, | ||
| const Array< T, Dev > & | pi, | ||
| long | offset = 0 ) |
Create a reference to part of an existing array with offset.
| [in] | nxi | Number of rows. |
| [in] | nyi | Number of columns. |
| [in] | pi | Array to reference. |
| [in] | offset | Offset in number of elements. |
| Array< T, Dev >::Array | ( | const Array< T, Dev > & | in | ) |
Create a reference to an existing array.
| [in] | in | Array to reference. |
| T & Array< T, Dev >::operator() | ( | int | ix, |
| int | iy ) |
| [in] | ix | Row index. |
| [in] | iy | Column index. |
| const T & Array< T, Dev >::operator() | ( | int | ix, |
| int | iy ) const |
| [in] | ix | Row index. |
| [in] | iy | Column index. |
| T & Array< T, Dev >::R | ( | int | ix, |
| int | iy = 0 ) |
Relaxed indexing: an index along a dimension of size 1 is ignored.
| [in] | ix | Row index. |
| [in] | iy | Column index. |
| T * Array< T, Dev >::Col | ( | int | icol | ) |
| [in] | icol | Column index. |
| const T * Array< T, Dev >::Col | ( | int | icol | ) | const |
| [in] | icol | Column index. |
|
explicit |
| void Array< T, Dev >::init | ( | long | nxi = 0, |
| long | nyi = 1 ) |
Reallocate the array. Existing data of the same size is kept.
| [in] | nxi | Number of rows. |
| [in] | nyi | Number of columns. |
| Array & Array< T, Dev >::operator= | ( | const Array< T, Dev > & | in | ) |
Release the current data and reference in.
| [in] | in | Array to reference. |
| void RefP< T, Dev >::deinit | ( | ) |
Release the reference and free the memory if this is the last owner.
| RefP< T, Dev >::operator T* | ( | ) |
| T * RefP< T, Dev >::operator() | ( | ) |
| const T * RefP< T, Dev >::operator() | ( | ) | const |
| T & RefP< T, Dev >::operator() | ( | int | i | ) |
| [in] | i | Index. |
| const T & RefP< T, Dev >::operator() | ( | int | i | ) | const |
| [in] | i | Index. |
| int RefP< T, Dev >::NRef | ( | ) | const |