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#ifndef CASA_ICOMPLEX_H
27#define CASA_ICOMPLEX_H
28
29// # Includes
30
31#include <casacore/casa/aips.h>
32#include <casacore/casa/iosfwd.h>
33
34namespace casacore { // # NAMESPACE CASACORE - BEGIN
35
36// <summary>
37// Integer complex numbers.
38// </summary>
39// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
40// </reviewed>
41
42// <synopsis>
43// The class <src>IComplex</src> is only a container for FITS usage.
44// </synopsis>
45
46class IComplex {
47 public:
48 // # Constructors
49 // From one or two ints (note for gnu use)
50 // <group>
51 IComplex() : re(0), im(0) { ; };
52 IComplex(Int r) : re(r), im(0) { ; };
53 IComplex(Int r, Int i) : re(r), im(i) { ; };
54 // </group>
55
56 // # Member functions
57 // For use in FITS classes only
58 // <group>
59 Int real() const { return re; };
60 Int imag() const { return im; };
61 // </group>
62
63 private:
66};
67
68// Show on ostream.
69ostream &operator<<(ostream &os, const IComplex &);
70
71} // namespace casacore
72
73#endif
Int real() const
For use in FITS classes only.
Definition IComplex.h:59
IComplex()
From one or two ints (note for gnu use).
Definition IComplex.h:51
IComplex(Int r, Int i)
Definition IComplex.h:53
Int imag() const
Definition IComplex.h:60
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
ostream & operator<<(ostream &os, const IComplex &)
Show on ostream.
int Int
Definition aipstype.h:48