Main Page | Namespace List | Class Hierarchy | Compound List | File List | Namespace Members | Compound Members

esso Namespace Reference

Namespace for fast arrays for numerical computation. More...


Compounds

class  Array
 Multidimensional, efficient array class for large data sets. More...

class  Array< N, Fix< T0 > >
 Multidimensional, efficient array class for large data sets. More...

class  Ix
 Represents a small, fast vector. More...

class  Permutation
 Represents a permutation of dimensions. More...


Array assignment operations

template<int N, class DType, class ST> const Array< N, DType > & operator<<= (const Array< N, DType > &dst, const ST &src)
template<int N, class DType, class SType> const Array< N, DType > & operator<<= (const Array< N, DType > &dst, const Array< N, SType > &src)
template<int N, class DType, class ST> const Array< N, DType > & operator+= (const Array< N, DType > &dst, const ST &src)
template<int N, class DType, class SType> const Array< N, DType > & operator+= (const Array< N, DType > &dst, const Array< N, SType > &src)
template<int N, class DType, class ST> const Array< N, DType > & operator-= (const Array< N, DType > &dst, const ST &src)
template<int N, class DType, class SType> const Array< N, DType > & operator-= (const Array< N, DType > &dst, const Array< N, SType > &src)
template<int N, class DType, class ST> const Array< N, DType > & operator *= (const Array< N, DType > &dst, const ST &src)
template<int N, class DType, class SType> const Array< N, DType > & operator *= (const Array< N, DType > &dst, const Array< N, SType > &src)
template<int N, class DType, class ST> const Array< N, DType > & operator/= (const Array< N, DType > &dst, const ST &src)
template<int N, class DType, class SType> const Array< N, DType > & operator/= (const Array< N, DType > &dst, const Array< N, SType > &src)

Ix functions

template<int N, class T> Ix< N, T > operator- (const Ix< N, T > &ix)
template<int N, class T> Ix< N, T > operator+ (const Ix< N, T > &ix, T i)
template<int N, class T> Ix< N, T > operator+ (const Ix< N, T > &ix, const Ix< N, T > &ixx)
template<int N, class T> Ix< N, T > operator+ (T i, const Ix< N, T > &ix)
template<int N, class T> Ix< N, T > operator- (const Ix< N, T > &ix, T i)
template<int N, class T> Ix< N, T > operator- (const Ix< N, T > &ix, const Ix< N, T > &ixx)
template<int N, class T> Ix< N, T > operator- (T i, const Ix< N, T > &ix)
template<int N, class T> Ix< N, T > operator * (const Ix< N, T > &ix, T i)
template<int N, class T> Ix< N, T > operator * (T i, const Ix< N, T > &ix)
template<int N, class T> Ix< N, T > operator/ (const Ix< N, T > &ix, T i)
template<int N, class T> Ix< N, T > operator/ (T i, const Ix< N, T > &ix)

MPI support

template<int N, class Type> MPI::Datatype CreateMPIPPArray (const Array< N, Type > &array)
template<int N, class Type> MPI_Datatype CreateMPIArray (const Array< N, Type > &array)

Arithmetic Array operations

