LTL
2.0.x
|
A dynamic N-dimensional array storing objects of type T. More...
Inherits ltl::ExprBase< MArray< T, N >, N >.
Public Types | |
typedef MArrayIter< T, N > | Iterator |
typedef MArrayIterConst< T, N > | ConstIterator |
typedef IndexIter< T, N > | IndexIterator |
Index iterator for ltl::where() (indexing arbitrary subsets). More... | |
typedef FixedVector< int, N > | IndexV |
typedef IndexList< N > | IndexSet |
enum | |
STL definitions: | |
typedef T | value_type |
typedef T & | reference |
typedef const T & | const_reference |
typedef T * | pointer |
typedef const T * | const_pointer |
typedef size_t | size_type |
typedef MArrayIter< T, N > | iterator |
typedef MArrayIterConst< T, N > | const_iterator |
Public Member Functions | |
MArray () | |
Construct an array without allocating memory. More... | |
MArray (const MArray< T, N > &other) | |
Copy constructor. Only makes a reference !!! More... | |
template<int N2, typename R1 , typename R2 , typename R3 , typename R4 , typename R5 , typename R6 , typename R7 > | |
MArray (const MArray< T, N2 > &other, R1 r1, R2 r2, R3 r3, R4 r4, R5 r5, R6 r6, R7 r7) | |
Constructor for mixed slicing (int, rank reducing) and Range arguments. More... | |
MArray (const Shape< N > *s, const bool map=false, const char *filename=NULL) | |
Construct from shape. More... | |
template<typename Expr > | |
MArray (const ExprNode< Expr, N > &e, const bool map=false, const char *filename=NULL) | |
Construct from an array-valued expression. More... | |
~MArray () | |
Decrement reference count of memory block. If 0 delete. More... | |
void | free () |
Free associated memory. More... | |
bool | empty () const |
true if MArray currenltly has have no memory allocated. More... | |
template<typename Expr > | |
MArray< T, N > & | operator= (const ExprNode< Expr, N > &e) |
Assignment of an expression to a MArray . More... | |
ListInitializationSwitch < MArray< T, N > > | operator= (T x) |
Assigns x to all elements. More... | |
MArray< T, 1 > | operator() (const IndexList< N > &l) const |
Index with ltl::IndexList (rhs version). More... | |
IndexRef< T, N > | operator[] (const IndexList< N > &l) |
Index with ltl::IndexList (lhs version). More... | |
void | makeReference (const MArray< T, N > &other) |
Make this being a referece to other's data. More... | |
template<int N2> | |
void | makeReferenceWithDims (const MArray< T, N2 > &other, const int *dims) |
Make a reference as a different-dimensional view of another MArray's data. More... | |
void | realloc (const Shape< N > &s, const bool map=false, const char *filename=NULL) |
Reallocate memory. Data are abolished. More... | |
T * | data () const |
Pointer to first data element. More... | |
IndexIterator | indexBegin () const |
An iterator-style thing providing indices when dereferenced. More... | |
MemoryBlock< T > * | memoryBlock () const |
Return pointer to associated MemoryBlock . More... | |
bool | isAllocated () const |
Return true, if MArray has associated MemoryBlock. More... | |
void | describeSelf () const |
Debug output. Print geometry information. More... | |
MArray< T, N > & | derived () |
const MArray< T, N > & | derived () const |
Construct an (optionally mapped) array of rank N with ltl::Range size arguments. | |
MArray (const Range &r1, const bool map=false) | |
MArray (const Range &r1, const Range &r2, const bool map=false) | |
MArray (const Range &r1, const Range &r2, const Range &r3, const bool map=false) | |
MArray (const Range &r1, const Range &r2, const Range &r3, const Range &r4, const bool map=false) | |
MArray (const Range &r1, const Range &r2, const Range &r3, const Range &r4, const Range &r5, const bool map=false) | |
MArray (const Range &r1, const Range &r2, const Range &r3, const Range &r4, const Range &r5, const Range &r6, const bool map=false) | |
MArray (const Range &r1, const Range &r2, const Range &r3, const Range &r4, const Range &r5, const Range &r6, const Range &r7, const bool map=false) | |
Construct an array of rank N with int size arguments. | |
Index ranges | |
MArray (const int r1, const bool map=false) | |
MArray (const int r1, const int r2, const bool map=false) | |
MArray (const int r1, const int r2, const int r3, const bool map=false) | |
MArray (const int r1, const int r2, const int r3, const int r4, const bool map=false) | |
MArray (const int r1, const int r2, const int r3, const int r4, const int r5, const bool map=false) | |
MArray (const int r1, const int r2, const int r3, const int r4, const int r5, const int r6, const bool map=false) | |
MArray (const int r1, const int r2, const int r3, const int r4, const int r5, const int r6, const int r7, const bool map=false) | |
Constructors for pure subarrays (rank preserved) | |
Other array's data is referenced, NOT copied ( use operator=() for copy)! Missing arguments are treated as Range::all() ! | |
MArray (const MArray< T, N > &other, const Range &r0) | |
MArray (const MArray< T, N > &other, const Range &r1, const Range &r2) | |
MArray (const MArray< T, N > &other, const Range &r1, const Range &r2, const Range &r3) | |
MArray (const MArray< T, N > &other, const Range &r1, const Range &r2, const Range &r3, const Range &r4) | |
MArray (const MArray< T, N > &other, const Range &r1, const Range &r2, const Range &r3, const Range &r4, const Range &r5) | |
MArray (const MArray< T, N > &other, const Range &r1, const Range &r2, const Range &r3, const Range &r4, const Range &r5, const Range &r6) | |
MArray (const MArray< T, N > &other, const Range &r1, const Range &r2, const Range &r3, const Range &r4, const Range &r5, const Range &r6, const Range &r7) | |
Construct from preexisting data. | |
The array | |
MArray (T *data, const int *dims) | |
Construct from allocated memory. Note that this memory will be freed when the MArray is destructed. More... | |
MArray (const string filename, const int *dims) | |
Construct from map file. More... | |
Operator=, other's data is copied, own data overwritten | |
MArray< T, N > & | operator= (const MArray< T, N > &other) |
This. More... | |
template<typename T2 > | |
MArray< T, N > & | operator= (const MArray< T2, N > &other) |
This. More... | |
Overloaded X= operators. There is a version for an | |
rhs, an expression rhs, and a literal rhs for each operator. To have a single implementation of mathematical operations for scalar and vectorized code (where the C language extensions do not define X= ), we transform the A x= E
assignment into A = A x E
and call operator=
. | |
template<typename T2 > | |
MArray< T, N > & | operator+= (const MArray< T2, N > &a) |
template<typename T2 > | |
MArray< T, N > & | operator-= (const MArray< T2, N > &a) |
template<typename T2 > | |
MArray< T, N > & | operator*= (const MArray< T2, N > &a) |
template<typename T2 > | |
MArray< T, N > & | operator/= (const MArray< T2, N > &a) |
template<typename T2 > | |
MArray< T, N > & | operator&= (const MArray< T2, N > &a) |
template<typename T2 > | |
MArray< T, N > & | operator|= (const MArray< T2, N > &a) |
template<typename T2 > | |
MArray< T, N > & | operator^= (const MArray< T2, N > &a) |
template<typename Expr > | |
MArray< T, N > & | operator+= (const ExprNode< Expr, N > &e) |
template<typename Expr > | |
MArray< T, N > & | operator-= (const ExprNode< Expr, N > &e) |
template<typename Expr > | |
MArray< T, N > & | operator*= (const ExprNode< Expr, N > &e) |
template<typename Expr > | |
MArray< T, N > & | operator/= (const ExprNode< Expr, N > &e) |
template<typename Expr > | |
MArray< T, N > & | operator&= (const ExprNode< Expr, N > &e) |
template<typename Expr > | |
MArray< T, N > & | operator|= (const ExprNode< Expr, N > &e) |
template<typename Expr > | |
MArray< T, N > & | operator^= (const ExprNode< Expr, N > &e) |
MArray< T, N > & | operator+= (const T a) |
MArray< T, N > & | operator-= (const T a) |
MArray< T, N > & | operator*= (const T a) |
MArray< T, N > & | operator/= (const T a) |
MArray< T, N > & | operator&= (const T a) |
MArray< T, N > & | operator|= (const T a) |
MArray< T, N > & | operator^= (const T a) |
Elementwise array access (indexing) via operator() | |
| |
T | operator() (const int i1) const |
T & | operator() (const int i1) |
T | operator() (const int i1, const int i2) const |
T & | operator() (const int i1, const int i2) |
T | operator() (const int i1, const int i2, const int i3) const |
T & | operator() (const int i1, const int i2, const int i3) |
T | operator() (const int i1, const int i2, const int i3, const int i4) const |
T & | operator() (const int i1, const int i2, const int i3, const int i4) |
T | operator() (const int i1, const int i2, const int i3, const int i4, const int i5) const |
T & | operator() (const int i1, const int i2, const int i3, const int i4, const int i5) |
T | operator() (const int i1, const int i2, const int i3, const int i4, const int i5, const int i6) const |
T & | operator() (const int i1, const int i2, const int i3, const int i4, const int i5, const int i6) |
T | operator() (const int i1, const int i2, const int i3, const int i4, const int i5, const int i6, const int i7) const |
T & | operator() (const int i1, const int i2, const int i3, const int i4, const int i5, const int i6, const int i7) |
T | operator() (const FixedVector< int, 1 > &i) const |
T & | operator() (const FixedVector< int, 1 > &i) |
T | operator() (const FixedVector< int, 2 > &i) const |
T & | operator() (const FixedVector< int, 2 > &i) |
T | operator() (const FixedVector< int, 3 > &i) const |
T & | operator() (const FixedVector< int, 3 > &i) |
T | operator() (const FixedVector< int, 4 > &i) const |
T & | operator() (const FixedVector< int, 4 > &i) |
T | operator() (const FixedVector< int, 5 > &i) const |
T & | operator() (const FixedVector< int, 5 > &i) |
T | operator() (const FixedVector< int, 6 > &i) const |
T & | operator() (const FixedVector< int, 6 > &i) |
T | operator() (const FixedVector< int, 7 > &i) const |
T & | operator() (const FixedVector< int, 7 > &i) |
'Cutting' array access (indexing) via operator() | |
ltl::Range arguments, return (reference to) element. | |
MArray< T, N > | operator() (const Range &r1) const |
MArray< T, N > | operator() (const Range &r1, const Range &r2) const |
MArray< T, N > | operator() (const Range &r1, const Range &r2, const Range &r3) const |
MArray< T, N > | operator() (const Range &r1, const Range &r2, const Range &r3, const Range &r4) const |
MArray< T, N > | operator() (const Range &r1, const Range &r2, const Range &r3, const Range &r4, const Range &r5) const |
MArray< T, N > | operator() (const Range &r1, const Range &r2, const Range &r3, const Range &r4, const Range &r5, const Range &r6) const |
MArray< T, N > | operator() (const Range &r1, const Range &r2, const Range &r3, const Range &r4, const Range &r5, const Range &r6, const Range &r7) const |
template<typename T1 , typename T2 > | |
SliceCounter< T, T1, T2 > ::MArraySlice | operator() (T1 r1, T2 r2) const |
template<typename T1 , typename T2 , typename T3 > | |
SliceCounter< T, T1, T2, T3 > ::MArraySlice | operator() (T1 r1, T2 r2, T3 r3) const |
template<typename T1 , typename T2 , typename T3 , typename T4 > | |
SliceCounter< T, T1, T2, T3, T4 >::MArraySlice | operator() (T1 r1, T2 r2, T3 r3, T4 r4) const |
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > | |
SliceCounter< T, T1, T2, T3, T4, T5 >::MArraySlice | operator() (T1 r1, T2 r2, T3 r3, T4 r4, T5 r5) const |
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > | |
SliceCounter< T, T1, T2, T3, T4, T5, T6 >::MArraySlice | operator() (T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6) const |
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 > | |
SliceCounter< T, T1, T2, T3, T4, T5, T6, T7 >::MArraySlice | operator() (T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7) const |
Change bases: | |
Change the bases of the array (the bases are the first indices of each dimension) | |
void | setBase (const int b1) |
void | setBase (const int b1, const int b2) |
void | setBase (const int b1, const int b2, const int b3) |
void | setBase (const int b1, const int b2, const int b3, const int b4) |
void | setBase (const int b1, const int b2, const int b3, const int b4, const int b5) |
void | setBase (const int b1, const int b2, const int b3, const int b4, const int b5, const int b6) |
void | setBase (const int b1, const int b2, const int b3, const int b4, const int b5, const int b6, const int b7) |
iterator | iter () |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
T * | beginRA () |
const T * | beginRA () const |
T * | endRA () |
const T * | endRA () const |
Array information: | |
Interfaces ltl::Shape. | |
size_type | nelements () const |
Number of elements . More... | |
size_type | size () const |
Number of elements . More... | |
int | minIndex (const int dim) const |
First index along dimension dim (starting to count at 1) More... | |
int | maxIndex (const int dim) const |
Last index along dimension dim (starting to count at 1) More... | |
int | length (const int dim) const |
Length of dimension dim. More... | |
int | stride (const int dim) const |
Stride of dimension dim. More... | |
bool | isStride1 () const |
int | zeroOffset () const |
bool | isStorageContiguous () const |
bool | isConformable (const Shape< N > &other) const |
Check conformability with other ltl::Shape. More... | |
template<typename T2 > | |
bool | isConformable (const MArray< T2, N > &other) const |
Check conformability with other array. More... | |
const Shape< N > * | shape () const |
Return the ltl::Shape . More... | |
Reverse and Transpose: | |
Reorder array (without copy). Very fast! | |
void | reverseSelf (const int dim=1) |
Reverse this MArray. More... | |
MArray< T, N > | reverse (const int dim=1) const |
Return reversed MArray. More... | |
void | transposeSelf (const int dim1=1, const int dim2=2) |
Transpose this MArray. More... | |
MArray< T, N > | transpose (const int dim1=1, const int dim2=2) const |
Return transposed MArray. More... | |
Public Attributes | |
T *restrict_ | data_ |
Pointer to element ( 0, 0, ..., 0 ) More... | |
Protected Member Functions | |
template<typename T2 > | |
void | copy (const MArray< T2, N > &other) |
Copy from other. More... | |
void | fill (const T t) |
Fill with t. More... | |
void | subarray (const MArray< T, N > &other, const Range &r1) |
Constructs a pure subarray of other, i.e. rank is preserved. More... | |
void | subarray (const MArray< T, N > &other, const Range &r1, const Range &r2) |
void | subarray (const MArray< T, N > &other, const Range &r1, const Range &r2, const Range &r3) |
void | subarray (const MArray< T, N > &other, const Range &r1, const Range &r2, const Range &r3, const Range &r4) |
void | subarray (const MArray< T, N > &other, const Range &r1, const Range &r2, const Range &r3, const Range &r4, const Range &r5) |
void | subarray (const MArray< T, N > &other, const Range &r1, const Range &r2, const Range &r3, const Range &r4, const Range &r5, const Range &r6) |
void | subarray (const MArray< T, N > &other, const Range &r1, const Range &r2, const Range &r3, const Range &r4, const Range &r5, const Range &r6, const Range &r7) |
template<int N2, typename R1 , typename R2 , typename R3 , typename R4 , typename R5 , typename R6 , typename R7 > | |
void | slicearray (const MArray< T, N2 > &other, R1 r1, R2 r2, R3 r3, R4 r4, R5 r5, R6 r6, R7 r7) |
template<int N2> | |
void | slice (int &setRank, Range r, const MArray< T, N2 > &other, int sourceRank) |
template<int N2> | |
void | slice (int &setRank, int r, const MArray< T, N2 > &other, int sourceRank) |
template<int N2> | |
void | slice (int &, NoArgument, const MArray< T, N2 > &, int) |
void | setupMemory (const bool map=false, const char *filename=NULL) |
void | setupShape (const int *dims) |
void | setrange (const int dim, const Range &r) |
Protected Attributes | |
MemoryBlock< T > * | memBlock_ |
Our MemoryBlock. More... | |
Shape< N > | shape_ |
Holds shape information. More... | |
Friends | |
class | MArrayIter< T, N > |
class | MArrayIterConst< T, N > |
class | ListInitializationSwitch< MArray< T, N > > |
Related Functions | |
(Note that these are not member functions.) | |
template<class Expr > | |
ostream & | operator<< (ostream &os, const ExprBase< Expr, 1 > &E) |
template<class Expr > | |
ostream & | operator<< (ostream &os, const ExprBase< Expr, 2 > &E) |
template<class Expr > | |
ostream & | operator<< (ostream &os, const ExprBase< Expr, 3 > &E) |
template<class Expr > | |
ostream & | operator<< (ostream &os, const ExprBase< Expr, 4 > &E) |
template<class Expr > | |
ostream & | operator<< (ostream &os, const ExprBase< Expr, 5 > &E) |
template<class Expr > | |
ostream & | operator<< (ostream &os, const ExprBase< Expr, 6 > &E) |
template<class Expr > | |
ostream & | operator<< (ostream &os, const ExprBase< Expr, 7 > &E) |
template<class T , int N> | |
istream & | operator>> (istream &is, MArray< T, N > &A) |
A dynamic N-dimensional array storing objects of type T.
MArrays
feature subarrays (sometimes called views), slices, expression templated evaluation, and other features described below. The memory holding the actual data is reference counted, such that it is not freed until the last reference to the data by views or slices has been removed.
typedef MArrayIter<T,N> ltl::MArray< T, N >::Iterator |
typedef MArrayIterConst<T,N> ltl::MArray< T, N >::ConstIterator |
typedef IndexIter<T,N> ltl::MArray< T, N >::IndexIterator |
Index iterator for ltl::where() (indexing arbitrary subsets).
typedef FixedVector<int,N> ltl::MArray< T, N >::IndexV |
typedef IndexList<N> ltl::MArray< T, N >::IndexSet |
typedef T ltl::MArray< T, N >::value_type |
typedef T& ltl::MArray< T, N >::reference |
typedef const T& ltl::MArray< T, N >::const_reference |
typedef T* ltl::MArray< T, N >::pointer |
typedef const T* ltl::MArray< T, N >::const_pointer |
typedef size_t ltl::MArray< T, N >::size_type |
typedef MArrayIter<T,N> ltl::MArray< T, N >::iterator |
typedef MArrayIterConst<T,N> ltl::MArray< T, N >::const_iterator |
|
inherited |
|
inline |
Construct an array without allocating memory.
This is useful for constructing MArrays
whose values are to be read from a file, and thus the dimensions are not known yet.
MArray
only after being sure that ltl::MArray::realloc()
or
ltl::MArray::makeReference() has been called.
|
inline |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
Copy constructor. Only makes a reference !!!
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
Constructor for mixed slicing (int, rank reducing) and Range arguments.
Other array's data is referenced, NOT copied ( use operator=() for copy)!
ltl::MArray< T, N >::MArray | ( | T * | data, |
const int * | dims | ||
) |
Construct from allocated memory. Note that this memory will be freed when the MArray
is destructed.
ltl::MArray< T, N >::MArray | ( | const string | filename, |
const int * | dims | ||
) |
Construct from map file.
ltl::MArray< T, N >::MArray | ( | const Shape< N > * | s, |
const bool | map = false , |
||
const char * | filename = NULL |
||
) |
Construct from shape.
Useful to construct an array having the same geometry as another array. If you have map == true and give a filename the memory map will be saved.
ltl::MArray< T, N >::MArray | ( | const ExprNode< Expr, N > & | e, |
const bool | map = false , |
||
const char * | filename = NULL |
||
) |
Construct from an array-valued expression.
The new array is allocated with the shape of the expression and its elements are filled with the evaluated expression. If you have map == true and give a filename the memory map will be saved.
|
inline |
Decrement reference count of memory block. If 0 delete.
|
inline |
|
inline |
true
if MArray currenltly has have no memory allocated.
Referenced by ltl::MArray< TDAT, 2 >::isAllocated().
|
inline |
This.
Arrays have to have conformable shapes, no automatic resize takes place. Use realloc() instead! If the lhs ltl::MArray is empty()
, i.e. no memory has been allocated then memory conforming to other's
shape will be allocated.
overloads the default.
|
inline |
MArray<T,N>& ltl::MArray< T, N >::operator= | ( | const ExprNode< Expr, N > & | e | ) |
Assignment of an expression to a MArray
.
The MArray
and the expression have to have conformable shapes, no automatic resize takes place. Use realloc() instead! If the lhs ltl::MArray is empty()
, i.e. no memory has been allocated then memory conforming to the expression's shape will be allocated.
|
inline |
Assigns x
to all elements.
A bit more comlicated since we have to discriminate between
which is done using ListInitializationSwitch which either calls ListInitializer or MArray::fill().
MArray<T,N>& ltl::MArray< T, N >::operator+= | ( | const MArray< T2, N > & | a | ) |
MArray<T,N>& ltl::MArray< T, N >::operator-= | ( | const MArray< T2, N > & | a | ) |
MArray<T,N>& ltl::MArray< T, N >::operator*= | ( | const MArray< T2, N > & | a | ) |
MArray<T,N>& ltl::MArray< T, N >::operator/= | ( | const MArray< T2, N > & | a | ) |
MArray<T,N>& ltl::MArray< T, N >::operator&= | ( | const MArray< T2, N > & | a | ) |
MArray<T,N>& ltl::MArray< T, N >::operator|= | ( | const MArray< T2, N > & | a | ) |
MArray<T,N>& ltl::MArray< T, N >::operator^= | ( | const MArray< T2, N > & | a | ) |
MArray<T,N>& ltl::MArray< T, N >::operator+= | ( | const ExprNode< Expr, N > & | e | ) |
MArray<T,N>& ltl::MArray< T, N >::operator-= | ( | const ExprNode< Expr, N > & | e | ) |
MArray<T,N>& ltl::MArray< T, N >::operator*= | ( | const ExprNode< Expr, N > & | e | ) |
MArray<T,N>& ltl::MArray< T, N >::operator/= | ( | const ExprNode< Expr, N > & | e | ) |
MArray<T,N>& ltl::MArray< T, N >::operator&= | ( | const ExprNode< Expr, N > & | e | ) |
MArray<T,N>& ltl::MArray< T, N >::operator|= | ( | const ExprNode< Expr, N > & | e | ) |
MArray<T,N>& ltl::MArray< T, N >::operator^= | ( | const ExprNode< Expr, N > & | e | ) |
MArray<T,N>& ltl::MArray< T, N >::operator+= | ( | const T | a | ) |
MArray<T,N>& ltl::MArray< T, N >::operator-= | ( | const T | a | ) |
MArray<T,N>& ltl::MArray< T, N >::operator*= | ( | const T | a | ) |
MArray<T,N>& ltl::MArray< T, N >::operator/= | ( | const T | a | ) |
MArray<T,N>& ltl::MArray< T, N >::operator&= | ( | const T | a | ) |
MArray<T,N>& ltl::MArray< T, N >::operator|= | ( | const T | a | ) |
MArray<T,N>& ltl::MArray< T, N >::operator^= | ( | const T | a | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Index with ltl::IndexList (rhs version).
Return ltl::MArray<T,1> object.
|
inline |
Index with ltl::IndexList (lhs version).
Assignment to self indexed with IndexList A[l] = Expr<T,1> IndexRef object is needed to carry the operator=( Expr ) method.
void ltl::MArray< T, N >::setBase | ( | const int | b1 | ) |
void ltl::MArray< T, N >::setBase | ( | const int | b1, |
const int | b2 | ||
) |
void ltl::MArray< T, N >::setBase | ( | const int | b1, |
const int | b2, | ||
const int | b3 | ||
) |
void ltl::MArray< T, N >::setBase | ( | const int | b1, |
const int | b2, | ||
const int | b3, | ||
const int | b4 | ||
) |
void ltl::MArray< T, N >::setBase | ( | const int | b1, |
const int | b2, | ||
const int | b3, | ||
const int | b4, | ||
const int | b5 | ||
) |
void ltl::MArray< T, N >::setBase | ( | const int | b1, |
const int | b2, | ||
const int | b3, | ||
const int | b4, | ||
const int | b5, | ||
const int | b6 | ||
) |
void ltl::MArray< T, N >::setBase | ( | const int | b1, |
const int | b2, | ||
const int | b3, | ||
const int | b4, | ||
const int | b5, | ||
const int | b6, | ||
const int | b7 | ||
) |
void ltl::MArray< T, N >::makeReference | ( | const MArray< T, N > & | other | ) |
Make this being a referece to other's data.
Referenced by ltl::MArray< TDAT, 2 >::MArray(), ltl::FitsIn::operator>>(), and ltl::FitsBinTableIn::readColumn().
void ltl::MArray< T, N >::makeReferenceWithDims | ( | const MArray< T, N2 > & | other, |
const int * | dims | ||
) |
Make a reference as a different-dimensional view of another MArray's
data.
The new array is referencing the other's
data but takes it to have rank N
instead of N2 and dimensions dims
[0] ... dims
[N-1]. Use with care. Memory must be contiguous.
void ltl::MArray< T, N >::realloc | ( | const Shape< N > & | s, |
const bool | map = false , |
||
const char * | filename = NULL |
||
) |
Reallocate memory. Data are abolished.
If you have map == true and give a filename the new memory map will be saved.
Referenced by ltl::MArray< T, N >::operator>>().
|
inline |
|
inline |
Referenced by ltl::average_clip_median(), ltl::PolynomFit< TPAR, TDAT, ORDER, EXT, 1 >::eval(), ltl::PolynomFit< TPAR, TDAT, ORDER, false, 2 >::eval(), ltl::PolynomFit< TPAR, TDAT, ORDER, true, 2 >::eval(), ltl::PolynomFit< TPAR, TDAT, ORDER, EXT, 1 >::fill(), ltl::PolynomFit< TPAR, TDAT, ORDER, false, 2 >::fill(), ltl::PolynomFit< TPAR, TDAT, ORDER, true, 2 >::fill(), ltl::insertFitsMArray(), ltl::median_clip_average(), ltl::median_sorted_array(), and ltl::MArray< T, N >::operator>>().
|
inline |
|
inline |
|
inline |
|
inline |
In case our memory layout is contiguous, we can offer an easy solution to provide random access iterators.
Referenced by ltl::MArray< TDAT, 2 >::endRA(), ltl::kappa_average_median(), ltl::kappa_median_average(), ltl::kappa_sigma_median(), and ltl::median_exact().
|
inline |
|
inline |
Referenced by ltl::kappa_average_median(), ltl::kappa_median_average(), ltl::kappa_sigma_median(), and ltl::median_exact().
|
inline |
|
inline |
Pointer to first data element.
Referenced by ltl::MArray< TDAT, 2 >::beginRA(), and ltl::MArrayIterConst< T, N >::MArrayIterConst().
|
inline |
An iterator-style thing providing indices when dereferenced.
I.e. *i or i() gives a FixedVector holding the indices and and i(int) gives the index in the i-th dimension
Referenced by ltl::PolynomFit< TPAR, TDAT, ORDER, EXT, 1 >::eval(), ltl::PolynomFit< TPAR, TDAT, ORDER, false, 2 >::eval(), ltl::PolynomFit< TPAR, TDAT, ORDER, true, 2 >::eval(), ltl::PolynomFit< TPAR, TDAT, ORDER, EXT, 1 >::fill(), ltl::PolynomFit< TPAR, TDAT, ORDER, false, 2 >::fill(), ltl::PolynomFit< TPAR, TDAT, ORDER, true, 2 >::fill(), ltl::indexPosDbl(), ltl::indexPosFlt(), and ltl::indexPosInt().
|
inline |
Number of elements .
Referenced by ltl::MArray< TDAT, 2 >::endRA(), ltl::insertFitsMArray(), ltl::MArrayIterConst< T, N >::MArrayIterConst(), ltl::median_sorted_array(), and ltl::MArray< TDAT, 2 >::size().
|
inline |
Number of elements .
|
inline |
First index along dimension dim (starting to count at 1)
Referenced by ltl::MArray< T, N >::operator>>(), ltl::Gnuplot::send(), and ltl::Gnuplot::sendAsImage().
|
inline |
Last index along dimension dim (starting to count at 1)
Referenced by ltl::MArray< T, N >::operator>>(), ltl::Gnuplot::send(), and ltl::Gnuplot::sendAsImage().
|
inline |
Length of dimension dim.
Referenced by ltl::insertFitsMArray().
|
inline |
Stride of dimension dim.
Referenced by ltl::MArray< TDAT, 2 >::isStride1().
|
inline |
|
inline |
|
inline |
Referenced by ltl::MArray< TDAT, 2 >::beginRA().
|
inline |
Check conformability with other ltl::Shape.
|
inline |
Check conformability with other array.
|
inline |
|
inline |
Return pointer to associated MemoryBlock .
|
inline |
Return true, if MArray
has associated MemoryBlock.
Referenced by ltl::FitsIn::operator>>().
void ltl::MArray< T, N >::reverseSelf | ( | const int | dim = 1 | ) |
Reverse this MArray.
MArray<T, N> ltl::MArray< T, N >::reverse | ( | const int | dim = 1 | ) | const |
Return reversed MArray.
void ltl::MArray< T, N >::transposeSelf | ( | const int | dim1 = 1 , |
const int | dim2 = 2 |
||
) |
Transpose this MArray.
MArray<T, N> ltl::MArray< T, N >::transpose | ( | const int | dim1 = 1 , |
const int | dim2 = 2 |
||
) | const |
Return transposed MArray.
void ltl::MArray< T, N >::describeSelf | ( | ) | const |
Debug output. Print geometry information.
|
protected |
Copy from other.
Referenced by ltl::MArray< TDAT, 2 >::operator=().
|
protected |
Fill with t.
|
protected |
Constructs a pure subarray of other, i.e. rank is preserved.
Referenced by ltl::MArray< TDAT, 2 >::MArray().
|
protected |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
protected |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
protected |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
protected |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
protected |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
protected |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
protected |
Referenced by ltl::MArray< TDAT, 2 >::MArray().
|
protected |
|
protected |
|
inlineprotected |
|
protected |
Referenced by ltl::MArray< TDAT, 2 >::MArray().
|
protected |
|
protected |
|
inlineinherited |
|
inlineinherited |
|
friend |
|
friend |
|
friend |
|
protected |
Our MemoryBlock.
Referenced by ltl::MArray< TDAT, 2 >::empty(), ltl::MArray< TDAT, 2 >::free(), ltl::MArray< TDAT, 2 >::memoryBlock(), and ltl::MArray< TDAT, 2 >::~MArray().
|
protected |
Holds shape information.
And zeroOffset_ which is the distance between data_ and the the address of the first element of the array, such that
always holds.
Referenced by ltl::MArray< TDAT, 2 >::data(), ltl::MArray< TDAT, 2 >::isConformable(), ltl::MArray< TDAT, 2 >::isStorageContiguous(), ltl::MArray< TDAT, 2 >::length(), ltl::MArray< TDAT, 2 >::maxIndex(), ltl::MArray< TDAT, 2 >::minIndex(), ltl::MArray< TDAT, 2 >::operator()(), ltl::MArray< TDAT, 2 >::shape(), ltl::MArray< TDAT, 2 >::stride(), and ltl::MArray< TDAT, 2 >::zeroOffset().
T* restrict_ ltl::MArray< T, N >::data_ |
Pointer to element ( 0, 0, ..., 0 )
Referenced by ltl::MArray< TDAT, 2 >::data(), ltl::MArray< TDAT, 2 >::free(), ltl::MArray< TDAT, 2 >::operator()(), and ltl::MArray< TDAT, 2 >::~MArray().