mdp_array< T, nc_ > Class Template Reference

generic container for multidimensional arrays More...

#include <mdp_array.h>

List of all members.

Public Member Functions

const int & ndim () const
T * address ()
uintsize_address ()
T & operator[] (const uint i)
const T & operator[] (const uint i) const
uint length (const uint i) const
uint length () const
uint size (uint i) const
uint size () const
void dimension (const uint *p)
void dimension (const uint c0_=1, const uint c1_=1, const uint c2_=1, const uint c3_=1, const uint c4_=1)
 mdp_array (const uint c0_=1, const uint c1_=1, const uint c2_=1, const uint c3_=1, const uint c4_=1)
 mdp_array (const uint *p)
 mdp_array (const T *m0, const uint c0_=1, const uint c1_=1, const uint c2_=1, const uint c3_=1, const uint c4_=1)
 mdp_array (const T *m0, const uint *p)
 mdp_array (const mdp_array &a)
virtual ~mdp_array ()
void operator= (const mdp_array &a)
T & operator() (const uint i0, const uint i1=0, const uint i2=0, const uint i3=0, const uint i4=0)
const T & operator() (const uint i0, const uint i1=0, const uint i2=0, const uint i3=0, const uint i4=0) const

Friends

void prepare (const mdp_array &a)
mdp_array operator+ (const mdp_array &a, const mdp_array &b)
mdp_array operator- (const mdp_array &a, const mdp_array &b)
template<class T2 >
mdp_array operator* (T2 x, const mdp_array &a)
mdp_array applytoall (const mdp_array &a, T(*fptr)(T, void *), void *x=0)
mdp_array applytoall (const mdp_array &a, const mdp_array &b, T(*fptr)(T, T, void *), void *x=0)
ostream & operator<< (ostream &os, const mdp_array &a)

Detailed Description

template<class T, uint nc_>
class mdp_array< T, nc_ >

generic container for multidimensional arrays

Example:

///    mdp_array<float,3> a(5,5,5);
///    a(0,0,0)=3.15;
/// 

Constructor & Destructor Documentation

template<class T, uint nc_>
mdp_array< T, nc_ >::mdp_array ( const uint  c0_ = 1,
const uint  c1_ = 1,
const uint  c2_ = 1,
const uint  c3_ = 1,
const uint  c4_ = 1 
) [inline]
template<class T, uint nc_>
mdp_array< T, nc_ >::mdp_array ( const uint p  )  [inline]
template<class T, uint nc_>
mdp_array< T, nc_ >::mdp_array ( const T *  m0,
const uint  c0_ = 1,
const uint  c1_ = 1,
const uint  c2_ = 1,
const uint  c3_ = 1,
const uint  c4_ = 1 
) [inline]
template<class T, uint nc_>
mdp_array< T, nc_ >::mdp_array ( const T *  m0,
const uint p 
) [inline]
template<class T, uint nc_>
mdp_array< T, nc_ >::mdp_array ( const mdp_array< T, nc_ > &  a  )  [inline]
template<class T, uint nc_>
virtual mdp_array< T, nc_ >::~mdp_array (  )  [inline, virtual]

Member Function Documentation

template<class T, uint nc_>
T* mdp_array< T, nc_ >::address (  )  [inline]
template<class T, uint nc_>
void mdp_array< T, nc_ >::dimension ( const uint  c0_ = 1,
const uint  c1_ = 1,
const uint  c2_ = 1,
const uint  c3_ = 1,
const uint  c4_ = 1 
) [inline]
template<class T, uint nc_>
void mdp_array< T, nc_ >::dimension ( const uint p  )  [inline]
template<class T, uint nc_>
uint mdp_array< T, nc_ >::length (  )  const [inline]
template<class T, uint nc_>
uint mdp_array< T, nc_ >::length ( const uint  i  )  const [inline]
template<class T, uint nc_>
const int& mdp_array< T, nc_ >::ndim (  )  const [inline]
template<class T, uint nc_>
const T& mdp_array< T, nc_ >::operator() ( const uint  i0,
const uint  i1 = 0,
const uint  i2 = 0,
const uint  i3 = 0,
const uint  i4 = 0 
) const [inline]
template<class T, uint nc_>
T& mdp_array< T, nc_ >::operator() ( const uint  i0,
const uint  i1 = 0,
const uint  i2 = 0,
const uint  i3 = 0,
const uint  i4 = 0 
) [inline]
template<class T, uint nc_>
void mdp_array< T, nc_ >::operator= ( const mdp_array< T, nc_ > &  a  )  [inline]
template<class T, uint nc_>
const T& mdp_array< T, nc_ >::operator[] ( const uint  i  )  const [inline]
template<class T, uint nc_>
T& mdp_array< T, nc_ >::operator[] ( const uint  i  )  [inline]
template<class T, uint nc_>
uint mdp_array< T, nc_ >::size (  )  const [inline]
template<class T, uint nc_>
uint mdp_array< T, nc_ >::size ( uint  i  )  const [inline]
template<class T, uint nc_>
uint* mdp_array< T, nc_ >::size_address (  )  [inline]

Friends And Related Function Documentation

template<class T, uint nc_>
mdp_array applytoall ( const mdp_array< T, nc_ > &  a,
const mdp_array< T, nc_ > &  b,
T(*)(T, T, void *)  fptr,
void *  x = 0 
) [friend]
template<class T, uint nc_>
mdp_array applytoall ( const mdp_array< T, nc_ > &  a,
T(*)(T, void *)  fptr,
void *  x = 0 
) [friend]
template<class T, uint nc_>
template<class T2 >
mdp_array operator* ( T2  x,
const mdp_array< T, nc_ > &  a 
) [friend]
template<class T, uint nc_>
mdp_array operator+ ( const mdp_array< T, nc_ > &  a,
const mdp_array< T, nc_ > &  b 
) [friend]
template<class T, uint nc_>
mdp_array operator- ( const mdp_array< T, nc_ > &  a,
const mdp_array< T, nc_ > &  b 
) [friend]
template<class T, uint nc_>
ostream& operator<< ( ostream &  os,
const mdp_array< T, nc_ > &  a 
) [friend]
template<class T, uint nc_>
void prepare ( const mdp_array< T, nc_ > &  a  )  [friend]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Defines

Generated on Wed Dec 23 14:03:15 2009 for fermiqcd by  doxygen 1.6.1