template<int N, class TypeL, class TypeR> Array< N, Bop< cAdd, TypeL,
TypeR > > 
operator+ (const Array< N, TypeL > &l, const Array< N, TypeR > &r)
template<int N, class TypeL, class TR> Array< N, Bop< cAdd, TypeL,
Scalar< TR > > > 
operator+ (const Array< N, TypeL > &l, const TR &r)
template<int N, class TL, class TypeR> Array< N, Bop< cAdd, Scalar<
TL >, TypeR > > 
operator+ (const TL &l, const Array< N, TypeR > &r)
template<int N, class TypeL, class TypeR> Array< N, Bop< cSub, TypeL,
TypeR > > 
operator- (const Array< N, TypeL > &l, const Array< N, TypeR > &r)
template<int N, class TypeL, class TR> Array< N, Bop< cSub, TypeL,
Scalar< TR > > > 
operator- (const Array< N, TypeL > &l, const TR &r)
template<int N, class TL, class TypeR> Array< N, Bop< cSub, Scalar<
TL >, TypeR > > 
operator- (const TL &l, const Array< N, TypeR > &r)
template<int N, class TypeL, class TypeR> Array< N, Bop< cMul, TypeL,
TypeR > > 
operator * (const Array< N, TypeL > &l, const Array< N, TypeR > &r)
template<int N, class TypeL, class TR> Array< N, Bop< cMul, TypeL,
Scalar< TR > > > 
operator * (const Array< N, TypeL > &l, const TR &r)
template<int N, class TL, class TypeR> Array< N, Bop< cMul, Scalar<
TL >, TypeR > > 
operator * (const TL &l, const Array< N, TypeR > &r)
template<int N, class TypeL, class TypeR> Array< N, Bop< cDiv, TypeL,
TypeR > > 
operator/ (const Array< N, TypeL > &l, const Array< N, TypeR > &r)
template<int N, class TypeL, class TR> Array< N, Bop< cDiv, TypeL,
Scalar< TR > > > 
operator/ (const Array< N, TypeL > &l, const TR &r)
template<int N, class TL, class TypeR> Array< N, Bop< cDiv, Scalar<
TL >, TypeR > > 
operator/ (const TL &l, const Array< N, TypeR > &r)
template<int N, class TypeL, class TypeR> Array< N, Bop< cMax, TypeL,
TypeR > > 
Max (const Array< N, TypeL > &l, const Array< N, TypeR > &r)
template<int N, class TypeL, class TR> Array< N, Bop< cMax, TypeL,
Scalar< TR > > > 
Max (const Array< N, TypeL > &l, const TR &r)
template<int N, class TL, class TypeR> Array< N, Bop< cMax, Scalar<
TL >, TypeR > > 
Max (const TL &l, const Array< N, TypeR > &r)
template<int N, class TypeL, class TypeR> Array< N, Bop< cMin, TypeL,
TypeR > > 
Min (const Array< N, TypeL > &l, const Array< N, TypeR > &r)
template<int N, class TypeL, class TR> Array< N, Bop< cMin, TypeL,
Scalar< TR > > > 
Min (const Array< N, TypeL > &l, const TR &r)
template<int N, class TL, class TypeR> Array< N, Bop< cMin, Scalar<
TL >, TypeR > > 
Min (const TL &l, const Array< N, TypeR > &r)
template<int N, class TypeS> Array< N, Uop< cNeg, TypeS > > operator- (const Array< N, TypeS > &s)
template<int N, class TypeS> Array< N, Uop< cSqrt, TypeS > > Sqrt (const Array< N, TypeS > &s)
template<int N, class TypeS> Array< N, Uop< cSqr, TypeS > > Sqr (const Array< N, TypeS > &s)
template<int N, class TypeS> Array< N, Uop< cAbs, TypeS > > Abs (const Array< N, TypeS > &s)
template<int N, class TypeS> Array< N-1, Rop< cSum, TypeS > > Sum (const Array< N, TypeS > &s)
template<class TypeS> RPromote< cSum, typename Array<
1, TypeS >::T >::T 
Sum (const Array< 1, TypeS > &src0)
template<int N, class TypeS> Array< N, TypeS >::T Sumall (const Array< N, TypeS > &src)
template<int N, class TypeS> Array< N-1, Rop< cMax, TypeS > > Max (const Array< N, TypeS > &s)
template<class TypeS> RPromote< cMax, typename Array<
1, TypeS >::T >::T 
Max (const Array< 1, TypeS > &src0)
template<int N, class TypeS> Array< N, TypeS >::T Maxall (const Array< N, TypeS > &src)
template<int N, class TypeS> Array< N-1, Rop< cMin, TypeS > > Min (const Array< N, TypeS > &s)
template<class TypeS> RPromote< cMin, typename Array<
1, TypeS >::T >::T 
Min (const Array< 1, TypeS > &src0)
template<int N, class TypeS> Array< N, TypeS >::T Minall (const Array< N, TypeS > &src)

Logical Array operations

