Developer documentation

texp_fieldof.hpp
Go to the documentation of this file.
1 #ifndef realroot_ARITHM_TRAITS_FIELDOF_H
2 #define realroot_ARITHM_TRAITS_FIELDOF_H
3 
4 #include <realroot/texp_sup.hpp>
5 #include <complex>
6 namespace mmx {
7 
8 namespace texp {
9 
10  template<class X, class Y>
11  struct fieldof_ { typedef texp::null_t T; };
12 
13 
14  template<>
15  struct fieldof_<int, unsigned int> { typedef double T; };
16  template<>
17  struct fieldof_<unsigned int, int> { typedef double T; };
18  template<>
19  struct fieldof_<double,int> { typedef double T; };
20  template<>
21  struct fieldof_<int,double> { typedef double T; };
22  template<>
23  struct fieldof_<double,unsigned int> { typedef double T; };
24  template<>
25  struct fieldof_<unsigned int,double> { typedef double T; };
26 
27 
28  template<class K, class X, class Y>
29  struct kernel_fieldof { typedef typename K::rational T; };
30  template<class K>
31  struct kernel_fieldof< K, typename K::floating, typename K::ieee >
32  { typedef typename K::floating T; };
33  template<class K>
34  struct kernel_fieldof< K, typename K::ieee, typename K::floating >
35  { typedef typename K::floating T; };
36 
37  template<class X, class Y> struct kernel_fieldof<null_t,X,Y> { typedef null_t T; };
38 
40  template<class X, class Y>
41  struct fieldof
42  {
43  typedef typename ucstref<X>::T _X;
44  typedef typename ucstref<Y>::T _Y;
48  };
49 
50  template<class X, class Y>
51  struct fieldof_< std::complex<X>, std::complex<Y> > { typedef std::complex<typename fieldof<X,Y>::T > T; };
52  template<class X>
53  struct fieldof_< std::complex<X>, std::complex<X> > { typedef std::complex<X> T; };
54 }
55 }// end namespace mmx
56 
57 #endif
std::complex< typename fieldof< X, Y >::T > T
Definition: texp_fieldof.hpp:51
Definition: texp_fieldof.hpp:29
TMPL X
Definition: polynomial_operators.hpp:148
structure defining a the empty list
Definition: texp_bool.hpp:11
double T
Definition: texp_fieldof.hpp:19
x (in X) + y (in Y) is subset of fieldof::T
Definition: texp_fieldof.hpp:41
K::rational T
Definition: texp_fieldof.hpp:29
ucstref< Y >::T _Y
Definition: texp_fieldof.hpp:44
std::complex< X > T
Definition: texp_fieldof.hpp:53
null_t T
Definition: texp_fieldof.hpp:37
double T
Definition: texp_fieldof.hpp:23
Definition: texp_fieldof.hpp:11
double T
Definition: texp_fieldof.hpp:15
double T
Definition: texp_fieldof.hpp:25
uref< typename ucst< X >::T >::T T
Definition: texp_strip_qualifiers.hpp:28
kernel_fieldof< typename kernelof< X >::T, _X, _Y >::T KXY
Definition: texp_fieldof.hpp:45
Definition: texp_list.hpp:82
ucstref< X >::T _X
Definition: texp_fieldof.hpp:43
texp::null_t T
Definition: texp_fieldof.hpp:11
sfirstnn< C, A, B >::T T
Definition: texp_sup.hpp:31
texp::sfirstnn< typename fieldof_< _X, _Y >::T, KXY, KYX, typename sup< X, Y >::T >::T T
Definition: texp_fieldof.hpp:47
kernel_fieldof< typename kernelof< Y >::T, _Y, _X >::T KYX
Definition: texp_fieldof.hpp:46
Definition: array.hpp:12
double T
Definition: texp_fieldof.hpp:21
double T
Definition: texp_fieldof.hpp:17
Home