rasdaman complete source
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
r_Interest_Tiling Class Reference

#include <interesttiling.hh>

Inheritance diagram for r_Interest_Tiling:
r_Dimension_Tiling r_Size_Tiling r_Tiling

Public Types

enum  Tilesize_Limit {
  NO_LIMIT, REGROUP, SUB_TILING, REGROUP_AND_SUBTILING,
  NUMBER
}
 Possible strategies to limit the tilesize. More...
 

Public Member Functions

 r_Interest_Tiling (const char *encoded) throw (r_Error)
 read everything from an encoded string e.g. "2;[0:9,0:9];[100:109,0:9];100;REGROUPSUBTILING" More...
 
 r_Interest_Tiling (r_Dimension dim, const std::vector< r_Minterval > &interest_areas, r_Bytes ts=RMInit::clientTileSize, Tilesize_Limit strat=SUB_TILING) throw (r_Error)
 
virtual ~r_Interest_Tiling ()
 
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...
 
virtual void print_status (std::ostream &os) const
 Prints the current status of the object. More...
 
virtual r_Tilingclone () const
 Clones this object. More...
 
virtual r_Tiling_Scheme get_tiling_scheme () const
 
- 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 Member Functions

static
r_Interest_Tiling::Tilesize_Limit 
get_tilesize_limit_from_name (const char *name)
 
static const char * get_name_from_tilesize_limit (Tilesize_Limit tsl)
 

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 Types

enum  Blocks_Type { BLOCKS_A, BLOCKS_B, BLOCKS_C }
 The Block types (A, B or C) More...
 

Protected Member Functions

std::vector< r_Dir_Decompose > * make_partition (const r_Minterval &domain) const
 Given a domain and a set of interest areas (internal) gener. partition. More...
 
std::vector< r_Minterval > * group (std::vector< r_Minterval > &blocks, r_Bytes typelen, Blocks_Type btype) const
 Merge as many blocks together in a list as possible. More...
 

Protected Attributes

Tilesize_Limit ts_strat
 Tilesize limitation strategie. More...
 
std::vector< r_Mintervaliareas
 Interest areas. 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...
 

Static Protected Attributes

static const char * tilesizelimit_name_nolimit
 
static const char * tilesizelimit_name_regroup
 
static const char * tilesizelimit_name_subtiling
 
static const char * tilesizelimit_name_regroupandsubtiling
 
static const char * all_tilesizelimit_names [r_Interest_Tiling::NUMBER]
 

Constructor & Destructor Documentation

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

read everything from an encoded string e.g. "2;[0:9,0:9];[100:109,0:9];100;REGROUPSUBTILING"

r_Interest_Tiling::r_Interest_Tiling ( r_Dimension  dim,
const std::vector< r_Minterval > &  interest_areas,
r_Bytes  ts = RMInit::clientTileSize,
Tilesize_Limit  strat = SUB_TILING 
)
throw (r_Error
)
virtual r_Interest_Tiling::~r_Interest_Tiling ( )
virtual

It takes as parameter a list containing the areas of interest to the user and also the tilesize to be used. The constructor also takes as parameter the tilesize limitation strategy, that can be the following:

NO_LIMIT: The generated blocks can have any size. REGROUP: Only when performing grouping/merging of blocks, the size of the resulting block of two merges is checked against tilesize. If it's bigger, they are not merged. Blocks larger than tilesize may exist (for instance, if the user specifies an interest area larger then tilesize). SUB_TILING: In this strategie, regrouping is done regardless of the size of the generated blocks. After all the blocks are created, sub-tiling is performed on those whose size is larger than tilesize. REGROUP_AND_SUBTILING: This combines the last two strategies. When merging blocks, blocks larger than tilesize are never created and, when the final blocks are all created, sub-tiling is performed on those whose size is larger then tilesize. An exception is thrown when the dimensions of the domains does not match the specified dimension.

Member Function Documentation

virtual r_Tiling* r_Interest_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.

std::vector<r_Minterval>* r_Interest_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.

static const char* r_Interest_Tiling::get_name_from_tilesize_limit ( Tilesize_Limit  tsl)
static

Get a tilisize limit name for a tilesize limit

static r_Interest_Tiling::Tilesize_Limit r_Interest_Tiling::get_tilesize_limit_from_name ( const char *  name)
static

Get a tilesize limit for a tilisize limit name

virtual r_Tiling_Scheme r_Interest_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.

std::vector<r_Minterval>* r_Interest_Tiling::group ( std::vector< r_Minterval > &  blocks,
r_Bytes  typelen,
Blocks_Type  btype 
) const
protected

Merge as many blocks together in a list as possible.

A Blocks —> Blocks that belong to two or more interest zones (non-groupable) B Blocks —> Blocks within the same interest zone (groupable by interest zone) C Blocks —> Blocks outside interest zones (groupable)

std::vector<r_Dir_Decompose>* r_Interest_Tiling::make_partition ( const r_Minterval domain) const
protected

Given a domain and a set of interest areas (internal) gener. partition.

virtual void r_Interest_Tiling::print_status ( std::ostream &  os) const
virtual

Prints the current status of the object.

Reimplemented from r_Dimension_Tiling.

Member Data Documentation

const char* r_Interest_Tiling::all_tilesizelimit_names[r_Interest_Tiling::NUMBER]
staticprotected
const char* r_Interest_Tiling::description
static
std::vector<r_Minterval> r_Interest_Tiling::iareas
protected

Interest areas.

const char* r_Interest_Tiling::tilesizelimit_name_nolimit
staticprotected

The names of all tilesizelimit types, to avoid redundant storage and inconsistencies. The variable name convention is the prefix tilisizelimit_name_ followed by the name of the data format in lower case, i.e. for NOLIMIT tilisizelimit_name_nolimit. In addition there's an array of names all_tilesizelimit_names where the tilesize limit can be used as index to get the name.

const char* r_Interest_Tiling::tilesizelimit_name_regroup
staticprotected
const char* r_Interest_Tiling::tilesizelimit_name_regroupandsubtiling
staticprotected
const char* r_Interest_Tiling::tilesizelimit_name_subtiling
staticprotected
Tilesize_Limit r_Interest_Tiling::ts_strat
protected

Tilesize limitation strategie.

Parameters: the block list, the lenght of the base cells and the type of the block (A, B or C)


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