casacore
Loading...
Searching...
No Matches
IComplex.h
Go to the documentation of this file.
1//# IComplex.h: Integer complex number
2//# Copyright (C) 2000,2001
3//# Associated Universities, Inc. Washington DC, USA.
4//#
5//# This library is free software; you can redistribute it and/or modify it
6//# under the terms of the GNU Library General Public License as published by
7//# the Free Software Foundation; either version 2 of the License, or (at your
8//# option) any later version.
9//#
10//# This library is distributed in the hope that it will be useful, but WITHOUT
11//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13//# License for more details.
14//#
15//# You should have received a copy of the GNU Library General Public License
16//# along with this library; if not, write to the Free Software Foundation,
17//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18//#
19//# Correspondence concerning AIPS++ should be addressed as follows:
20//# Internet email: casa-feedback@nrao.edu.
21//# Postal address: AIPS++ Project Office
22//# National Radio Astronomy Observatory
23//# 520 Edgemont Road
24//# Charlottesville, VA 22903-2475 USA
25
26
27#ifndef CASA_ICOMPLEX_H
28#define CASA_ICOMPLEX_H
29
30//# Includes
31
32#include <casacore/casa/aips.h>
33#include <casacore/casa/iosfwd.h>
34
35namespace casacore { //# NAMESPACE CASACORE - BEGIN
36
37// <summary>
38// Integer complex numbers.
39// </summary>
40// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
41// </reviewed>
42
43// <synopsis>
44// The class <src>IComplex</src> is only a container for FITS usage.
45// </synopsis>
46
47class IComplex {
48public:
49 //# Constructors
50 // From one or two ints (note for gnu use)
51 // <group>
52 IComplex() : re(0), im(0) {;};
53 IComplex(Int r) : re(r), im(0) {;};
54 IComplex(Int r, Int i) : re(r), im(i) {;};
55 // </group>
56
57 //# Member functions
58 // For use in FITS classes only
59 // <group>
60 Int real() const { return re; };
61 Int imag() const { return im; };
62 // </group>
63
64private:
67};
68
69
70// Show on ostream.
71ostream &operator<< (ostream &os, const IComplex&);
72
73
74
75} //# NAMESPACE CASACORE - END
76
77#endif
Int real() const
For use in FITS classes only.
Definition IComplex.h:60
IComplex()
From one or two ints (note for gnu use)
Definition IComplex.h:52
IComplex(Int r, Int i)
Definition IComplex.h:54
Int imag() const
Definition IComplex.h:61
this file contains all the compiler specific defines
Definition mainpage.dox:28
ostream & operator<<(ostream &os, const IComplex &)
Show on ostream.
int Int
Definition aipstype.h:48