template<int N, class Type> Array< N, Type > Shift (const Array< N, Type > &src, DIMT n, IXTYPE i)
template<int N, class Type> Array< N, Type > Shift (const Array< N, Type > &src, const Ix< N > &ix)
template<int N, class Type> Array< N, Type > Reverse (const Array< N, Type > &src, DIMT n)
template<int N, class Type> Array< N, Type > Reverse (const Array< N, Type > &src, const Ix< N, bool > rx)
template<int N, class Type> Array< N, Type > Flip (const Array< N, Type > &src, DIMT n)
template<int N, class Type> Array< N, Type > Flip (const Array< N, Type > &src, const Ix< N, bool > &rx)
template<int N, class Type> Array< N, Type > Restride (const Array< N, Type > &src, DIMT n, IXTYPE s)
template<int N, class Type> Array< N, Type > Restride (const Array< N, Type > &src, const Ix< N > &sx)
template<int N, class Type> Array< N, Type > RestrictL (const Array< N, Type > &src, DIMT n, IXTYPE l0)
template<int N, class Type> Array< N, Type > RestrictU (const Array< N, Type > &src, DIMT n, IXTYPE u0)
template<int N, class Type> Array< N, Type > Restrict (const Array< N, Type > &src, DIMT n, IXTYPE l0, IXTYPE u0)
template<int N, class Type> Array< N, Type > RestrictL (const Array< N, Type > &src, const Ix< N > &l0)
template<int N, class Type> Array< N, Type > RestrictU (const Array< N, Type > &src, const Ix< N > &u0)
template<int N, class Type> Array< N, Type > Restrict (const Array< N, Type > &src, const Ix< N > &l0, const Ix< N > &u0)
template<int N, class Type> Array< N, Type > Permute (const Array< N, Type > &src, DIMT n1, DIMT n2)
template<int N, class Type> Array< N, Type > Permute (const Array< N, Type > &src, const Permutation< N > &p)
template<int N, class Type> Array< N-1, Type > Rmdim (const Array< N, Type > &src, DIMT n, IXTYPE i)
template<int N, class Type> Array< N+1, Type > Extend (const Array< N, Type > &src, IXTYPE l0, IXTYPE u0)
template<int N, class Type> Array< N, Fix< typename Array<
N, Type >::T > > 
Clone (const Array< N, Type > &src)
template<int N, class TypeL, class TypeR> bool Matches (const Array< N, TypeL > &l, const Array< N, TypeR > &r)

Stream functions

template<int N, class Type> std::ostream & WriteUfmt (std::ostream &stream, const Array< N, Type > &src)
template<int N, class Type> std::ostream & WriteFmt (std::ostream &stream, const Array< N, Type > &src)
template<int N, class Type> std::istream & ReadUfmt (std::istream &stream, const Array< N, Type > &dst)
template<int N, class Type> std::istream & ReadFmt (std::istream &stream, const Array< N, Type > &dst)
template<int N, class T> std::istream & ReadFmt (std::istream &stream, Ix< N, T > &dst)
template<int N, class T> std::istream & ReadUfmt (std::istream &stream, Ix< N, T > &dst)
template<int N, class T> std::ostream & WriteFmt (std::ostream &stream, const Ix< N, T > &src)
template<int N, class T> std::ostream & WriteUfmt (std::ostream &stream, const Ix< N, T > &src)
template<int N, class Type> std::ostream & operator<< (std::ostream &stream, const Array< N, Type > &src)
template<int N, class Type> std::istream & operator>> (std::istream &stream, const Array< N, Type > &dst)
template<int N, class Type> bool Clone (std::istream &stream, Array< N, Type > &dst)

Typedefs

typedef int IXTYPE
typedef short DIMT


Detailed Description

Namespace for fast arrays for numerical computation.

Typedef Documentation

typedef short esso::DIMT
 

Type used to indicate Array dimension

typedef int esso::IXTYPE
 

Type used to index Array objects


Function Documentation

template<int N, class TypeS>
Array<N,Uop<cAbs,TypeS> > Abs const Array< N, TypeS > &  s  )  [inline]
 

Absolute value

  • s Source array object
    Returns:
    Array with each element equal to the absolute value of that from s

template<int N, class Type>
bool Clone std::istream &  stream,
Array< N, Type > &  dst
 

Realloc Array from contents of formatted stream and read all elements from the stream.

  • stream input stream
  • dst Destination array
    Returns:
    true on success, or false if operation failed
    See also:
    Realloc(std::istream &, Array<N,Type> &)

    operator ><(std::istream &, const Array<N,Type> &)

template<int N, class Type>
Array<N,Fix<typename Array<N,Type>::T> > Clone const Array< N, Type > &  src  )  [inline]
 

  • src Source array
    Returns:
    new array that is a copy of all elements in src
    See also:
    Array::Clone

template<int N, class Type>
MPI_Datatype CreateMPIArray const Array< N, Type > &  array  )  [inline]
 

Creates an MPI datatype corresponding to the given array The returned object should be freed when no longer needed

template<int N, class Type>
MPI::Datatype CreateMPIPPArray const Array< N, Type > &  array  )  [inline]
 

