MASA-Core
Public Member Functions | Private Member Functions | Private Attributes
Grid Class Reference

Detailed Description

Definition at line 31 of file Grid.hpp.

#include <Grid.hpp>

List of all members.

Public Member Functions

 Grid (Partition partition)
virtual ~Grid ()
void setBlockHeight (int blockHeight)
void setBlockWidth (int blockWidth)
void splitGridVertically (int count)
 Splits the grid in $count$ positions (vertically).
void splitGridHorizontally (int count)
 Splits the grid in $count$ positions (horizontal).
void splitGridVertically (int count, int *splits)
void splitGridHorizontally (int count, int *splits)
void getBlockPosition (int bx, int by, int *i0, int *j0, int *i1=NULL, int *j1=NULL) const
void setMinBlockSize (int minBlockWidth, int minBlockHeight)
void setAdjustment (int adjustment)
int getBlockAdjustment (int bx, int by) const
int getGridWidth () const
int getGridHeight () const
int getBlockWidth (int bx, int by) const
int getBlockHeight (int bx, int by) const
int getHeight () const
int getWidth () const
const int * getBlockSplitHorizontal () const
const int * getBlockSplitVertical () const

Private Member Functions

void getBlockPositionH (int bx, int by, int *j0, int *j1) const
void getBlockPositionV (int bx, int by, int *i0, int *i1) const

Private Attributes

int blockWidth
int blockHeight
int adjustment
int minBlockWidth
int minBlockHeight
int blockCountHorizontal
int * blockSplitHorizontal
int blockCountVertical
int * blockSplitVertical
int width
int height
Partition partition

Constructor & Destructor Documentation

Grid::Grid ( Partition  partition)

Definition at line 27 of file Grid.cpp.

Grid::~Grid ( ) [virtual]

Definition at line 46 of file Grid.cpp.


Member Function Documentation

int Grid::getBlockAdjustment ( int  bx,
int  by 
) const

Definition at line 203 of file Grid.cpp.

int Grid::getBlockHeight ( int  bx,
int  by 
) const

Definition at line 222 of file Grid.cpp.

void Grid::getBlockPosition ( int  bx,
int  by,
int *  i0,
int *  j0,
int *  i1 = NULL,
int *  j1 = NULL 
) const

Definition at line 181 of file Grid.cpp.

void Grid::getBlockPositionH ( int  bx,
int  by,
int *  j0,
int *  j1 
) const [private]

Definition at line 161 of file Grid.cpp.

void Grid::getBlockPositionV ( int  bx,
int  by,
int *  i0,
int *  i1 
) const [private]

Definition at line 141 of file Grid.cpp.

const int * Grid::getBlockSplitHorizontal ( ) const

Definition at line 186 of file Grid.cpp.

const int * Grid::getBlockSplitVertical ( ) const

Definition at line 190 of file Grid.cpp.

int Grid::getBlockWidth ( int  bx,
int  by 
) const

Definition at line 215 of file Grid.cpp.

int Grid::getGridHeight ( ) const

Definition at line 211 of file Grid.cpp.

int Grid::getGridWidth ( ) const

Definition at line 207 of file Grid.cpp.

int Grid::getHeight ( ) const

Definition at line 229 of file Grid.cpp.

int Grid::getWidth ( ) const

Definition at line 233 of file Grid.cpp.

void Grid::setAdjustment ( int  adjustment)

Definition at line 199 of file Grid.cpp.

void Grid::setBlockHeight ( int  blockHeight)

Definition at line 52 of file Grid.cpp.

void Grid::setBlockWidth ( int  blockWidth)

Definition at line 61 of file Grid.cpp.

void Grid::setMinBlockSize ( int  minBlockWidth,
int  minBlockHeight 
)

Definition at line 194 of file Grid.cpp.

void Grid::splitGridHorizontally ( int  count)

Splits the grid in $count$ positions (horizontal).

If $count$ is greater than the sequence size, then each partition has the almost the same width, with a maximum difference of $1$.

Parameters:
countnumber of parts to split the grid.

Definition at line 122 of file Grid.cpp.

void Grid::splitGridHorizontally ( int  count,
int *  splits 
)

Definition at line 81 of file Grid.cpp.

void Grid::splitGridVertically ( int  count)

Splits the grid in $count$ positions (vertically).

If $count$ is greater than the sequence size, then each partition has the almost the same height, with a maximum difference of $1$.

Parameters:
countnumber of parts to split the grid.

Definition at line 97 of file Grid.cpp.

void Grid::splitGridVertically ( int  count,
int *  splits 
)

Definition at line 71 of file Grid.cpp.


Member Data Documentation

int Grid::adjustment [private]

Definition at line 67 of file Grid.hpp.

Definition at line 77 of file Grid.hpp.

int Grid::blockCountVertical [private]

Definition at line 79 of file Grid.hpp.

int Grid::blockHeight [private]

Definition at line 66 of file Grid.hpp.

Definition at line 78 of file Grid.hpp.

int* Grid::blockSplitVertical [private]

Definition at line 80 of file Grid.hpp.

int Grid::blockWidth [private]

Definition at line 65 of file Grid.hpp.

int Grid::height [private]

Definition at line 83 of file Grid.hpp.

int Grid::minBlockHeight [private]

Definition at line 69 of file Grid.hpp.

int Grid::minBlockWidth [private]

Definition at line 68 of file Grid.hpp.

Definition at line 84 of file Grid.hpp.

int Grid::width [private]

Definition at line 82 of file Grid.hpp.


The documentation for this class was generated from the following files: