rasdaman client API  10.6.3
The Array Analytics Engine: Datacubes at Your Fingertips
interesttiling.hh
Go to the documentation of this file.
1 /*
2 * This file is part of rasdaman community.
3 *
4 * Rasdaman community is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * Rasdaman community is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with rasdaman community. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
18 rasdaman GmbH.
19 *
20 * For more information please see <http://www.rasdaman.org>
21 * or contact Peter Baumann via <baumann@rasdaman.com>.
22 */
33 #ifndef _R_INTERESTTILING_HH_
34 #define _R_INTERESTTILING_HH_
35 
36 #include "rasodmg/tiling.hh"
37 
38 class r_Dir_Decompose;
39 class r_Interest_Tiling;
40 
41 //@ManMemo: Module: {\bf rasodmg}
42 
76 {
77 public:
80  {
86  };
87 
90  explicit r_Interest_Tiling(const char *encoded);
91 
93  const std::vector<r_Minterval> &interest_areas,
95  Tilesize_Limit strat = SUB_TILING);
122  virtual ~r_Interest_Tiling() = default;
123 
124  std::vector<r_Minterval> compute_tiles(const r_Minterval &obj_domain, r_Bytes cell_size) const;
125 
126  virtual void print_status(std::ostream &os) const;
127 
128  virtual r_Tiling *clone() const;
129 
130  virtual r_Tiling_Scheme get_tiling_scheme() const;
131 
132  //@ManMemo: Module: {\bf raslib}
137  //@ManMemo: Module: {\bf raslib}
141  static const char *get_name_from_tilesize_limit(Tilesize_Limit tsl);
142 
143  static const char *description;
144 
145 protected: // methods.
147  std::vector<r_Dir_Decompose> make_partition(const r_Minterval &domain) const;
148 
151  {
155  };
165  std::vector<r_Minterval> group(std::vector<r_Minterval> &blocks, r_Bytes typelen, Blocks_Type btype) const;
174 
176  std::vector<r_Minterval> iareas;
177 
178  //@ManMemo: Module: {\bf raslib}
186  static const char *tilesizelimit_name_nolimit;
187  static const char *tilesizelimit_name_regroup;
188  static const char *tilesizelimit_name_subtiling;
190 
192 };
193 
194 #endif
r_Dimension_Tiling
Definition: tiling.hh:168
r_Interest_Tiling::compute_tiles
std::vector< r_Minterval > compute_tiles(const r_Minterval &obj_domain, r_Bytes cell_size) const
Decompose an object in tiles.
r_Dimension
std::uint32_t r_Dimension
number of dimensions in r_Point and r_Minterval.
Definition: mddtypes.hh:56
r_Interest_Tiling::Blocks_Type
Blocks_Type
The Block types (A, B or C)
Definition: interesttiling.hh:150
r_Interest_Tiling::description
static const char * description
Definition: interesttiling.hh:143
r_Interest_Tiling::NO_LIMIT
@ NO_LIMIT
Definition: interesttiling.hh:81
r_Interest_Tiling::r_Interest_Tiling
r_Interest_Tiling(const char *encoded)
read everything from an encoded string e.g.
r_Interest_Tiling
This class implements the "Interesting Areas" tiling algorithm.
Definition: interesttiling.hh:75
tiling.hh
r_Interest_Tiling::ts_strat
Tilesize_Limit ts_strat
Parameters: the block list, the lenght of the base cells and the type of the block (A,...
Definition: interesttiling.hh:173
r_Interest_Tiling::~r_Interest_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...
r_Interest_Tiling::BLOCKS_B
@ BLOCKS_B
Definition: interesttiling.hh:153
r_Tiling_Scheme
r_Tiling_Scheme
Tiling of the object:
Definition: mddtypes.hh:316
r_Interest_Tiling::group
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 withi...
r_Tiling::defaultTileSize
static const r_Bytes defaultTileSize
Definition: tiling.hh:92
r_Interest_Tiling::get_name_from_tilesize_limit
static const char * get_name_from_tilesize_limit(Tilesize_Limit tsl)
Get a tilisize limit name for a tilesize limit.
r_Tiling
The r_Tiling class is used to specify in which way the tiling is done by the system.
Definition: tiling.hh:52
r_Bytes
size_t r_Bytes
number of bytes in an tile or mdd or type.
Definition: mddtypes.hh:43
r_Interest_Tiling::make_partition
std::vector< r_Dir_Decompose > make_partition(const r_Minterval &domain) const
Given a domain and a set of interest areas (internal) gener. partition.
r_Interest_Tiling::BLOCKS_C
@ BLOCKS_C
Definition: interesttiling.hh:154
r_Interest_Tiling::clone
virtual r_Tiling * clone() const
This method provides the core funcionality of this class.
r_Interest_Tiling::SUB_TILING
@ SUB_TILING
Definition: interesttiling.hh:83
r_Interest_Tiling::BLOCKS_A
@ BLOCKS_A
Definition: interesttiling.hh:152
r_Interest_Tiling::get_tilesize_limit_from_name
static r_Interest_Tiling::Tilesize_Limit get_tilesize_limit_from_name(const char *name)
Get a tilesize limit for a tilisize limit name.
r_Interest_Tiling::tilesizelimit_name_regroup
static const char * tilesizelimit_name_regroup
Definition: interesttiling.hh:187
r_Interest_Tiling::tilesizelimit_name_regroupandsubtiling
static const char * tilesizelimit_name_regroupandsubtiling
Definition: interesttiling.hh:189
r_Interest_Tiling::REGROUP_AND_SUBTILING
@ REGROUP_AND_SUBTILING
Definition: interesttiling.hh:84
r_Interest_Tiling::NUMBER
@ NUMBER
Definition: interesttiling.hh:85
r_Interest_Tiling::tilesizelimit_name_subtiling
static const char * tilesizelimit_name_subtiling
Definition: interesttiling.hh:188
r_Interest_Tiling::all_tilesizelimit_names
static const char * all_tilesizelimit_names[r_Interest_Tiling::NUMBER]
Definition: interesttiling.hh:191
r_Interest_Tiling::REGROUP
@ REGROUP
Definition: interesttiling.hh:82
r_Interest_Tiling::iareas
std::vector< r_Minterval > iareas
Interest areas.
Definition: interesttiling.hh:176
r_Minterval
The spatial domain of an MDD is represented by an object of class r_Minterval.
Definition: minterval.hh:225
r_Interest_Tiling::print_status
virtual void print_status(std::ostream &os) const
Prints the current status of the object.
r_Interest_Tiling::tilesizelimit_name_nolimit
static const char * tilesizelimit_name_nolimit
The names of all tilesizelimit types, to avoid redundant storage and inconsistencies.
Definition: interesttiling.hh:186
r_Dir_Decompose
The r_Dir_Decompose class is used to specify a decomposition on an n-dimensional cube (for use in r_D...
Definition: dirdecompose.hh:53
r_Interest_Tiling::get_tiling_scheme
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.
r_Interest_Tiling::Tilesize_Limit
Tilesize_Limit
Possible strategies to limit the tilesize.
Definition: interesttiling.hh:79