1 #ifndef realroot_ARITHM_TEXP_TEMPLATE_EXPRESSION_H
2 #define realroot_ARITHM_TEXP_TEMPLATE_EXPRESSION_H
12 template<
class F,
class X,
class Y>
25 template<
class F,
class X,
class Y>
32 template<
class op,
class X>
40 template<
class op,
class X,
class Y,
class SX,
class SY>
48 template<
class op,
class X,
class Y>
72 inline const A &
term()
const {
return a; };
73 template<
class X>
operator X() {
return X(
term()); };
78 template<
class O,
class A >
101 static inline void evalterm ( E & r, L & l ) { O()(r,l); };
110 inline void eval ( E & r,
const false_t & )
const { evaltree( r ); };
111 inline void eval ( E & r,
const true_t& )
const { evalterm( r, a.a ); };
112 inline void eval ( E & r )
const {
eval(r,
typename A::terminal_t()); };
114 inline void eval( R & r )
const
126 template<
class O,
class A,
class B>
141 inline operator E() { E tmp;
eval(tmp);
return tmp; };
157 inline void eval( E & e,
const L & l,
const R & r )
const { O()(e,l,r); };
159 template<
class X>
inline
160 void eval( E & r,
const X & a,
const R & b )
const
168 template<
class Y>
inline
169 void eval( E & r,
const L & a,
const Y & b )
const
177 template<
class X,
class Y>
inline
178 void eval( E & r,
const X & a,
const Y & b )
const
188 inline void _eval_( E& r,
const false_t&,
const false_t& )
const
205 inline void eval( E& r,
const false_t&,
const false_t& )
const
212 inline void _eval_( E & r,
const false_t&,
const true_t& )
const
219 { L _a; a._eval_(_a);
eval(r,_a,b.a); };
221 inline void eval ( E & r,
const false_t&,
const true_t& )
const
228 inline void _eval_( E & r,
const true_t&,
const false_t& )
const
243 inline void eval ( E & r,
const true_t&,
const false_t& )
const
244 { R _b; b._eval_(_b);
eval(r,a.a,_b); };
247 inline void eval ( E & r,
const true_t& ,
const true_t& )
const {
eval(r,a.a,b.a); };
248 inline void _eval_( E & r,
const true_t& ,
const true_t& )
const {
eval(r,a.a,b.a); };
252 template<
class T>
inline
257 _eval_(tmp,
typename A::terminal_t(),
typename B::terminal_t());
261 template<
class U>
inline
266 _eval_(tmp,
typename A::terminal_t(),
typename B::terminal_t());
270 inline void eval( E& r )
const {
eval( r,
typename A::terminal_t(),
typename B::terminal_t() ); };
271 inline void _eval_( E& r )
const {
_eval_( r,
typename A::terminal_t(),
typename B::terminal_t() ); };
282 template<
class A >
inline
283 std::ostream& operator<<( std::ostream& o, const template_expression<A>& e )
289 template<
class O,
class A >
inline
290 std::ostream& operator<<( std::ostream& o, const template_expression< unary_operator< O, A > > &
a )
292 return (o <<
O::name() <<
"(" <<
a.a <<
")");
295 template<
class O,
class A,
class B >
inline
296 std::ostream& operator<<( std::ostream& o, const template_expression< binary_operator< O, A, B > >&
a )
299 o <<
a.a <<
"," <<
a.b <<
")";
A a
Definition: texp_expression.hpp:85
Definition: texp_expression.hpp:62
const A & term() const
Definition: texp_expression.hpp:72
const A & T
Definition: texp_expression.hpp:62
template_expression()
Definition: texp_expression.hpp:143
proto::V V
Definition: texp_expression.hpp:56
X U
Definition: texp_expression.hpp:36
const C & b
Definition: Interval_glue.hpp:25
TMPL X
Definition: polynomial_operators.hpp:148
void eval(E &r, const true_t &) const
Definition: texp_expression.hpp:111
O Operator
Definition: texp_expression.hpp:135
Definition: texp_expression.hpp:28
void eval(E &r, const X &a, const R &b) const
Definition: texp_expression.hpp:160
Y V
Definition: texp_expression.hpp:45
proto::F F
Definition: texp_expression.hpp:54
void eval(E &e, const L &l, const R &r) const
Definition: texp_expression.hpp:157
Result eval(const Polynomial &polynomial, const Parameters ¶meters)
Multivariate Polynomial Evaluation.
Definition: polynomial_fcts.hpp:135
false_t terminal_t
Definition: texp_expression.hpp:81
texp::false_t T
Definition: texp_expression.hpp:29
Definition: texp_expression.hpp:60
void _eval_(E &r, const false_t &, const false_t &) const
Definition: texp_expression.hpp:188
Definition: texp_expression.hpp:15
Definition: texp_structureof.hpp:13
true_t terminal_t
Definition: texp_expression.hpp:69
unary_operator_prototype< O, typename A::E >::U L
Definition: texp_expression.hpp:83
A E
Definition: texp_expression.hpp:70
template_expression(const A &_a, const B &_b)
Definition: texp_expression.hpp:146
int T
Definition: texp_expression.hpp:64
void _eval_(E &r) const
Definition: texp_expression.hpp:271
Definition: texp_expression.hpp:26
S::U L
Definition: texp_expression.hpp:138
S::F E
Definition: texp_expression.hpp:137
void eval(E &r, const false_t &, const true_t &) const
Definition: texp_expression.hpp:221
void _eval_(E &r, const true_t &, const true_t &) const
Definition: texp_expression.hpp:248
structure defining a positive answer
Definition: texp_bool.hpp:7
texp::false_t T
Definition: texp_expression.hpp:16
void evaltree(E &r) const
Definition: texp_expression.hpp:103
Definition: texp_expression.hpp:49
unary_operator_prototype< O, typename A::E >::F E
Definition: texp_expression.hpp:82
Definition: texp_expression.hpp:67
void eval(E &r) const
Definition: texp_expression.hpp:112
template_expression(const A &_a)
Definition: texp_expression.hpp:96
template_expression(const E &e)
Definition: texp_expression.hpp:95
void eval(E &r, const false_t &) const
Definition: texp_expression.hpp:110
static void evalterm(E &r, L &l)
Definition: texp_expression.hpp:101
X F
Definition: texp_expression.hpp:35
Definition: texp_expression.hpp:59
void _eval_(E &r, const true_t &, const false_t &) const
Definition: texp_expression.hpp:228
bool operator!=(const S &s)
Definition: texp_expression.hpp:149
void eval(E &r, const L &a, const Y &b) const
Definition: texp_expression.hpp:169
sup< X, Y >::T F
Definition: texp_expression.hpp:43
void eval(R &r) const
Definition: texp_expression.hpp:114
void eval(E &r) const
Definition: texp_expression.hpp:270
texp::false_t false_t
Definition: texp_expression.hpp:129
template_expression(const E &e)
Definition: texp_expression.hpp:145
texp::false_t terminal_t
Definition: texp_expression.hpp:131
Definition: texp_expression.hpp:41
const char * name()
Definition: texp_demangle.hpp:9
proto::U U
Definition: texp_expression.hpp:55
Definition: texp_expression.hpp:13
binary_operator_prototype< O, typename A::E, typename B::E > S
Definition: texp_expression.hpp:136
sfirstnn< C, A, B >::T T
Definition: texp_sup.hpp:31
structure defining a negative answer
Definition: texp_bool.hpp:9
template_expression(const A &a)
Definition: texp_expression.hpp:74
S::V R
Definition: texp_expression.hpp:139
void eval(T &r) const
Definition: texp_expression.hpp:253
void assign(A &a, const B &b)
Generic definition of the assignement function.
Definition: assign.hpp:97
X U
Definition: texp_expression.hpp:44
B b
Definition: texp_expression.hpp:134
template_expression_operand< A >::T a
Definition: texp_expression.hpp:71
void _eval_(E &r, const false_t &, const true_t &) const
Definition: texp_expression.hpp:212
void eval(E &r, const true_t &, const false_t &) const
Definition: texp_expression.hpp:243
void eval(E &r, const false_t &, const false_t &) const
Definition: texp_expression.hpp:205
A a
Definition: texp_expression.hpp:133
texp::true_t true_t
Definition: texp_expression.hpp:130
Definition: texp_expression.hpp:33
binary_operator_structure_prototype< op, X, Y, typename structureof< X >::T, typename structureof< Y >::T > proto
Definition: texp_expression.hpp:53
void eval(E &r, const true_t &, const true_t &) const
Definition: texp_expression.hpp:247
void eval(E &r, const X &a, const Y &b) const
Definition: texp_expression.hpp:178
void _eval_(U &r) const
Definition: texp_expression.hpp:262
static void evalterm(E &r, R &l)
Definition: texp_expression.hpp:100