Creates an MPI++ datatype corresponding to the given array The returned object should be freed when no longer needed

template<int N, class Type>
Array<N+1,Type> Extend const Array< N, Type > &  src,
IXTYPE  l0,
IXTYPE  u0
[inline]
 

  • src Source array
  • l0 Lower index bound for new dimension
  • u0 Upper index bound for new dimension
    Returns:
    new array refering to the same data as src with a new dummy dimension inserted at dimension 0
    See also:
    Array::Permute

template<int N, class Type>
Array<N,Type> Flip const Array< N, Type > &  src,
const Ix< N, bool > &  rx
[inline]
 

  • src Source array
  • rx boolean vector indicating which dimensions to flip
    Returns:
    new flipped array refering to the same data as src
    See also:
    Array::Flip

template<int N, class Type>
Array<N,Type> Flip const Array< N, Type > &  src,
DIMT  n
[inline]
 

  • src Source array
  • n dimension to flip
    Returns:
    new flipped array refering to the same data as src
    See also:
    Array::Flip

template<int N, class TypeL, class TypeR>
bool Matches const Array< N, TypeL > &  l,
const Array< N, TypeR > &  r
[inline]
 

  • l first array to compare
  • r second array to compare
    Returns:
    true iff the index bounds are identical for l and r

template<class TypeS>
RPromote<cMax,typename Array<1,TypeS>::T>::T Max const Array< 1, TypeS > &  src0  )  [inline]
 

  • src Source array
    Returns:
    Maximum of all elements in src

template<int N, class TypeS>
Array<N-1,Rop<cMax,TypeS> > Max const Array< N, TypeS > &  s  )  [inline]
 

  • src Source array
    Returns:
    Array where each element is the maximum of all elements in src along dimension 0

template<int N, class TL, class TypeR>
Array<N,Bop<cMax,Scalar<TL>,TypeR > > Max const TL &  l,
const Array< N, TypeR > &  r
[inline]
 

  • l Left scalar operand
  • r Right Array operand
    Returns:
    Array where each element refers to the maximum of the corresponding elements in l and r

template<int N, class TypeL, class TR>
Array<N,Bop<cMax,TypeL,Scalar<TR> > > Max const Array< N, TypeL > &  l,
const TR &  r
[inline]
 

  • l Left Array operand
  • r Right scalar operand
    Returns:
    Array where each element refers to the maximum of the corresponding elements in l and r

template<int N, class TypeL, class TypeR>
Array<N,Bop<cMax,TypeL,TypeR> > Max const Array< N, TypeL > &  l,
const Array< N, TypeR > &  r
[inline]
 

  • l Left Array operand
  • r Right Array operand
    Returns:
    Array where each element refers to the maximum of the corresponding elements in l and r

template<int N, class TypeS>
Array<N,TypeS>::T Maxall const Array< N, TypeS > &  src  )  [inline]
 

  • src Source array
    Returns:
    Maximum value of all elements in array

template<class TypeS>
RPromote<cMin,typename Array<1,TypeS>::T>::T Min const Array< 1, TypeS > &  src0  )  [inline]
 

  • src Source array
    Returns:
    Minimum of all elements in src

template<int N, class TypeS>
Array<N-1,Rop<cMin,TypeS> > Min const Array< N, TypeS > &  s  )  [inline]
 

  • src Source array
    Returns:
    Array where each element is the minimum of all elements in src along dimension 0

template<int N, class TL, class TypeR>
Array<N,Bop<cMin,Scalar<TL>,TypeR > > Min const TL &  l,
const Array< N, TypeR > &  r
[inline]
 

  • l Left scalar operand
  • r Right Array operand
    Returns:
    Array where each element refers to the minimum of the corresponding elements in l and r

template<int N, class TypeL, class TR>
Array<N,Bop<cMin,TypeL,Scalar<TR> > > Min const Array< N, TypeL > &  l,
const TR &  r
[inline]
 

  • l Left Array operand
  • r Right scalar operand
    Returns:
    Array where each element refers to the minimum of the corresponding elements in l and r

template<int N, class TypeL, class TypeR>
Array<N,Bop<cMin,TypeL,TypeR> > Min const Array< N, TypeL > &  l,
const Array< N, TypeR > &  r
[inline]
 

  • l Left Array operand
  • r Right Array operand
    Returns:
    Array where each element refers to the minimum of the corresponding elements in l and r

