rasdaman API
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
r_Aligned_Tiling Class Reference

#include <alignedtiling.hh>

Inheritance diagram for r_Aligned_Tiling:
r_Dimension_Tiling r_Size_Tiling r_Tiling

Public Member Functions

 r_Aligned_Tiling (const char *encoded) throw (r_Error)
 read everything from encoded string (e.g. "[0:9,0:9];100" or "2;100") More...
 
 r_Aligned_Tiling (r_Dimension dim, r_Bytes ts=RMInit::clientTileSize) throw (r_Error)
 dimension and tile size. More...
 
 r_Aligned_Tiling (const r_Minterval &tc, r_Bytes ts=RMInit::clientTileSize) throw (r_Error)
 dimension and tile size will be taken from RMInit::clientTileSize. More...
 
virtual r_Tilingclone () const
 Clones this object. More...
 
virtual ~r_Aligned_Tiling ()
 
const r_Mintervalget_tile_config () const
 returns the current value for the tile configuration option More...
 
std::vector< r_Minterval > * compute_tiles (const r_Minterval &obj_domain, r_Bytes cell_size) const throw (r_Error)
 returns true if the cellTypeSize is smaller or equal to the tile size and the dimension fits the obj_domain More...
 
char * get_string_representation () const
 
void print_status (std::ostream &s=cout) const
 writes the state of the object to the specified stream More...
 
virtual r_Tiling_Scheme get_tiling_scheme () const
 
r_Minterval compute_tile_domain (const r_Minterval &dom, r_Bytes cell_size) const
 determines the individual tiles domains More...
 
- Public Member Functions inherited from r_Dimension_Tiling
 r_Dimension_Tiling (r_Dimension dim, r_Bytes ts=RMInit::clientTileSize)
 Constructor for this object (Takes dim (no of dimension) and tile size as parameter) More...
 
virtual ~r_Dimension_Tiling ()
 does not do anything More...
 
r_Dimension get_dimension () const
 Gets the current dimension. More...
 
virtual bool is_compatible (const r_Minterval &obj_domain, r_Bytes cellTypeSize) const
 returns true if the cellTypeSize is smaller or equal to the tile size and obj_domain has more than 0 dimensions More...
 
- Public Member Functions inherited from r_Size_Tiling
 r_Size_Tiling (const char *encoded) throw (r_Error)
 Constructor that reads everything from a string e.g."100". More...
 
 r_Size_Tiling (r_Bytes ts=RMInit::clientTileSize)
 Constructor for this object (Takes tile size as parameter) More...
 
virtual ~r_Size_Tiling ()
 does not do anything More...
 
r_Bytes get_tile_size () const
 Gets the current tile size. More...
 
- Public Member Functions inherited from r_Tiling
virtual ~r_Tiling ()
 does not do anything More...
 

Static Public Attributes

static const char * description
 
- Static Public Attributes inherited from r_Size_Tiling
static const char * description
 
- Static Public Attributes inherited from r_Tiling
static const char * ASTERIX
 
static const char * TCOLON
 
static const char * TCOMMA
 
static const char * LSQRBRA
 
static const char * RSQRBRA
 
static const long DefaultBase
 

Protected Member Functions

r_Bytes get_min_opt_tile_size () const
 
r_Minterval get_opt_size (const r_Minterval &tile_domain, r_Bytes cell_size) const
 

Protected Attributes

r_Minterval tile_config
 tile configuration More...
 
- Protected Attributes inherited from r_Dimension_Tiling
r_Dimension dimension
 dimension the mdd must have More...
 
- Protected Attributes inherited from r_Size_Tiling
r_Bytes tile_size
 Tile size. More...
 

Constructor & Destructor Documentation

r_Aligned_Tiling::r_Aligned_Tiling ( const char *  encoded)
throw (r_Error
)

read everything from encoded string (e.g. "[0:9,0:9];100" or "2;100")

r_Aligned_Tiling::r_Aligned_Tiling ( r_Dimension  dim,
r_Bytes  ts = RMInit::clientTileSize 
)
throw (r_Error
)

dimension and tile size.

r_Aligned_Tiling::r_Aligned_Tiling ( const r_Minterval tc,
r_Bytes  ts = RMInit::clientTileSize 
)
throw (r_Error
)

dimension and tile size will be taken from RMInit::clientTileSize.

tile configuration and tile size.

virtual r_Aligned_Tiling::~r_Aligned_Tiling ( )
virtual

Member Function Documentation

virtual r_Tiling* r_Aligned_Tiling::clone ( ) const
virtual

Clones this object.

This method provides the core funcionality of this class. All derived classes must implement it. As input parameters it takes the big object to be decomposed and returns a set of tiles that compose the big object. This method throws an exeception when the dimension specified, extend or the cell_size are incompatible with the current tiling. You can check compatibility by invoking is_compatible.

Implements r_Dimension_Tiling.

r_Minterval r_Aligned_Tiling::compute_tile_domain ( const r_Minterval dom,
r_Bytes  cell_size 
) const

determines the individual tiles domains

std::vector<r_Minterval>* r_Aligned_Tiling::compute_tiles ( const r_Minterval obj_domain,
r_Bytes  cellTypeSize 
) const
throw (r_Error
)
virtual

returns true if the cellTypeSize is smaller or equal to the tile size and the dimension fits the obj_domain

Implements r_Dimension_Tiling.

r_Bytes r_Aligned_Tiling::get_min_opt_tile_size ( ) const
protected
r_Minterval r_Aligned_Tiling::get_opt_size ( const r_Minterval tile_domain,
r_Bytes  cell_size 
) const
protected
char* r_Aligned_Tiling::get_string_representation ( ) const
const r_Minterval& r_Aligned_Tiling::get_tile_config ( ) const

returns the current value for the tile configuration option

virtual r_Tiling_Scheme r_Aligned_Tiling::get_tiling_scheme ( ) const
virtual

This method is similar to a copy constructor, this is, is returns a copy of the current object. Derived classes must explicitly implement this method.

Reimplemented from r_Size_Tiling.

void r_Aligned_Tiling::print_status ( std::ostream &  s = cout) const
virtual

writes the state of the object to the specified stream

The string representation delivered by this method is allocated using { malloc()} and has to be freed using { free()} in the end.

Reimplemented from r_Dimension_Tiling.

Member Data Documentation

const char* r_Aligned_Tiling::description
static
r_Minterval r_Aligned_Tiling::tile_config
protected

tile configuration

Determines the individual tiles domains for aligned tiling, using the options expressed in this object. Takes into account the tile size and the tile configuration, as well as the cell size given by {}.

Returns the domain for tiles in such a way that the tile configuration is as close to {} set in this object and the size is lower than { tile_size}.

The origin of the returned interval is the same as that from {->tile_config}.

The data to partition has domain { dom } and cells with size { cell_size}. To be used before splitting a tile with domain { dom} (typically, containing all the cells belonging to an {} object).


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