Developer documentation

texp_structureof.hpp
Go to the documentation of this file.
1 #ifndef realroot_ARITHM_TRAITS_STRUCTUREOF_H
2 #define realroot_ARITHM_TRAITS_STRUCTUREOF_H
3 
4 #include <realroot/texp.hpp>
6 
7 namespace mmx {
8 
9 namespace texp {
10 
11  namespace structure {
12 
13  struct scalar
14  {
15  struct floating;
16  struct integer;
17  struct rational;
18  struct complex;
19  struct interval;
20  };
21 
22  struct vector;
23  struct matrix;
24  struct polynomial;
25 
26  struct dense;
27  struct sparse;
28  struct structured;
29  struct univariate;
30  struct multivariate;
31  struct monomial;
32  struct bernstein;
33  };
34 
35  template<class X> struct scalar_type {};
36 
37  template<class X> struct structureof_
38  {
39  typedef texp::null_t T;
40  };
41 
42  template<class K, class X>
43  struct kernel_structureof { typedef structure::scalar T; };
44 
45  template<class X>
46  struct kernel_structureof<null_t,X> { typedef typename structureof_<X>::T T; };
47 
48  template<class K>
49  struct kernel_structureof< K, typename K::integer > { typedef structure::scalar T; };
50  template<class K>
51  struct kernel_structureof< K, typename K::rational > { typedef structure::scalar T; };
52  template<class K>
53  struct kernel_structureof< K, typename K::floating > { typedef structure::scalar T; };
54  template<class K>
55  struct kernel_structureof< K, typename K::ieee > { typedef structure::scalar T; };
56 
57 
58 
59 
60  template<class X> struct structureof {
61  typedef typename ucstref<X>::T _X;
62  typedef typename kernelof<X>::T K;
63  typedef typename kernel_structureof<K, _X >::T T;
64 };
65 
66 
67 
68  // template<> struct structureof_<double> { typedef structure::scalar T; };
69 
70 
71 
72 
73 };
74 
75 }// end namespace mmx
76 
77 #endif
texp::null_t T
Definition: texp_structureof.hpp:39
TMPL X
Definition: polynomial_operators.hpp:148
structure defining a the empty list
Definition: texp_bool.hpp:11
structureof_< X >::T T
Definition: texp_structureof.hpp:46
Definition: texp_structureof.hpp:37
Definition: texp_structureof.hpp:13
Definition: texp_structureof.hpp:43
structure::scalar T
Definition: texp_structureof.hpp:51
kernelof< X >::T K
Definition: texp_structureof.hpp:62
kernel_structureof< K, _X >::T T
Definition: texp_structureof.hpp:63
Definition: polynomial.hpp:37
structure::scalar T
Definition: texp_structureof.hpp:55
structure::scalar T
Definition: texp_structureof.hpp:49
uref< typename ucst< X >::T >::T T
Definition: texp_strip_qualifiers.hpp:28
ucstref< X >::T _X
Definition: texp_structureof.hpp:61
Definition: texp_structureof.hpp:35
Definition: array.hpp:12
Definition: texp_structureof.hpp:60
structure::scalar T
Definition: texp_structureof.hpp:53
structure::scalar T
Definition: texp_structureof.hpp:43
Home