00001 //# NumericTraits2.h: Specialisations of the NumericTraits class 00002 //# Copyright (C) 1996,1997,2000 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This library is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU Library General Public License as published by 00007 //# the Free Software Foundation; either version 2 of the License, or (at your 00008 //# option) any later version. 00009 //# 00010 //# This library is distributed in the hope that it will be useful, but WITHOUT 00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 //# License for more details. 00014 //# 00015 //# You should have received a copy of the GNU Library General Public License 00016 //# along with this library; if not, write to the Free Software Foundation, 00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00018 //# 00019 //# Correspondence concerning AIPS++ should be addressed as follows: 00020 //# Internet email: aips2-request@nrao.edu. 00021 //# Postal address: AIPS++ Project Office 00022 //# National Radio Astronomy Observatory 00023 //# 520 Edgemont Road 00024 //# Charlottesville, VA 22903-2475 USA 00025 //# 00026 //# 00027 //# $Id$ 00028 00029 #ifndef SCIMATH_NUMERICTRAITS2_H 00030 #define SCIMATH_NUMERICTRAITS2_H 00031 00032 #include <casacore/casa/aips.h> 00033 #include <casacore/casa/BasicSL/Complex.h> 00034 00035 namespace casacore { //# NAMESPACE CASACORE - BEGIN 00036 00037 // <summary> A specialisation for T=Float of the NumericTraits class </summary> 00038 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos=""> 00039 // </reviewed> 00040 template <> class NumericTraits<Float> { 00041 public: 00042 typedef Complex ConjugateType; 00043 typedef Double PrecisionType; 00044 static const Double & epsilon; 00045 static const Double & minimum; 00046 static const Double & maximum; 00047 }; 00048 00049 // <summary> A specialisation for T=Double of the NumericTraits class </summary> 00050 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos=""> 00051 // </reviewed> 00052 template <> class NumericTraits<Double> { 00053 public: 00054 typedef DComplex ConjugateType; 00055 typedef Double PrecisionType; 00056 static const Double & epsilon; 00057 static const Double & minimum; 00058 static const Double & maximum; 00059 }; 00060 00061 // <summary> A specialisation for T=Complex of the NumericTraits class </summary> 00062 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos=""> 00063 // </reviewed> 00064 template <> class NumericTraits<Complex> { 00065 public: 00066 typedef Float ConjugateType; 00067 typedef DComplex PrecisionType; 00068 static const Double & epsilon; 00069 static const Double & minimum; 00070 static const Double & maximum; 00071 }; 00072 00073 // <summary> A specialisation for T=DComplex of the NumericTraits class </summary> 00074 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos=""> 00075 // </reviewed> 00076 // <use visibility=local> 00077 // 00078 // <synopsis> 00079 // This file contains specialisations of the templated NumericTraits class. 00080 // See the description in 00081 // <linkto file="NumericTraits.h#summary">NumericTraits.h</linkto> 00082 // for a summary of the purpose and usage of this class and its 00083 // specialisations. 00084 // </synopsis> 00085 00086 template <> class NumericTraits<DComplex> { 00087 public: 00088 typedef Double ConjugateType; 00089 typedef DComplex PrecisionType; 00090 static const Double & epsilon; 00091 static const Double & minimum; 00092 static const Double & maximum; 00093 }; 00094 00095 00096 } //# NAMESPACE CASACORE - END 00097 00098 #endif