template<int N, class TypeS>
Array<N,TypeS>::T Minall const Array< N, TypeS > &  src  )  [inline]
 

  • src Source array
    Returns:
    Minimum value of all elements in array

template<int N, class TL, class TypeR>
Array<N,Bop<cMul,Scalar<TL>,TypeR > > operator * const TL &  l,
const Array< N, TypeR > &  r
[inline]
 

  • l Left scalar operand
  • r Right Array operand
    Returns:
    Array where each element refers to the product of the corresponding elements in l and r

template<int N, class TypeL, class TR>
Array<N,Bop<cMul,TypeL,Scalar<TR> > > operator * const Array< N, TypeL > &  l,
const TR &  r
[inline]
 

  • l Left Array operand
  • r Right scalar operand
    Returns:
    Array where each element refers to the product of the corresponding elements in l and r

template<int N, class TypeL, class TypeR>
Array<N,Bop<cMul,TypeL,TypeR> > operator * const Array< N, TypeL > &  l,
const Array< N, TypeR > &  r
[inline]
 

  • l Left Array operand
  • r Right Array operand
    Returns:
    Array where each element refers to the product of the corresponding elements in l and r

template<int N, class T>
Ix<N,T> operator * i,
const Ix< N, T > &  ix
[inline]
 

Product scalar * object

template<int N, class T>
Ix<N,T> operator * const Ix< N, T > &  ix,
i
[inline]
 

Product object * scalar

template<int N, class DType, class SType>
const Array<N,DType>& operator *= const Array< N, DType > &  dst,
const Array< N, SType > &  src
[inline]
 

Scalar multiplication assignment. Multiply scalar src to elements of dst

template<int N, class DType, class ST>
const Array<N,DType>& operator *= const Array< N, DType > &  dst,
const ST &  src
[inline]
 

Multiplication assignment. Multipllies elements of src to elements of dst Operates on the intersection of index range for src and dst

template<int N, class TL, class TypeR>
Array<N,Bop<cAdd,Scalar<TL>,TypeR > > operator+ const TL &  l,
const Array< N, TypeR > &  r
[inline]
 

  • l Left scalar operand
  • r Right Array operand
    Returns:
    Array where each element refers to the sum of the corresponding elements in l and r

template<int N, class TypeL, class TR>
Array<N,Bop<cAdd,TypeL,Scalar<TR> > > operator+ const Array< N, TypeL > &  l,
const TR &  r
[inline]
 

  • l Left Array operand
  • r Right scalar operand
    Returns:
    Array where each element refers to the sum of the corresponding elements in l and r

template<int N, class TypeL, class TypeR>
Array<N,Bop<cAdd,TypeL,TypeR> > operator+ const Array< N, TypeL > &  l,
const Array< N, TypeR > &  r
[inline]
 

  • l Left Array operand
  • r Right Array operand
    Returns:
    Array where each element refers to the sum of the corresponding elements in l and r

template<int N, class T>
Ix<N,T> operator+ i,
const Ix< N, T > &  ix
[inline]
 

Addition scalar + object

template<int N, class T>
Ix<N,T> operator+ const Ix< N, T > &  ix,
const Ix< N, T > &  ixx
[inline]
 

Addition

template<int N, class T>
Ix<N,T> operator+ const Ix< N, T > &  ix,
i
[inline]
 

Addition, object + scalar

template<int N, class DType, class SType>
const Array<N,DType>& operator+= const Array< N, DType > &  dst,
const Array< N, SType > &  src
[inline]
 

Scalar addition assignment. Add scalar src to elements of dst

template<int N, class DType, class ST>
const Array<N,DType>& operator+= const Array< N, DType > &  dst,
const ST &  src
[inline]
 

Addition assignment. Add elements of src to elements of dst Operates on the intersection of index range for src and dst

template<int N, class TypeS>
Array<N,Uop<cNeg,TypeS> > operator- const Array< N, TypeS > &  s  )  [inline]
 

Unary negation

  • s Source array object
    Returns:
    Array with each element from s negated

template<int N, class TL, class TypeR>
Array<N,Bop<cSub,Scalar<TL>,TypeR > > operator- const TL &  l,
const Array< N, TypeR > &  r
[inline]
 

  • l Left scalar operand
  • r Right Array operand
    Returns:
    Array where each element refers to the difference of the corresponding elements in l and r

