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

Detailed Description

Definition at line 25 of file Partition.hpp.

#include <Partition.hpp>

List of all members.

Public Member Functions

 Partition ()
 Default constructor.
 Partition (int i0, int j0, int i1, int j1)
 Creates a partition with the given coordinates.
 Partition (const Partition &partition, int i_offset, int j_offset)
 Creates a partition copying the coordinates from other partition and applying a translation operation.
virtual ~Partition ()
 Destructor.
int getI0 () const
void setI0 (int i0)
int getI1 () const
void setI1 (int i1)
int getJ0 () const
void setJ0 (int j0)
int getJ1 () const
void setJ1 (int j1)
int getHeight () const
int getWidth () const
bool hasZeroArea () const

Private Attributes

int i0
 First Row.
int j0
 First Column.
int i1
 Last Row.
int j1
 Last Column.

Constructor & Destructor Documentation

Default constructor.

Definition at line 27 of file Partition.cpp.

Partition::Partition ( int  i0,
int  j0,
int  i1,
int  j1 
)

Creates a partition with the given coordinates.

Definition at line 37 of file Partition.cpp.

Partition::Partition ( const Partition partition,
int  i_offset,
int  j_offset 
)

Creates a partition copying the coordinates from other partition and applying a translation operation.

Parameters:
i_offsettranslate the $i$ coordinates
j_offsettranslate the $j$ coordinates

Definition at line 47 of file Partition.cpp.

Partition::~Partition ( ) [virtual]

Destructor.

Definition at line 58 of file Partition.cpp.


Member Function Documentation

int Partition::getHeight ( ) const
Returns:
the height of the partition $j1-j0$.

Definition at line 121 of file Partition.cpp.

int Partition::getI0 ( ) const
Returns:
the start row of the partition.

Definition at line 65 of file Partition.cpp.

int Partition::getI1 ( ) const
Returns:
the end row (exclusive) of the partition.

Definition at line 79 of file Partition.cpp.

int Partition::getJ0 ( ) const
Returns:
the start column of the partition.

Definition at line 93 of file Partition.cpp.

int Partition::getJ1 ( ) const
Returns:
the end column (exclusive) of the partition.

Definition at line 107 of file Partition.cpp.

int Partition::getWidth ( ) const
Returns:
the width of the partition $j1-j0$.

Definition at line 128 of file Partition.cpp.

bool Partition::hasZeroArea ( ) const

Definition at line 132 of file Partition.cpp.

void Partition::setI0 ( int  i0)

Definition at line 72 of file Partition.cpp.

void Partition::setI1 ( int  i1)

Definition at line 86 of file Partition.cpp.

void Partition::setJ0 ( int  j0)

Definition at line 100 of file Partition.cpp.

void Partition::setJ1 ( int  j1)

Definition at line 114 of file Partition.cpp.


Member Data Documentation

int Partition::i0 [private]

First Row.

Definition at line 28 of file Partition.hpp.

int Partition::i1 [private]

Last Row.

Definition at line 32 of file Partition.hpp.

int Partition::j0 [private]

First Column.

Definition at line 30 of file Partition.hpp.

int Partition::j1 [private]

Last Column.

Definition at line 34 of file Partition.hpp.


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