rasdaman client API  10.6.3
The Array Analytics Engine: Datacubes at Your Fingertips
complex.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 R_COMPLEX_HH
25 #define R_COMPLEX_HH
26 
27 #include "raslib/odmgtypes.hh"
28 #include "raslib/primitive.hh"
29 
30 class r_Complex_Type;
31 
32 //@ManMemo: Module: {\bf raslib}
42 class r_Complex : public r_Primitive
43 {
44 public:
45  explicit
47  r_Complex(const char *newBuffer, const r_Complex_Type *newType);
48 
50  r_Complex(const r_Complex &obj);
51 
53  ~r_Complex() override = default;
54 
55  virtual bool isComplex() const override;
56 
58  virtual r_Scalar *clone() const override;
59 
61  const r_Complex &operator=(const r_Complex &);
62 
63  r_Double get_re() const;
64  r_Double get_im() const;
65 
66  void set_re(r_Double);
67  void set_im(r_Double);
68 
69  r_Long get_re_long() const;
70  r_Long get_im_long() const;
71 
72  void set_re_long(r_Long);
73  void set_im_long(r_Long);
74 
75 private:
76  void checkTypeAndBuffer() const;
77 };
78 
79 #endif
r_Complex::set_re_long
void set_re_long(r_Long)
r_Complex::~r_Complex
~r_Complex() override=default
destructor
r_Complex::get_im
r_Double get_im() const
r_Complex::get_re_long
r_Long get_re_long() const
r_Complex::clone
virtual r_Scalar * clone() const override
clone operator
r_Complex_Type
Definition: complextype.hh:34
r_Complex::set_re
void set_re(r_Double)
r_Long
std::int32_t r_Long
Definition: odmgtypes.hh:37
r_Complex::isComplex
virtual bool isComplex() const override
odmgtypes.hh
r_Complex
Class r_Complex represents a complex type value.
Definition: complex.hh:42
r_Complex::get_re
r_Double get_re() const
r_Complex::set_im_long
void set_im_long(r_Long)
r_Scalar
Class r_Scalar represents a scalar type value which is either r_Primitive or r_Structure.
Definition: scalar.hh:42
primitive.hh
r_Complex::operator=
const r_Complex & operator=(const r_Complex &)
operator for assigning a primitive
r_Double
double r_Double
Definition: odmgtypes.hh:40
r_Complex::r_Complex
r_Complex(const char *newBuffer, const r_Complex_Type *newType)
constructs a scalar type value
r_Complex::set_im
void set_im(r_Double)
r_Primitive
Class r_Primitive represents a primitive (atomic) type value.
Definition: primitive.hh:42
r_Complex::get_im_long
r_Long get_im_long() const