template<int N, class TypeL, class TR>
Array<N,Bop<cSub,TypeL,Scalar<TR> > > operator- const Array< N, TypeL > &  l,
const TR &  r
[inline]
 

  • l Left Array operand
  • r Right scalar operand
    Returns:
    Array where each element refers to the difference of the corresponding elements in l and r

template<int N, class TypeL, class TypeR>
Array<N,Bop<cSub,TypeL,TypeR> > operator- const Array< N, TypeL > &  l,
const Array< N, TypeR > &  r
[inline]
 

  • l Left Array operand
  • r Right Array operand
    Returns:
    Array where each element refers to the difference of the corresponding elements in l and r

template<int N, class T>
Ix<N,T> operator- i,
const Ix< N, T > &  ix
[inline]
 

Subtraction scalar - object

template<int N, class T>
Ix<N,T> operator- const Ix< N, T > &  ix,
const Ix< N, T > &  ixx
[inline]
 

Subtraction

template<int N, class T>
Ix<N,T> operator- const Ix< N, T > &  ix,
i
[inline]
 

Subtraction object - scalar

template<int N, class T>
Ix<N,T> operator- const Ix< N, T > &  ix  )  [inline]
 

Unary negation

template<int N, class DType, class SType>
const Array<N,DType>& operator-= const Array< N, DType > &  dst,
const Array< N, SType > &  src
[inline]
 

Scalar subtraction assignment. Subtract scalar src from elements of dst

template<int N, class DType, class ST>
const Array<N,DType>& operator-= const Array< N, DType > &  dst,
const ST &  src
[inline]
 

Subtraction assignment. Subtract elements of src from elements of dst Operates on the intersection of index range for src and dst

template<int N, class TL, class TypeR>
Array<N,Bop<cDiv,Scalar<TL>,TypeR > > operator/ const TL &  l,
const Array< N, TypeR > &  r
[inline]
 

  • l Left scalar operand
  • r Right Array operand
    Returns:
    Array where each element refers to the quotient of the corresponding elements in l and r

template<int N, class TypeL, class TR>
Array<N,Bop<cDiv,TypeL,Scalar<TR> > > operator/ const Array< N, TypeL > &  l,
const TR &  r
[inline]
 

  • l Left Array operand
  • r Right scalar operand
    Returns:
    Array where each element refers to the quotient of the corresponding elements in l and r

template<int N, class TypeL, class TypeR>
Array<N,Bop<cDiv,TypeL,TypeR> > operator/ const Array< N, TypeL > &  l,
const Array< N, TypeR > &  r
[inline]
 

  • l Left Array operand
  • r Right Array operand
    Returns:
    Array where each element refers to the quotient of the corresponding elements in l and r

template<int N, class T>
Ix<N,T> operator/ i,
const Ix< N, T > &  ix
[inline]
 

Quotient scalar / object

template<int N, class T>
Ix<N,T> operator/ const Ix< N, T > &  ix,
i
[inline]
 

Quotient object / scalar

template<int N, class DType, class SType>
const Array<N,DType>& operator/= const Array< N, DType > &  dst,
const Array< N, SType > &  src
[inline]
 

Quotient assignment. Divides elements of dst with elements of src Operates on the intersection of index range for src and dst

template<int N, class DType, class ST>
const Array<N,DType>& operator/= const Array< N, DType > &  dst,
const ST &  src
[inline]
 

Scalar quotient assignment. Divide elements of dst with scalar src

template<int N, class Type>
std::ostream& operator<< std::ostream &  stream,
const Array< N, Type > &  src
 

Ascii stream store operation

Output format is

  • N
  • LEN(0) L(0)
  • LEN(1) L(1)
  • ...
  • LEN(N-1) L(N-1)
  • DATA (LINE 1)
  • DATA (LINE 2)
  • ...
where N is the array rank, LEN(K) is the length along dimension K and L(K) is the first index in dimension K. Each line in DATA is along dimension 0, and the other dimensions are traversed in increasing order, so that the outermost loop is over dimension N-1.
  • stream output stream
  • src Source array
    Returns:
    Reference to output stream stream

template<int N, class DType, class SType>
const Array<N,DType>& operator<<= const Array< N, DType > &  dst,
const Array< N, SType > &  src
[inline]
 

Elementwise copy

Use this operator for template expression assignment i.e. you may copy a single array into another as

array1 <<= array2;

or you may compute expressions containing arrays and/or scalars and put the result into an array as

