1D representation of a section of a prefix sum array by summing its element row-wise or column-wise.
More...
#include <util/prefix_sum_tools.hpp>
Detailed Description
template<typename T, typename Pr, bool row>
class util::Aggreg2Dto1D< T, Pr, row >
1D representation of a section of a prefix sum array by summing its element row-wise or column-wise.
This is a 1d prefix sum array with both the bracket[] notation defined by util::PrefixSumArray1DOfTBracket and interval notation defined by util::PrefixSumArray1DOfTBracket.
- Parameters:
-
| T | type of the array |
| Pr | type of the real array |
| row | select the orientation of the summation. (e.g. If row is true and the rectangle is of size 10x20, then the equivalent 1darray is of size 10) |
List of all members.
Public Member Functions |
| Aggreg2Dto1D (const Pr &p, int xl, int xh, int yl, int yh) |
| Reduces the 2D matrix into 1D array.
|
| Aggreg2Dto1D (const Aggreg2Dto1D< T, Pr, row > &o) |
const T | operator[] (int x) const |
T | interval (int i1, int i2) const |
| Returns the load in a given interval.
|
Private Member Functions |
Aggreg2Dto1D< T, Pr, row > & | operator= (const Aggreg2Dto1D< T, Pr, row > &rhs) |
| deactivated since it does not make sense
|
| Aggreg2Dto1D () |
| deactivated since it does not make sense
|
Private Attributes |
const Pr & | pr |
| the 2d prefix sum array which is represented
|
const int | xlow |
const int | xhigh |
const int | ylow |
const int | yhigh |
T | precomp |
Constructor & Destructor Documentation
template<typename T, typename Pr, bool row>
deactivated since it does not make sense
template<typename T , typename Pr , bool row>
Reduces the 2D matrix into 1D array.
Reduces the 2D matrix into 1D array in the original array (where n and m are last elements not sizes).
If row is true, there are (xh-xl) elements in the array.
- Parameters:
-
| p | prefixSumArray |
| xl | xlow of submatrix |
| xh | xhigh of submatrix |
| yl | ylow of submatrix |
| yh | yhigh of submatrix |
template<typename T , typename Pr , bool row>
Member Function Documentation
template<typename T , typename Pr , bool row>
Returns the load in a given interval.
The interval is ]i1,i2] i.e., i1 is excluded, i2 is included.
- Parameters:
-
| i1 | lower interval point |
| i2 | higher interval point |
- Returns:
- load
template<typename T, typename Pr, bool row>
deactivated since it does not make sense
template<typename T , typename Pr , bool row>
Member Data Documentation
template<typename T, typename Pr, bool row>
the 2d prefix sum array which is represented
template<typename T, typename Pr, bool row>
template<typename T, typename Pr, bool row>
template<typename T, typename Pr, bool row>
template<typename T, typename Pr, bool row>
template<typename T, typename Pr, bool row>
The documentation for this class was generated from the following files: