Public Member Functions | Private Member Functions | Private Attributes

util::Prefix2D< T, DEBUG > Class Template Reference

a prefix sum array (2d) More...

#include <util/prefix2d.hpp>


Detailed Description

template<typename T, bool DEBUG = false>
class util::Prefix2D< T, DEBUG >

a prefix sum array (2d)

Prefix2D respect the 2D prefix sum array skeleton defined by util::PrefixSumArray2DOfTBracket.

This class implements 2D prefix sum arrays. From an array A, this class build a prefixsum (let's call it pr) so that $pr[i][j] = \sum_{i'<i, j'<j} A[i'][j']$

Parameters:
T data type of Prefix2D

List of all members.

Public Member Functions

template<typename ar2d >
 Prefix2D (int x, int y, const ar2d &a)
 builds the prefix sum of a given array
int prefixsizeX () const
int prefixsizeY () const
Toperator[] (int x)
const Toperator[] (int x) const
 ~Prefix2D ()

Private Member Functions

 Prefix2D (const Prefix2D &c)
 this function does not make sense and, thus, is deactivated
Prefix2Doperator= (const Prefix2D &c)
 this function does not make sense and, thus, is deactivated
 Prefix2D ()
 this function does not make sense and, thus, is deactivated

Private Attributes

int sizeX
 size of the actual array, not the prefix sum
int sizeY
 size of the actual array, not the prefix sum
Tdata
 actual memory

Constructor & Destructor Documentation

template<typename T , bool DEBUG = false>
util::Prefix2D< T, DEBUG >::Prefix2D ( const Prefix2D< T, DEBUG > &  c  )  [private]

this function does not make sense and, thus, is deactivated

template<typename T , bool DEBUG = false>
util::Prefix2D< T, DEBUG >::Prefix2D (  )  [private]

this function does not make sense and, thus, is deactivated

template<typename T , bool DEBUG>
template<typename ar2d >
util::Prefix2D< T, DEBUG >::Prefix2D ( int  x,
int  y,
const ar2d &  a 
)

builds the prefix sum of a given array

Parameters:
[in] x number of rows in a real array, not prefixSum
[in] y number of columns in a real array, not prefixSum
[in] a the 2D array we are building the prefixsum of
template<typename T , bool DEBUG>
util::Prefix2D< T, DEBUG >::~Prefix2D (  ) 

Member Function Documentation

template<typename T , bool DEBUG = false>
Prefix2D& util::Prefix2D< T, DEBUG >::operator= ( const Prefix2D< T, DEBUG > &  c  )  [private]

this function does not make sense and, thus, is deactivated

template<typename T , bool DEBUG>
const T * util::Prefix2D< T, DEBUG >::operator[] ( int  x  )  const
template<typename T , bool DEBUG>
T * util::Prefix2D< T, DEBUG >::operator[] ( int  x  ) 
template<typename T , bool DEBUG>
int util::Prefix2D< T, DEBUG >::prefixsizeX (  )  const
Returns:
number of row of the prefixSumArray, i.e., 1 more than the original
template<typename T , bool DEBUG>
int util::Prefix2D< T, DEBUG >::prefixsizeY (  )  const
Returns:
number of column of the prefixSumArray, i.e., 1 more than the original

Member Data Documentation

template<typename T , bool DEBUG = false>
T* util::Prefix2D< T, DEBUG >::data [private]

actual memory

template<typename T , bool DEBUG = false>
int util::Prefix2D< T, DEBUG >::sizeX [private]

size of the actual array, not the prefix sum

template<typename T , bool DEBUG = false>
int util::Prefix2D< T, DEBUG >::sizeY [private]

size of the actual array, not the prefix sum


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