array1 <<= array2+array3*scalar1-array1;

The assignment is done over the intersection of the index bounds of all array objects involved. The index bounds of dst are unchanged by this operation.

  • dst Destination array object
  • src Source array object
    Returns:
    reference to destination array

template<int N, class DType, class ST>
const Array<N,DType>& operator<<= const Array< N, DType > &  dst,
const ST &  src
[inline]
 

Elementwise copy Use this operator to fill an array with a scalar value

  • dst Destination array object
  • src Source scalar
    Returns:
    reference to destination array

template<int N, class Type>
std::istream& operator>> std::istream &  stream,
const Array< N, Type > &  dst
 

Ascii stream read operation

The elements of the array are read from a file that is assumed to have the format as written by operator <<

If the array index bounds do not match the array found in the file the array elements are unchanged and the fail flag is set for the stream object.

  • stream input stream
  • src Destination array
    Returns:
    true on success, or false if operation failed

    Reference to input stream stream

template<int N, class Type>
Array<N,Type> Permute const Array< N, Type > &  src,
const Permutation< N > &  p
[inline]
 

  • src Source array
  • p permutation to apply to array dimensions
    Returns:
    new permuted array refering to the same data as src
    See also:
    Array::Permute

template<int N, class Type>
Array<N,Type> Permute const Array< N, Type > &  src,
DIMT  n1,
DIMT  n2
[inline]
 

  • src Source array
  • n1 n2 Dimensions to swap
    Returns:
    new permuted array refering to the same data as src
    See also:
    Array::Permute

template<int N, class T>
std::istream& ReadFmt std::istream &  stream,
Ix< N, T > &  dst
 

Formated read of Ix object

template<int N, class Type>
std::istream& ReadFmt std::istream &  stream,
const Array< N, Type > &  dst
 

Formatted stream read

Simply reads all elements from the stream. The dimensions are traversed in increasing order, so that the outermost loop is over dimension N-1.

  • stream output stream
  • src Source array
    Returns:
    Reference to input stream stream

template<int N, class T>
std::istream& ReadUfmt std::istream &  stream,
Ix< N, T > &  dst
 

Unformated read of Ix object

template<int N, class Type>
std::istream& ReadUfmt std::istream &  stream,
const Array< N, Type > &  dst
 

Unformatted stream read

Simply reads all elements from the stream. The dimensions are traversed in increasing order, so that the outermost loop is over dimension N-1.

  • stream output stream
  • src Source array
    Returns:
    Reference to input stream stream

template<int N, class Type>
Array<N,Type> Restrict const Array< N, Type > &  src,
const Ix< N > &  l0,
const Ix< N > &  u0
[inline]
 

  • src Source array
  • l0 vector of new lower index bounds for each dimension
  • u0 vector of new upper index bounds for each dimension
    Returns:
    new restricted array refering to the same data as src
    See also:
    Array::Restrict

template<int N, class Type>
Array<N,Type> Restrict const Array< N, Type > &  src,
DIMT  n,
IXTYPE  l0,
IXTYPE  u0
[inline]
 

  • src Source array
  • n dimension to restrict
  • l0 new lower index bound
  • u0 new upper index bound
    Returns:
    new restricted array refering to the same data as src
    See also:
    Array::Restrict

template<int N, class Type>
Array<N,Type> RestrictL const Array< N, Type > &  src,
const Ix< N > &  l0
[inline]
 

  • src Source array
  • l0 vector of new lower index bounds for each dimension
    Returns:
    new restricted array refering to the same data as src
    See also:
    Array::RestrictL

template<int N, class Type>
Array<N,Type> RestrictL const Array< N, Type > &  src,
DIMT  n,
IXTYPE  l0
[inline]
 

  • src Source array
  • n dimension to restrict
  • l0 new lower index bound
    Returns:
    new restricted array refering to the same data as src
    See also:
    Array::RestrictL

template<int N, class Type>
Array<N,Type> RestrictU const Array< N, Type > &  src,
const Ix< N > &  u0
[inline]
 

  • src Source array
  • u0 vector of new upper index bounds for each dimension
    Returns:
    new restricted array refering to the same data as src
    See also:
    Array::RestrictU

template<int N, class Type>
Array<N,Type> RestrictU const Array< N, Type > &  src,
DIMT  n,
IXTYPE  u0
[inline]
 

  • src Source array
  • n dimension to restrict
  • u0 new upper index bound
    Returns:
    new restricted array refering to the same data as src
    See also:
    Array::RestrictU

