1 #ifndef realroot_MPOLDSE_MODULE_H
2 #define realroot_MPOLDSE_MODULE_H
14 template<
class MPLBASE,
class C >
20 template<
class MPLBASE,
class MPLBASE1,
class C >
21 void scadd ( MPLBASE& r,
const MPLBASE1 &a,
const C &
c)
29 template<
class MPLBASE0,
class MPLBASE1>
30 void conv( MPLBASE0 &r,
const MPLBASE1 &a );
32 template<
class MPLBASE0,
class MPLBASE1,
class MPLBASE2 >
33 void conv( MPLBASE0& r,
const MPLBASE1& a,
const MPLBASE2&
b )
35 if (&a == &r) {
conv (r, b);
return; };
36 if (&b == &r) {
conv (r, a);
return; };
39 unsigned *oa =
new unsigned[a.esz () + b.esz ()];
40 unsigned *ob = oa + a.esz ();
45 typedef typename MPLBASE0::value_type rreal;
46 typedef typename MPLBASE1::value_type areal;
47 typedef typename MPLBASE2::value_type breal;
51 rreal * pr = r.begin();
55 for (ea = oa, pa = a.begin (); ea != oa + a.esz (); ea++, pa++)
56 for (eb = ob, pb = b.begin (); eb != ob + b.esz ();
57 pr[*ea + *eb++] += (*pa) * (*pb++) ) ;
61 template<
class MPLBASE0,
class MPLBASE1>
void
62 conv( MPLBASE0 &r,
const MPLBASE1 &a ) {
72 template<
class UPOL,
class MPOL>
77 for(
unsigned i =0; i<
N;i++) {
slice(r[i].
rep(),p.rep(),v,i); }
static eenv mul(const eenv &a, const eenv &b)
Definition: tensor_eenv_fcts.hpp:246
static bool oaddress(const eenv &oenv, unsigned *osupp, const eenv &ienv, unsigned *isupp=0, unsigned nsp=0)
addresses translation from environment i to environment o
Definition: tensor_eenv_fcts.hpp:295
const C & b
Definition: Interval_glue.hpp:25
void clear(monomials< C > &monoms)
Definition: tensor_monomials_fcts.hpp:87
R & rep(R &r)
Definition: shared_object.hpp:180
TMPL int N(const MONOMIAL &v)
Definition: monomial_glue.hpp:60
void slice(C *dst, const eenv &a, const C *src, int v, int n)
Definition: tensor_eenv_loops.hpp:525
Definition: tensor_eenv.hpp:9
void scadd(MPLBASE &mpl, const C &c)
Definition: tensor_convert.hpp:15
int degree(const bernstein< C > &p)
Definition: tensor_bernstein.hpp:73
tensor::eenv eenv
Definition: tensor_convert.hpp:12
UPOL convert(const MPOL &p, unsigned v)
Definition: tensor_convert.hpp:73
Definition: shared_object.hpp:61
void scadd(A *a, const B &b, unsigned n, int s=1)
Definition: tensor_vctops.hpp:62
const C & c
Definition: Interval_glue.hpp:45
double C
Definition: solver_mv_fatarcs.cpp:16
void conv(MPLBASE0 &r, const MPLBASE1 &a)
Definition: tensor_convert.hpp:62