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:
-
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 |
T * | operator[] (int x) |
const T * | operator[] (int x) const |
| ~Prefix2D () |
Private Member Functions |
| Prefix2D (const Prefix2D &c) |
| this function does not make sense and, thus, is deactivated
|
Prefix2D & | operator= (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
|
T * | data |
| actual memory
|
Constructor & Destructor Documentation
template<typename T , bool DEBUG = false>
this function does not make sense and, thus, is deactivated
template<typename T , bool DEBUG = false>
this function does not make sense and, thus, is deactivated
template<typename T , bool DEBUG>
template<typename ar2d >
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>
Member Function Documentation
template<typename T , bool DEBUG = false>
this function does not make sense and, thus, is deactivated
template<typename T , bool DEBUG>
template<typename T , bool DEBUG>
template<typename T , bool DEBUG>
- Returns:
- number of row of the prefixSumArray, i.e., 1 more than the original
template<typename T , bool DEBUG>
- Returns:
- number of column of the prefixSumArray, i.e., 1 more than the original
Member Data Documentation
template<typename T , bool DEBUG = false>
template<typename T , bool DEBUG = false>
size of the actual array, not the prefix sum
template<typename T , bool DEBUG = false>
size of the actual array, not the prefix sum
The documentation for this class was generated from the following files: