casacore
Loading...
Searching...
No Matches
NumericTraits2.h
Go to the documentation of this file.
1// # NumericTraits2.h: Specialisations of the NumericTraits class
2// # Copyright (C) 1996,1997,2000
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 SCIMATH_NUMERICTRAITS2_H
27#define SCIMATH_NUMERICTRAITS2_H
28
29#include <casacore/casa/aips.h>
30#include <casacore/casa/BasicSL/Complex.h>
31
32namespace casacore { // # NAMESPACE CASACORE - BEGIN
33
34// <summary> A specialisation for T=Float of the NumericTraits class </summary>
35// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
36// </reviewed>
37template <>
39 public:
40 typedef Complex ConjugateType;
42 static const Double& epsilon;
43 static const Double& minimum;
44 static const Double& maximum;
45};
46
47// <summary> A specialisation for T=Double of the NumericTraits class </summary>
48// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
49// </reviewed>
50template <>
52 public:
53 typedef DComplex ConjugateType;
55 static const Double& epsilon;
56 static const Double& minimum;
57 static const Double& maximum;
58};
59
60// <summary> A specialisation for T=Complex of the NumericTraits class </summary>
61// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
62// </reviewed>
63template <>
64class NumericTraits<Complex> {
65 public:
67 typedef DComplex PrecisionType;
68 static const Double& epsilon;
69 static const Double& minimum;
70 static const Double& maximum;
71};
72
73// <summary> A specialisation for T=DComplex of the NumericTraits class </summary>
74// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
75// </reviewed>
76// <use visibility=local>
77//
78// <synopsis>
79// This file contains specialisations of the templated NumericTraits class.
80// See the description in
81// <linkto file="NumericTraits.h#summary">NumericTraits.h</linkto>
82// for a summary of the purpose and usage of this class and its
83// specialisations.
84// </synopsis>
85
86template <>
87class NumericTraits<DComplex> {
88 public:
90 typedef DComplex PrecisionType;
91 static const Double& epsilon;
92 static const Double& minimum;
93 static const Double& maximum;
94};
95
96} // namespace casacore
97
98#endif
static const Double & epsilon
static const Double & minimum
static const Double & maximum
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
float Float
Definition aipstype.h:52
double Double
Definition aipstype.h:53