ltl::MArray< T, N > Class Template Reference
[The Class MArray]

A dynamic N-dimensional array storing objects of type T. More...

Inherits ExprBase< MArray< T, N >, N >.

List of all members.

Public Types

STL definitions:



Public Member Functions

Construct an (optionally mapped) array of rank N with ltl::Range size arguments.



Construct an array of rank N with int size arguments.

Index ranges {1..ni, i=1..N}, int arguments, base defaults to 1.



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() !



Construct from preexisting data.

The array dims[] holds the lengths of each dimension (The number of dimensions, and hence the length of dims[] is known from the template parameter N.) No checking is performed. The index ranges are {1..dims[i]} along each dimension i.



Operator=, other's data is copied, own data overwritten



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= 

.



Elementwise array access (indexing) via operator()

int / ltl::FixedVector arguments, return (reference to) element.



'Cutting' array access (indexing) via operator()

ltl::Range arguments, return (reference to) element.



Change bases:

Change the bases of the array (the bases are the first indices of each dimension)





Array information:

Interfaces ltl::Shape.



Reverse and Transpose:

Reorder array (without copy). Very fast!



Public Attributes

Protected Member Functions

Protected Attributes

Friends

Related Functions

(Note that these are not member functions.)


Detailed Description

template<typename T, int N>
class ltl::MArray< T, N >

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.


Member Typedef Documentation

template<typename T, int N>
typedef MArrayIter<T,N> ltl::MArray< T, N >::Iterator
template<typename T, int N>
typedef MArrayIterConst<T,N> ltl::MArray< T, N >::ConstIterator
template<typename T, int N>
typedef IndexIter<T,N> ltl::MArray< T, N >::IndexIterator

Index iterator for ltl::where() (indexing arbitrary subsets).

template<typename T, int N>
typedef FixedVector<int,N> ltl::MArray< T, N >::IndexV
template<typename T, int N>
typedef IndexList<N> ltl::MArray< T, N >::IndexSet
template<typename T, int N>
typedef T ltl::MArray< T, N >::value_type
template<typename T, int N>
typedef T& ltl::MArray< T, N >::reference
template<typename T, int N>
typedef const T& ltl::MArray< T, N >::const_reference
template<typename T, int N>
typedef T* ltl::MArray< T, N >::pointer
template<typename T, int N>
typedef const T* ltl::MArray< T, N >::const_pointer
template<typename T, int N>
typedef size_t ltl::MArray< T, N >::size_type
template<typename T, int N>
typedef MArrayIter<T,N> ltl::MArray< T, N >::iterator
template<typename T, int N>
typedef MArrayIterConst<T,N> ltl::MArray< T, N >::const_iterator

Member Enumeration Documentation

anonymous enum [inherited]

Constructor & Destructor Documentation

template<typename T, int N>
ltl::MArray< T, N >::MArray (  )  [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.

Warning:
Use this with care! Use this MArray only after being sure that ltl::MArray::realloc() or ltl::MArray::makeReference() has been called.
template<typename T, int N>
ltl::MArray< T, N >::MArray ( const Range r1,
const bool  map = false 
) [inline]
template<typename T, int N>
ltl::MArray< T, N >::MArray ( const Range r1,
const Range r2,
const bool  map = false 
) [inline]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
ltl::MArray< T, N >::MArray ( const Range r1,
const Range r2,
const Range r3,
const bool  map = false 
) [inline]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
ltl::MArray< T, N >::MArray ( const Range r1,
const Range r2,
const Range r3,
const Range r4,
const bool  map = false 
) [inline]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
ltl::MArray< T, N >::MArray ( const Range r1,
const Range r2,
const Range r3,
const Range r4,
const Range r5,
const bool  map = false 
) [inline]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
ltl::MArray< T, N >::MArray ( const Range r1,
const Range r2,
const Range r3,
const Range r4,
const Range r5,
const Range r6,
const bool  map = false 
) [inline]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
ltl::MArray< T, N >::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 
) [inline]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
ltl::MArray< T, N >::MArray ( const int  r1,
const bool  map = false 
) [inline]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
ltl::MArray< T, N >::MArray ( const int  r1,
const int  r2,
const bool  map = false 
) [inline]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
ltl::MArray< T, N >::MArray ( const int  r1,
const int  r2,
const int  r3,
const bool  map = false 
) [inline]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
ltl::MArray< T, N >::MArray ( const int  r1,
const int  r2,
const int  r3,
const int  r4,
const bool  map = false 
) [inline]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
ltl::MArray< T, N >::MArray ( const int  r1,
const int  r2,
const int  r3,
const int  r4,
const int  r5,
const bool  map = false 
) [inline]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
ltl::MArray< T, N >::MArray ( const int  r1,
const int  r2,
const int  r3,
const int  r4,
const int  r5,
const int  r6,
const bool  map = false 
) [inline]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
ltl::MArray< T, N >::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 
) [inline]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
ltl::MArray< T, N >::MArray ( const MArray< T, N > &  other  )  [inline]

