![]() |
rasdaman client API 10.6.3
The Array Analytics Engine: Datacubes at Your Fingertips
|
This class implements the "Interesting Areas" tiling algorithm. More...
#include <interesttiling.hh>
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) | |
| read everything from an encoded string e.g. | |
| r_Interest_Tiling (r_Dimension dim, const std::vector< r_Minterval > &interest_areas, r_Bytes ts=r_Tiling::defaultTileSize, Tilesize_Limit strat=SUB_TILING) | |
| virtual | ~r_Interest_Tiling ()=default |
| It takes as parameter a list containing the areas of interest to the user and also the tilesize to be used. | |
| std::vector< r_Minterval > | compute_tiles (const r_Minterval &obj_domain, r_Bytes cell_size) const |
| Decompose an object in tiles. | |
| virtual void | print_status (std::ostream &os) const |
| Prints the current status of the object. | |
| virtual r_Tiling * | clone () const |
| This method provides the core funcionality of this class. | |
| virtual r_Tiling_Scheme | get_tiling_scheme () const |
| This method is similar to a copy constructor, this is, is returns a copy of the current object. | |
Public Member Functions inherited from r_Dimension_Tiling | |
| r_Dimension_Tiling (r_Dimension dim, r_Bytes ts=r_Tiling::defaultTileSize) | |
| Constructor for this object (Takes dim (no of dimension) and tile size as parameter) | |
| virtual | ~r_Dimension_Tiling ()=default |
| bool | is_compatible (const r_Minterval &obj_domain, r_Bytes cellTypeSize) const override |
| returns true if the cellTypeSize is smaller or equal to the tile size and the dimension fits the obj_domain | |
| r_Dimension | get_dimension () const |
Public Member Functions inherited from r_Size_Tiling | |
| r_Size_Tiling (const char *encoded) | |
| Constructor that reads everything from a string e.g."100". | |
| r_Size_Tiling (r_Bytes ts=r_Tiling::defaultTileSize) | |
| virtual | ~r_Size_Tiling ()=default |
| void | print_status (std::ostream &os) const override |
| Prints the current status of the object. | |
| bool | is_compatible (const r_Minterval &obj_domain, r_Bytes cellTypeSize) const override |
| returns true if the cellTypeSize is smaller or equal to the tile size and obj_domain has more than 0 dimensions | |
| std::vector< r_Minterval > | compute_tiles (const r_Minterval &obj_domain, r_Bytes cellTypeSize) const override |
| Decompose an object in tiles. | |
| r_Bytes | get_tile_size () const |
| r_Tiling * | clone () const override |
| This method provides the core funcionality of this class. | |
| r_Tiling_Scheme | get_tiling_scheme () const override |
| This method is similar to a copy constructor, this is, is returns a copy of the current object. | |
Public Member Functions inherited from r_Tiling | |
| virtual | ~r_Tiling ()=default |
Static Public Member Functions | |
| static r_Interest_Tiling::Tilesize_Limit | get_tilesize_limit_from_name (const char *name) |
| Get a tilesize limit for a tilisize limit name. | |
| static const char * | get_name_from_tilesize_limit (Tilesize_Limit tsl) |
| Get a tilisize limit name for a tilesize limit. | |
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 |
| return the type of tiling scheme | |
| static const char * | TCOLON |
| static const char * | TCOMMA |
| static const char * | LSQRBRA |
| static const char * | RSQRBRA |
| static const int | DefaultBase |
| static const r_Bytes | defaultTileSize |
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. | |
| std::vector< r_Minterval > | group (std::vector< r_Minterval > &blocks, r_Bytes typelen, Blocks_Type btype) const |
| 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) | |
Protected Member Functions inherited from r_Tiling | |
| void | check_nonempty_tiling (const char *encoded) const |
| void | check_premature_stream_end (const char *currPos, const char *endPos) const |
| r_Minterval | parse_minterval (const char *encoded) const |
| unsigned int | parse_unsigned (const char *encoded) const |
| unsigned long | parse_unsigned_long (const char *encoded) const |
| long | parse_long (const char *encoded) const |
| double | parse_double (const char *encoded) const |
| std::unique_ptr< char[]> | copy_buffer (const char *buf, size_t len) const |
| const char * | advance_to_next_char (const char *p, const char *search) const |
Protected Attributes | |
| Tilesize_Limit | ts_strat |
| Parameters: the block list, the lenght of the base cells and the type of the block (A, B or C) | |
| std::vector< r_Minterval > | iareas |
| Interest areas. | |
Protected Attributes inherited from r_Dimension_Tiling | |
| r_Dimension | dimension {} |
| dimension the mdd must have | |
Protected Attributes inherited from r_Size_Tiling | |
| r_Bytes | tile_size {} |
| Tile size. | |
Static Protected Attributes | |
| static const char * | tilesizelimit_name_nolimit |
| The names of all tilesizelimit types, to avoid redundant storage and inconsistencies. | |
| 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] |
This class implements the "Interesting Areas" tiling algorithm.
The user specifies which areas are of interest to him and tiling is performed accordingly.
Example of usage: The user says that [10:20, 50:60] and [18:50, 65:70] are of interest to him in the [0:1000, 0:1000] domain. Tiling should be done according to this setting. To specify this with this class the following code would work:
|
protected |
|
explicit |
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 = r_Tiling::defaultTileSize, |
||
| Tilesize_Limit | strat = SUB_TILING |
||
| ) |
|
virtualdefault |
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.
|
virtual |
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. Clones this object
Implements r_Dimension_Tiling.
|
virtual |
Decompose an object in tiles.
Implements r_Dimension_Tiling.
|
static |
Get a tilisize limit name for a tilesize limit.
|
static |
Get a tilesize limit for a tilisize limit name.
|
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.
Implements r_Tiling.
|
protected |
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)
Merge as many blocks together in a list as possible
|
protected |
Given a domain and a set of interest areas (internal) gener. partition.
|
virtual |
Prints the current status of the object.
Reimplemented from r_Dimension_Tiling.
|
staticprotected |
|
static |
|
protected |
Interest areas.
|
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.
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |
Parameters: the block list, the lenght of the base cells and the type of the block (A, B or C)
Tilesize limitation strategie