rasdaman client API  10.6.3
The Array Analytics Engine: Datacubes at Your Fingertips
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | Static Protected Attributes | List of all members
r_Dir_Tiling Class Reference

This class implements the "Directional Tiling" tiling method. More...

#include <dirtiling.hh>

Inheritance diagram for r_Dir_Tiling:
r_Dimension_Tiling r_Size_Tiling r_Tiling

Public Types

enum  SubTiling { WITHOUT_SUBTILING = 0, WITH_SUBTILING = 1, NUMBER = 2 }
 Constants that specify if subtiling will occur inside the blocks. More...
 

Public Member Functions

 r_Dir_Tiling (const char *encoded)
 read everything from encoded string e.g. More...
 
 r_Dir_Tiling (r_Dimension dims, const std::vector< r_Dir_Decompose > &decomp, r_Bytes ts=r_Tiling::defaultTileSize, SubTiling sub=WITH_SUBTILING)
 Class constructor. More...
 
 ~r_Dir_Tiling () override=default
 The user has to give the number of dimensions of the space and the decomposition wanted for that space. More...
 
std::vector< r_Mintervalcompute_tiles (const r_Minterval &obj_domain, r_Bytes cell_size) const override
 Decompose an object in tiles. More...
 
bool is_compatible (const r_Minterval &obj_domain, r_Bytes type_len) const override
 Check compatibility of object domain with this tiling. More...
 
void print_status (std::ostream &os) const override
 Prints the current status of the object. More...
 
r_Tilingclone () const override
 This method provides the core funcionality of this class. More...
 
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. More...
 
- 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) More...
 
virtual ~r_Dimension_Tiling ()=default
 
void print_status (std::ostream &os) const override
 Prints the current status of the object. More...
 
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 More...
 
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". More...
 
 r_Size_Tiling (r_Bytes ts=r_Tiling::defaultTileSize)
 
virtual ~r_Size_Tiling ()=default
 
r_Bytes get_tile_size () const
 
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. More...
 
- Public Member Functions inherited from r_Tiling
virtual ~r_Tiling ()=default
 

Static Public Member Functions

static r_Dir_Tiling::SubTiling get_subtiling_from_name (const char *name)
 Get a tilesize limit for a tilisize limit name. More...
 
static const char * get_name_from_subtiling (SubTiling st)
 Get a tilisize limit name for a tilesize limit. 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
 return the type of tiling scheme More...
 
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 Attributes

std::vector< r_Dir_Decomposedim_decomp
 The decomposition to be used. More...
 
SubTiling sub_tile
 If sub-tiling should occour. 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 * subtiling_name_withoutsubtiling
 The names of all subtiling types, to avoid redundant storage and inconsistencies. More...
 
static const char * subtiling_name_withsubtiling
 
static const char * all_subtiling_names [r_Dir_Tiling::NUMBER]
 

Additional Inherited Members

- 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
 

Detailed Description

This class implements the "Directional Tiling" tiling method.

In this method the decomposition is done along certain directions of the multi-dimensional cube. The user uses r_Dir_Decompose to inform the system on how the decomposition is done in each dimension.

Member Enumeration Documentation

◆ SubTiling

Constants that specify if subtiling will occur inside the blocks.

Enumerator
WITHOUT_SUBTILING 
WITH_SUBTILING 
NUMBER 

Constructor & Destructor Documentation

◆ r_Dir_Tiling() [1/2]

r_Dir_Tiling::r_Dir_Tiling ( const char *  encoded)
explicit

read everything from encoded string e.g.

"3;[0,2,4,5],[*],[0,10,15];100;NOSUBTILING"

◆ r_Dir_Tiling() [2/2]

r_Dir_Tiling::r_Dir_Tiling ( r_Dimension  dims,
const std::vector< r_Dir_Decompose > &  decomp,
r_Bytes  ts = r_Tiling::defaultTileSize,
SubTiling  sub = WITH_SUBTILING 
)

Class constructor.

◆ ~r_Dir_Tiling()

r_Dir_Tiling::~r_Dir_Tiling ( )
overridedefault

The user has to give the number of dimensions of the space and the decomposition wanted for that space.

Note that the number of elements of decomp must be the same as the number of dimensions of the space. See r_Dir_Decompose for details on how to indicate a decomposition. SubTiling indicates if subtiling should occur inside the blocks specified by the user. Throws an exception when the decomp.size is not equal to the specified dimension.

Member Function Documentation

◆ clone()

r_Tiling* r_Dir_Tiling::clone ( ) const
overridevirtual

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.

◆ compute_tiles()

std::vector<r_Minterval> r_Dir_Tiling::compute_tiles ( const r_Minterval obj_domain,
r_Bytes  cell_size 
) const
overridevirtual

Decompose an object in tiles.

Implements r_Dimension_Tiling.

◆ get_name_from_subtiling()

static const char* r_Dir_Tiling::get_name_from_subtiling ( SubTiling  st)
static

Get a tilisize limit name for a tilesize limit.

◆ get_subtiling_from_name()

static r_Dir_Tiling::SubTiling r_Dir_Tiling::get_subtiling_from_name ( const char *  name)
static

Get a tilesize limit for a tilisize limit name.

◆ get_tiling_scheme()

r_Tiling_Scheme r_Dir_Tiling::get_tiling_scheme ( ) const
overridevirtual

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.

◆ is_compatible()

bool r_Dir_Tiling::is_compatible ( const r_Minterval obj_domain,
r_Bytes  cellTypeSize 
) const
overridevirtual

Check compatibility of object domain with this tiling.

Implements r_Tiling.

◆ print_status()

void r_Dir_Tiling::print_status ( std::ostream &  os) const
overridevirtual

Prints the current status of the object.

Implements r_Tiling.

Member Data Documentation

◆ all_subtiling_names

const char* r_Dir_Tiling::all_subtiling_names[r_Dir_Tiling::NUMBER]
staticprotected

◆ description

const char* r_Dir_Tiling::description
static

◆ dim_decomp

std::vector<r_Dir_Decompose> r_Dir_Tiling::dim_decomp
protected

The decomposition to be used.

◆ sub_tile

SubTiling r_Dir_Tiling::sub_tile
protected

If sub-tiling should occour.

◆ subtiling_name_withoutsubtiling

const char* r_Dir_Tiling::subtiling_name_withoutsubtiling
staticprotected

The names of all subtiling types, to avoid redundant storage and inconsistencies.

The variable name convention is the prefix subtiling_name_ followed by the name of the data format in lower case, i.e. for WITH_SUBTILING subtiling_name_withsubtiling. In addition there's an array of names all_subtiling_names where the subtiling can be used as index to get the name.

◆ subtiling_name_withsubtiling

const char* r_Dir_Tiling::subtiling_name_withsubtiling
staticprotected

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