npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
GeneralizedComplex.hh
Go to the documentation of this file.
1 #ifndef NPSTAT_GENERALIZEDCOMPLEX_HH_
2 #define NPSTAT_GENERALIZEDCOMPLEX_HH_
3 
4 /*!
5 // \file GeneralizedComplex.hh
6 //
7 // \brief Typedef complex type if it makes sense (parameter is real);
8 // otherwise typedef the original type
9 //
10 // Author: I. Volobouev
11 //
12 // October 2013
13 */
14 
15 #include "lapack_double.h"
16 #include <complex>
17 
18 namespace npstat {
19  template <typename T>
21  {
22  typedef T type;
23  };
24 
25  template <>
26  struct GeneralizedComplex<float>
27  {
28  typedef std::complex<float> type;
29  };
30 
31  template <>
32  struct GeneralizedComplex<double>
33  {
34  typedef std::complex<double> type;
35  };
36 
37  template <>
38  struct GeneralizedComplex<long double>
39  {
40  typedef std::complex<long double> type;
41  };
42 
43 #ifdef USE_LAPACK_QUAD
44  template <>
45  struct GeneralizedComplex<lapack_double>
46  {
47  typedef std::complex<lapack_double> type;
48  };
49 #endif
50 }
51 
52 #endif // NPSTAT_GENERALIZEDCOMPLEX_HH_
Definition: AbsArrayProjector.hh:14
Definition: GeneralizedComplex.hh:21