rasdaman client API  10.6.3
The Array Analytics Engine: Datacubes at Your Fingertips
mitera.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 */
23 
24 #ifndef D_MITERA_HH
25 #define D_MITERA_HH
26 
27 #include "raslib/minterval.hh"
28 
29 //@ManMemo: Module: {\bf raslib}
49 {
50 public:
56  r_MiterArea(const r_Minterval *newIterDom, const r_Minterval *newImgDom);
59  void reset();
63  bool isDone();
64 
65 protected:
66  // structure storing information on iteration for each dimension
67  // (perhaps add dimension for reordering later)
68  struct incArrElem
69  {
70  int repeat; // total number of repeats
71  int curr; // current repeat
72  };
76  const r_Minterval *iterDom{NULL};
78  const r_Minterval *imgDom{NULL};
82  bool done{false};
83 };
84 
85 #endif
The spatial domain of an MDD is represented by an object of class r_Minterval.
Definition: minterval.hh:226
r_MiterArea is used for iterating r_Mintervals through larger r_Mintervals.
Definition: mitera.hh:49
r_Minterval retVal
This is used for the return value in nextArea()
Definition: mitera.hh:74
r_Minterval nextArea()
returns current cell and sets iterator to next cell.
incArrElem * incArrIter
array with increments
Definition: mitera.hh:80
const r_Minterval * iterDom
area to be iterated through
Definition: mitera.hh:76
bool isDone()
returns TRUE if iteration is finished.
r_MiterArea(const r_Minterval *newIterDom, const r_Minterval *newImgDom)
The pointers are stored, do not delete the objects as long as the iterator is used!
const r_Minterval * imgDom
area of tile.
Definition: mitera.hh:78
void reset()
resets iterator to beginning.
bool done
flag set if iteration is finished.
Definition: mitera.hh:82
Definition: mitera.hh:69
int curr
Definition: mitera.hh:71
int repeat
Definition: mitera.hh:70