template<int N, class Type>
Array<N,Type> Restride const Array< N, Type > &  src,
const Ix< N > &  sx
[inline]
 

  • src Source array
  • sx vector of restride multipliers for each dimension
    Returns:
    new restrided array refering to the same data as src
    See also:
    Array::Restride

template<int N, class Type>
Array<N,Type> Restride const Array< N, Type > &  src,
DIMT  n,
IXTYPE  s
[inline]
 

  • src Source array
  • n dimension to restride
  • s restride multiplier
    Returns:
    new restrided array refering to the same data as src
    See also:
    Array::Restride

template<int N, class Type>
Array<N,Type> Reverse const Array< N, Type > &  src,
const Ix< N, bool >  rx
[inline]
 

  • src Source array
  • rx boolean vector indicating which dimensions to reverse
    Returns:
    new reversed array refering to the same data as src
    See also:
    Array::Reverse

template<int N, class Type>
Array<N,Type> Reverse const Array< N, Type > &  src,
DIMT  n
[inline]
 

  • src Source array
  • n dimension to reverse
    Returns:
    new reversed array refering to the same data as src
    See also:
    Array::Reverse

template<int N, class Type>
Array<N-1,Type> Rmdim const Array< N, Type > &  src,
DIMT  n,
IXTYPE  i
[inline]
 

  • src Source array
  • n Dimension to remove (how to cut a slice)
  • i Index position along n (where to cut the slice)
    Returns:
    new array refering to a slice of the same data as src
    See also:
    Array::Rmdim

template<int N, class Type>
Array<N,Type> Shift const Array< N, Type > &  src,
const Ix< N > &  ix
[inline]
 

  • src Source array
  • ix vector of index positions to shift for each dimension
    Returns:
    new shifted array refering to the same data as src
    See also:
    Array::Shift

template<int N, class Type>
Array<N,Type> Shift const Array< N, Type > &  src,
DIMT  n,
IXTYPE  i
[inline]
 

  • src Source array
  • n dimension to shift
  • i number of index positions to shift
    Returns:
    new shifted array refering to the same data as src
    See also:
    Array::Shift

template<int N, class TypeS>
Array<N,Uop<cSqr,TypeS> > Sqr const Array< N, TypeS > &  s  )  [inline]
 

Square (power of two)

  • s Source array object
    Returns:
    Array with each element equal to the square of that from s

template<int N, class TypeS>
Array<N,Uop<cSqrt,TypeS> > Sqrt const Array< N, TypeS > &  s  )  [inline]
 

Square root

  • s Source array object
    Returns:
    Array with each element square root of that from s

template<class TypeS>
RPromote<cSum,typename Array<1,TypeS>::T>::T Sum const Array< 1, TypeS > &  src0  )  [inline]
 

  • src Source array
    Returns:
    Sum of all elements in src

template<int N, class TypeS>
Array<N-1,Rop<cSum,TypeS> > Sum const Array< N, TypeS > &  s  )  [inline]
 

  • src Source array
    Returns:
    Array where each element is the sum of all elements in src along dimension 0

template<int N, class TypeS>
Array<N,TypeS>::T Sumall const Array< N, TypeS > &  src  )  [inline]
 

  • src Source array
    Returns:
    Sum of all elements in array

template<int N, class T>
std::ostream& WriteFmt std::ostream &  stream,
const Ix< N, T > &  src
 

Formatted write of Ix object

template<int N, class Type>
std::ostream& WriteFmt std::ostream &  stream,
const Array< N, Type > &  src
 

Formatted stream store

Simply dumps all elements into the stream. The dimensions are traversed in increasing order, so that the outermost loop is over dimension N-1.

  • stream output stream
  • src Source array
    Returns:
    Reference to output stream stream

template<int N, class T>
std::ostream& WriteUfmt std::ostream &  stream,
const Ix< N, T > &  src
 

Unformated write of Ix object

template<int N, class Type>
std::ostream& WriteUfmt std::ostream &  stream,
const Array< N, Type > &  src
 

Unformatted stream store

Simply dumps all elements into the stream. The dimensions are traversed in increasing order, so that the outermost loop is over dimension N-1.

  • stream output stream
  • src Source array
    Returns:
    Reference to output stream stream


Generated on Thu Jun 3 00:21:25 2004 for Expresso by doxygen 1.3.3