Copy constructor. Only makes a reference !!!.

template<typename T, int N>
ltl::MArray< T, N >::MArray ( const MArray< T, N > &  other,
const Range r0 
) [inline]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
ltl::MArray< T, N >::MArray ( const MArray< T, N > &  other,
const Range r1,
const Range r2 
) [inline]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
ltl::MArray< T, N >::MArray ( const MArray< T, N > &  other,
const Range r1,
const Range r2,
const Range r3 
) [inline]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
ltl::MArray< T, N >::MArray ( const MArray< T, N > &  other,
const Range r1,
const Range r2,
const Range r3,
const Range r4 
) [inline]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
ltl::MArray< T, N >::MArray ( const MArray< T, N > &  other,
const Range r1,
const Range r2,
const Range r3,
const Range r4,
const Range r5 
) [inline]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
ltl::MArray< T, N >::MArray ( const MArray< T, N > &  other,
const Range r1,
const Range r2,
const Range r3,
const Range r4,
const Range r5,
const Range r6 
) [inline]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
ltl::MArray< T, N >::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 
) [inline]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
template<int N2, typename R1 , typename R2 , typename R3 , typename R4 , typename R5 , typename R6 , typename R7 >
ltl::MArray< T, N >::MArray ( const MArray< T, N2 > &  other,
R1  r1,
R2  r2,
R3  r3,
R4  r4,
R5  r5,
R6  r6,
R7  r7 
) [inline]

Constructor for mixed slicing (int, rank reducing) and Range arguments.

Other array's data is referenced, NOT copied ( use operator=() for copy)!

template<typename T, int N>
ltl::MArray< T, N >::MArray ( T *  data,
const int dims 
)

Construct from allocated memory.

template<typename T, int N>
ltl::MArray< T, N >::MArray ( const string  filename,
const int dims 
)

Construct from map file.

template<typename T, int N>
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.

template<typename T, int N>
template<typename Expr >
ltl::MArray< T, N >::MArray ( const ExprNode< Expr, N > &  e,
const bool  map = false,
const char *  filename = NULL 
) [inline]

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.

template<typename T, int N>
ltl::MArray< T, N >::~MArray (  )  [inline]

Decrement reference count of memory block. If 0 delete.


Member Function Documentation

template<typename T, int N>
void ltl::MArray< T, N >::free (  )  [inline]

Free associated memory.

Frees the memory used to store the data before the MArray goes out of scope (before the destructor is being called). Can help keeping code cleaner without using pointers to MArray.

template<typename T, int N>
bool ltl::MArray< T, N >::empty (  )  const [inline]

true if MArray currenltly has have no memory allocated.

Referenced by ltl::MArray< TDAT, 2 >::isAllocated().

