casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
NumericTraits2.h
Go to the documentation of this file.
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: NumericTraits2.h 20364 2008-06-30 06:10:38Z gervandiepen $
00028 
00029 #ifndef SCIMATH_NUMERICTRAITS2_H
00030 #define SCIMATH_NUMERICTRAITS2_H
00031 
00032 #include <casa/BasicSL/Complex.h>
00033 
00034 namespace casa { //# NAMESPACE CASA - BEGIN
00035 
00036 // <summary> A specialisation for T=Float of the NumericTraits class </summary>
00037 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
00038 // </reviewed>
00039 template <> class NumericTraits<Float> {
00040 public:
00041   typedef Complex ConjugateType;
00042   typedef Double PrecisionType;
00043   static const Double & epsilon;
00044   static const Double & minimum;
00045   static const Double & maximum;
00046 };
00047 
00048 // <summary> A specialisation for T=Double of the NumericTraits class </summary>
00049 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
00050 // </reviewed>
00051 template <> class NumericTraits<Double> {
00052 public:
00053   typedef DComplex ConjugateType;
00054   typedef Double PrecisionType;
00055   static const Double & epsilon;
00056   static const Double & minimum;
00057   static const Double & maximum;
00058 };
00059 
00060 // <summary> A specialisation for T=Complex of the NumericTraits class </summary>
00061 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
00062 // </reviewed>
00063 template <> class NumericTraits<Complex> {
00064 public:
00065   typedef Float ConjugateType;
00066   typedef DComplex PrecisionType;
00067   static const Double & epsilon;
00068   static const Double & minimum;
00069   static const Double & maximum;
00070 };
00071 
00072 // <summary> A specialisation for T=DComplex of the NumericTraits class </summary>
00073 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
00074 // </reviewed>
00075 // <use visibility=local>
00076 //
00077 // <synopsis>
00078 // This file contains specialisations of the templated NumericTraits class. 
00079 // See the description in 
00080 // <linkto file="NumericTraits.h#summary">NumericTraits.h</linkto> 
00081 // for a summary of the purpose and usage of this class and its
00082 // specialisations.
00083 // </synopsis>
00084 
00085 template <> class NumericTraits<DComplex> {
00086 public:
00087   typedef Double ConjugateType;
00088   typedef DComplex PrecisionType;
00089   static const Double & epsilon;
00090   static const Double & minimum;
00091   static const Double & maximum;
00092 };
00093 
00094 
00095 } //# NAMESPACE CASA - END
00096 
00097 #endif