rasdaman client API 10.6.3
The Array Analytics Engine: Datacubes at Your Fingertips
marray.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 /
18rasdaman 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_MARRAY_
25#define _D_MARRAY_
26
27#include "rasodmg/gmarray.hh"
28
29#include <iosfwd>
30
31//@ManMemo: Module: {\bf rasodmg}
32
44template <class T>
45class r_Marray : public r_GMarray
46{
47public:
49 typedef T (*r_InitFunction)(const r_Point &);
50
53
55 explicit r_Marray(const r_Minterval &, r_Storage_Layout *stl = 0);
64 r_Marray(const r_Minterval &, const T &, r_Storage_Layout *stl = 0);
83
85 explicit r_Marray(r_GMarray &);
86 /*
87 This constructor is used for converting general r_GMarray objects
88 to cell type safe r_Marray objects. Care has to be taken because
89 the memory of the r_GMarray can not be used anymore; it is passed
90 to the r_Marray<T> object.
91 */
92
94 virtual ~r_Marray();
95
97 const r_Marray &operator=(const r_Marray &);
98
101
104
106 const T &operator[](const r_Point &) const;
107
109 T &operator[](const r_Point &);
110
112 operator T();
113
115 virtual void print_status(std::ostream &s);
116};
117
118#ifdef EARLY_TEMPLATE
119#ifdef __EXECUTABLE__
120#include "rasodmg/marray.cc"
121#endif
122#endif
123
124#endif
The class represents a generic MDD in the sense that it is independent of the cell base type.
Definition gmarray.hh:66
The central class of the library for representing an MDD object is named r_Marray.
Definition marray.hh:46
r_Marray(const r_Marray< T > &)
If a storage layout pointer is provided, the object refered to is taken and memory control moves to t...
r_Marray()
default constructor (no memory is allocated!)
T(* r_InitFunction)(const r_Point &)
function type for initialization function
Definition marray.hh:49
virtual void print_status(std::ostream &s)
writes the state of the object to the specified stream
r_Marray(const r_Minterval &, r_Storage_Layout *stl=0)
constructor for uninitialized MDD objects
r_Marray(const r_Minterval &, r_InitFunction, r_Storage_Layout *stl=0)
If a storage layout pointer is provided, the object refered to is taken and memory control moves to t...
r_Marray(r_GMarray &)
constructor getting an object of type r_GMarray
const r_Marray & operator=(const r_Marray &)
assignment: cleanup + copy
r_Marray(const r_Minterval &, const T &, r_Storage_Layout *stl=0)
If a storage layout pointer is provided, the object refered to is taken and memory control moves to t...
r_Marray< T > operator[](const r_Minterval &) const
subscript operator for restriction/extension combination
const T & operator[](const r_Point &) const
subscript operator for read access of a cell
virtual ~r_Marray()
destructor
T & operator[](const r_Point &)
subscript operator for write access of a cell
r_Marray< T > operator[](long) const
subscript operator for projection in the 1st dimension
The spatial domain of an MDD is represented by an object of class r_Minterval.
Definition minterval.hh:226
Class r_Point represents an n-dimensional point vector.
Definition point.hh:43
The r_Storage_Layout class is used to express the storage options for r_Marray objects.
Definition storagelayout.hh:61