template<typename T, int N>
MArray<T,N>& ltl::MArray< T, N >::operator= ( const MArray< T, N > &  other  )  [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.

template<typename T, int N>
template<typename T2 >
MArray<T,N>& ltl::MArray< T, N >::operator= ( const MArray< T2, N > &  other  )  [inline]

This.

is more general than the default.

template<typename T, int N>
template<typename Expr >
MArray<T,N>& ltl::MArray< T, N >::operator= ( const ExprNode< Expr, N > &  e  )  [inline]

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.

template<typename T, int N>
ListInitializationSwitch< MArray<T,N> > ltl::MArray< T, N >::operator= ( x  )  [inline]

Assigns x to all elements.

A bit more comlicated since we have to discriminate between

 A = 3; and A = 1, 2, 3, 4;

which is done using ListInitializationSwitch which either calls ListInitializer or MArray::fill().

template<typename T, int N>
template<typename T2 >
MArray<T,N>& ltl::MArray< T, N >::operator+= ( const MArray< T2, N > &  a  )  [inline]
template<typename T, int N>
template<typename T2 >
MArray<T,N>& ltl::MArray< T, N >::operator-= ( const MArray< T2, N > &  a  )  [inline]
template<typename T, int N>
template<typename T2 >
MArray<T,N>& ltl::MArray< T, N >::operator*= ( const MArray< T2, N > &  a  )  [inline]
template<typename T, int N>
template<typename T2 >
MArray<T,N>& ltl::MArray< T, N >::operator/= ( const MArray< T2, N > &  a  )  [inline]
template<typename T, int N>
template<typename T2 >
MArray<T,N>& ltl::MArray< T, N >::operator&= ( const MArray< T2, N > &  a  )  [inline]
template<typename T, int N>
template<typename T2 >
MArray<T,N>& ltl::MArray< T, N >::operator|= ( const MArray< T2, N > &  a  )  [inline]
template<typename T, int N>
template<typename T2 >
MArray<T,N>& ltl::MArray< T, N >::operator^= ( const MArray< T2, N > &  a  )  [inline]
template<typename T, int N>
template<typename Expr >
MArray<T,N>& ltl::MArray< T, N >::operator+= ( const ExprNode< Expr, N > &  e  )  [inline]
template<typename T, int N>
template<typename Expr >
MArray<T,N>& ltl::MArray< T, N >::operator-= ( const ExprNode< Expr, N > &  e  )  [inline]
template<typename T, int N>
template<typename Expr >
MArray<T,N>& ltl::MArray< T, N >::operator*= ( const ExprNode< Expr, N > &  e  )  [inline]
template<typename T, int N>
template<typename Expr >
MArray<T,N>& ltl::MArray< T, N >::operator/= ( const ExprNode< Expr, N > &  e  )  [inline]
template<typename T, int N>
template<typename Expr >
MArray<T,N>& ltl::MArray< T, N >::operator&= ( const ExprNode< Expr, N > &  e  )  [inline]
template<typename T, int N>
template<typename Expr >
MArray<T,N>& ltl::MArray< T, N >::operator|= ( const ExprNode< Expr, N > &  e  )  [inline]
template<typename T, int N>
template<typename Expr >
MArray<T,N>& ltl::MArray< T, N >::operator^= ( const ExprNode< Expr, N > &  e  )  [inline]
template<typename T, int N>
MArray<T,N>& ltl::MArray< T, N >::operator+= ( const T  a  ) 
template<typename T, int N>
MArray<T,N>& ltl::MArray< T, N >::operator-= ( const T  a  ) 
template<typename T, int N>
MArray<T,N>& ltl::MArray< T, N >::operator*= ( const T  a  ) 
template<typename T, int N>
MArray<T,N>& ltl::MArray< T, N >::operator/= ( const T  a  ) 
template<typename T, int N>
MArray<T,N>& ltl::MArray< T, N >::operator&= ( const T  a  ) 
template<typename T, int N>
MArray<T,N>& ltl::MArray< T, N >::operator|= ( const T  a  ) 
template<typename T, int N>
MArray<T,N>& ltl::MArray< T, N >::operator^= ( const T  a  ) 
template<typename T, int N>
T ltl::MArray< T, N >::operator() ( const int  i1  )  const [inline]
template<typename T, int N>
T& ltl::MArray< T, N >::operator() ( const int  i1  )  [inline]
template<typename T, int N>
T ltl::MArray< T, N >::operator() ( const int  i1,
const int  i2 
) const [inline]
template<typename T, int N>
T& ltl::MArray< T, N >::operator() ( const int  i1,
const int  i2 
) [inline]
template<typename T, int N>
T ltl::MArray< T, N >::operator() ( const int  i1,
const int  i2,
const int  i3 
) const [inline]
template<typename T, int N>
T& ltl::MArray< T, N >::operator() ( const int  i1,
const int  i2,
const int  i3 
) [inline]
template<typename T, int N>
T ltl::MArray< T, N >::operator() ( const int  i1,
const int  i2,
const int  i3,
const int  i4 
) const [inline]
template<typename T, int N>
T& ltl::MArray< T, N >::operator() ( const int  i1,
const int  i2,
const int  i3,
const int  i4 
) [inline]
template<typename T, int N>
T ltl::MArray< T, N >::operator() ( const int  i1,
const int  i2,
const int  i3,
const int  i4,
const int  i5 
) const [inline]
template<typename T, int N>
T& ltl::MArray< T, N >::operator() ( const int  i1,
const int  i2,
const int  i3,
const int  i4,
const int  i5 
) [inline]
template<typename T, int N>
T ltl::MArray< T, N >::operator() ( const int  i1,
const int  i2,
const int  i3,
const int  i4,
const int  i5,
const int  i6 
) const [inline]
template<typename T, int N>
T& ltl::MArray< T, N >::operator() ( const int  i1,
const int  i2,
const int  i3,
const int  i4,
const int  i5,
const int  i6 
) [inline]
template<typename T, int N>
T ltl::MArray< T, N >::operator() ( const int  i1,
const int  i2,
const int  i3,
const int  i4,
const int  i5,
const int  i6,
const int  i7 
) const [inline]
template<typename T, int N>
T& ltl::MArray< T, N >::operator() ( const int  i1,
const int  i2,
const int  i3,
const int  i4,
const int  i5,
const int  i6,
const int  i7 
) [inline]
template<typename T, int N>
T ltl::MArray< T, N >::operator() ( const FixedVector< int, 1 > &  i  )  const [inline]
template<typename T, int N>
T& ltl::MArray< T, N >::operator() ( const FixedVector< int, 1 > &  i  )  [inline]
template<typename T, int N>
T ltl::MArray< T, N >::operator() ( const FixedVector< int, 2 > &  i  )  const [inline]
template<typename T, int N>
T& ltl::MArray< T, N >::operator() ( const FixedVector< int, 2 > &  i  )  [inline]
template<typename T, int N>
T ltl::MArray< T, N >::operator() ( const FixedVector< int, 3 > &  i  )  const [inline]
template<typename T, int N>
T& ltl::MArray< T, N >::operator() ( const FixedVector< int, 3 > &  i  )  [inline]
template<typename T, int N>
T ltl::MArray< T, N >::operator() ( const FixedVector< int, 4 > &  i  )  const [inline]
template<typename T, int N>
T& ltl::MArray< T, N >::operator() ( const FixedVector< int, 4 > &  i  )  [inline]
template<typename T, int N>
T ltl::MArray< T, N >::operator() ( const FixedVector< int, 5 > &  i  )  const [inline]
template<typename T, int N>
T& ltl::MArray< T, N >::operator() ( const FixedVector< int, 5 > &  i  )  [inline]
template<typename T, int N>
T ltl::MArray< T, N >::operator() ( const FixedVector< int, 6 > &  i  )  const [inline]
template<typename T, int N>
T& ltl::MArray< T, N >::operator() ( const FixedVector< int, 6 > &  i  )  [inline]
template<typename T, int N>
T ltl::MArray< T, N >::operator() ( const FixedVector< int, 7 > &  i  )  const [inline]
template<typename T, int N>
T& ltl::MArray< T, N >::operator() ( const FixedVector< int, 7 > &  i  )  [inline]
template<typename T, int N>
MArray<T,N> ltl::MArray< T, N >::operator() ( const Range r1  )  const [inline]
template<typename T, int N>
MArray<T,N> ltl::MArray< T, N >::operator() ( const Range r1,
const Range r2 
) const [inline]
template<typename T, int N>
MArray<T,N> ltl::MArray< T, N >::operator() ( const Range r1,
const Range r2,
const Range r3 
) const [inline]
template<typename T, int N>
MArray<T,N> ltl::MArray< T, N >::operator() ( const Range r1,
const Range r2,
const Range r3,
const Range r4 
) const [inline]
template<typename T, int N>
MArray<T,N> ltl::MArray< T, N >::operator() ( const Range r1,
const Range r2,
const Range r3,
const Range r4,
const Range r5 
) const [inline]
template<typename T, int N>
MArray<T,N> ltl::MArray< T, N >::operator() ( const Range r1,
const Range r2,
const Range r3,
const Range r4,
const Range r5,
const Range r6 
) const [inline]
template<typename T, int N>
MArray<T,N> ltl::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 [inline]
template<typename T, int N>
template<typename T1 , typename T2 >
SliceCounter<T,T1,T2>::MArraySlice ltl::MArray< T, N >::operator() ( T1  r1,
T2  r2 
) const [inline]
template<typename T, int N>
template<typename T1 , typename T2 , typename T3 >
SliceCounter<T,T1,T2,T3>::MArraySlice ltl::MArray< T, N >::operator() ( T1  r1,
T2  r2,
T3  r3 
) const [inline]
template<typename T, int N>
template<typename T1 , typename T2 , typename T3 , typename T4 >
SliceCounter<T,T1,T2,T3,T4>::MArraySlice ltl::MArray< T, N >::operator() ( T1  r1,
T2  r2,
T3  r3,
T4  r4 
) const [inline]
template<typename T, int N>
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
SliceCounter<T,T1,T2,T3,T4,T5>::MArraySlice ltl::MArray< T, N >::operator() ( T1  r1,
T2  r2,
T3  r3,
T4  r4,
T5  r5 
) const [inline]
template<typename T, int N>
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 >
SliceCounter<T,T1,T2,T3,T4,T5,T6>::MArraySlice ltl::MArray< T, N >::operator() ( T1  r1,
T2  r2,
T3  r3,
T4  r4,
T5  r5,
T6  r6 
) const [inline]
template<typename T, int N>
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 ltl::MArray< T, N >::operator() ( T1  r1,
T2  r2,
T3  r3,
T4  r4,
T5  r5,
T6  r6,
T7  r7 
) const [inline]
template<typename T, int N>
MArray<T,1> ltl::MArray< T, N >::operator() ( const IndexList< N > &  l  )  const [inline]

Index with ltl::IndexList (rhs version).

Return ltl::MArray<T,1> object.

template<typename T, int N>
IndexRef<T,N> ltl::MArray< T, N >::operator[] ( const IndexList< N > &  l  )  [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.

template<typename T, int N>
void ltl::MArray< T, N >::setBase ( const int  b1  ) 
template<typename T, int N>
void ltl::MArray< T, N >::setBase ( const int  b1,
const int  b2 
)
template<typename T, int N>
void ltl::MArray< T, N >::setBase ( const int  b1,
const int  b2,
const int  b3 
)
template<typename T, int N>
void ltl::MArray< T, N >::setBase ( const int  b1,
const int  b2,
const int  b3,
const int  b4 
)
template<typename T, int N>
void ltl::MArray< T, N >::setBase ( const int  b1,
const int  b2,
const int  b3,
const int  b4,
const int  b5 
)
template<typename T, int N>
void ltl::MArray< T, N >::setBase ( const int  b1,
const int  b2,
const int  b3,
const int  b4,
const int  b5,
const int  b6 
)
template<typename T, int N>
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 
)
template<typename T, int N>
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().

template<typename T, int N>
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>>().

template<typename T, int N>
iterator ltl::MArray< T, N >::iter (  )  [inline]
template<typename T, int N>
iterator ltl::MArray< T, N >::begin (  )  [inline]
template<typename T, int N>
const_iterator ltl::MArray< T, N >::begin (  )  const [inline]
template<typename T, int N>
iterator ltl::MArray< T, N >::end (  )  [inline]
template<typename T, int N>
const_iterator ltl::MArray< T, N >::end (  )  const [inline]
template<typename T, int N>
T* ltl::MArray< T, N >::beginRA (  )  [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().

template<typename T, int N>
const T* ltl::MArray< T, N >::beginRA (  )  const [inline]
template<typename T, int N>
T* ltl::MArray< T, N >::endRA (  )  [inline]
template<typename T, int N>
const T* ltl::MArray< T, N >::endRA (  )  const [inline]
template<typename T, int N>
T* ltl::MArray< T, N >::data (  )  const [inline]

Pointer to first data element.

Warning:
The second data element NEED NOT be at first + 1 since the memeory might be non-contiguous. Use iteators!

Referenced by ltl::MArray< TDAT, 2 >::beginRA(), and ltl::MArrayIterConst< T, N >::MArrayIterConst().

template<typename T, int N>
IndexIterator ltl::MArray< T, N >::indexBegin (  )  const [inline]
template<typename T, int N>
size_type ltl::MArray< T, N >::nelements (  )  const [inline]
template<typename T, int N>
size_type ltl::MArray< T, N >::size (  )  const [inline]

Number of elements .

template<typename T, int N>
int ltl::MArray< T, N >::minIndex ( const int  dim  )  const [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().

template<typename T, int N>
int ltl::MArray< T, N >::maxIndex ( const int  dim  )  const [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().

template<typename T, int N>
int ltl::MArray< T, N >::length ( const int  dim  )  const [inline]

Length of dimension dim.

Referenced by ltl::insertFitsMArray().

template<typename T, int N>
int ltl::MArray< T, N >::stride ( const int  dim  )  const [inline]

Stride of dimension dim.

Referenced by ltl::MArray< TDAT, 2 >::isStride1().

template<typename T, int N>
bool ltl::MArray< T, N >::isStride1 (  )  const [inline]
template<typename T, int N>
int ltl::MArray< T, N >::zeroOffset (  )  const [inline]
template<typename T, int N>
bool ltl::MArray< T, N >::isStorageContiguous (  )  const [inline]
template<typename T, int N>
bool ltl::MArray< T, N >::isConformable ( const Shape< N > &  other  )  const [inline]

Check conformability with other ltl::Shape.

template<typename T, int N>
template<typename T2 >
bool ltl::MArray< T, N >::isConformable ( const MArray< T2, N > &  other  )  const [inline]

Check conformability with other array.

template<typename T, int N>
const Shape<N>* ltl::MArray< T, N >::shape (  )  const [inline]
template<typename T, int N>
MemoryBlock<T>* ltl::MArray< T, N >::memoryBlock (  )  const [inline]

Return pointer to associated MemoryBlock .

template<typename T, int N>
bool ltl::MArray< T, N >::isAllocated (  )  const [inline]

Return true, if MArray has associated MemoryBlock.

Referenced by ltl::FitsIn::operator>>().

template<typename T, int N>
void ltl::MArray< T, N >::reverseSelf ( const int  dim = 1  ) 

Reverse this MArray.

template<typename T, int N>
MArray<T, N> ltl::MArray< T, N >::reverse ( const int  dim = 1  )  const

Return reversed MArray.

template<typename T, int N>
void ltl::MArray< T, N >::transposeSelf ( const int  dim1 = 1,
const int  dim2 = 2 
)

Transpose this MArray.

template<typename T, int N>
MArray<T, N> ltl::MArray< T, N >::transpose ( const int  dim1 = 1,
const int  dim2 = 2 
) const

Return transposed MArray.

template<typename T, int N>
void ltl::MArray< T, N >::describeSelf (  )  const

Debug output. Print geometry information.

template<typename T, int N>
template<typename T2 >
void ltl::MArray< T, N >::copy ( const MArray< T2, N > &  other  )  [inline, protected]

Copy from other.

Referenced by ltl::MArray< TDAT, 2 >::operator=().

template<typename T, int N>
void ltl::MArray< T, N >::fill ( const T  t  )  [protected]

Fill with t.

template<typename T, int N>
void ltl::MArray< T, N >::subarray ( const MArray< T, N > &  other,
const Range r1 
) [protected]

Constructs a pure subarray of other, i.e. rank is preserved.

Referenced by ltl::MArray< TDAT, 2 >::MArray().

template<typename T, int N>
void ltl::MArray< T, N >::subarray ( const MArray< T, N > &  other,
const Range r1,
const Range r2 
) [protected]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
void ltl::MArray< T, N >::subarray ( const MArray< T, N > &  other,
const Range r1,
const Range r2,
const Range r3 
) [protected]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
void ltl::MArray< T, N >::subarray ( const MArray< T, N > &  other,
const Range r1,
const Range r2,
const Range r3,
const Range r4 
) [protected]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
void ltl::MArray< T, N >::subarray ( const MArray< T, N > &  other,
const Range r1,
const Range r2,
const Range r3,
const Range r4,
const Range r5 
) [protected]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
void ltl::MArray< T, N >::subarray ( const MArray< T, N > &  other,
const Range r1,
const Range r2,
const Range r3,
const Range r4,
const Range r5,
const Range r6 
) [protected]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
void ltl::MArray< T, N >::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 
) [protected]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T, int N>
template<int N2, typename R1 , typename R2 , typename R3 , typename R4 , typename R5 , typename R6 , typename R7 >
void ltl::MArray< T, N >::slicearray ( const MArray< T, N2 > &  other,
R1  r1,
R2  r2,
R3  r3,
R4  r4,
R5  r5,
R6  r6,
R7  r7 
) [inline, protected]
template<typename T, int N>
template<int N2>
void ltl::MArray< T, N >::slice ( int setRank,
Range  r,
const MArray< T, N2 > &  other,
int  sourceRank 
) [inline, protected]
template<typename T, int N>
template<int N2>
void ltl::MArray< T, N >::slice ( int setRank,
int  r,
const MArray< T, N2 > &  other,
int  sourceRank 
) [inline, protected]
template<typename T, int N>
template<int N2>
void ltl::MArray< T, N >::slice ( int ,
NoArgument  ,
const MArray< T, N2 > &  ,
int   
) [inline, protected]
template<typename T, int N>
void ltl::MArray< T, N >::setupMemory ( const bool  map = false,
const char *  filename = NULL 
) [protected]
template<typename T, int N>
void ltl::MArray< T, N >::setupShape ( const int dims  )  [protected]
template<typename T, int N>
void ltl::MArray< T, N >::setrange ( const int  dim,
const Range r 
) [protected]
MArray< T, N > & ltl::ExprBase< MArray< T, N > , N_Dims >::derived (  )  [inline, inherited]
const MArray< T, N > & ltl::ExprBase< MArray< T, N > , N_Dims >::derived (  )  const [inline, inherited]

Friends And Related Function Documentation

template<typename T, int N>
friend class MArrayIter< T, N > [friend]
template<typename T, int N>
friend class MArrayIterConst< T, N > [friend]
template<typename T, int N>
friend class ListInitializationSwitch< MArray< T, N > > [friend]

Member Data Documentation

template<typename T, int N>
MemoryBlock<T>* ltl::MArray< T, N >::memBlock_ [protected]
template<typename T, int N>
Shape<N> ltl::MArray< T, N >::shape_ [protected]
template<typename T, int N>
T* restrict_ ltl::MArray< T, N >::data_

Generated on 19 Feb 2015 for LTL by  doxygen 1.6.1