mmx Namespace Reference

Namespaces

Classes

Typedefs

Functions

Variables


Typedef Documentation

typedef extended<MPQ> EMPQ

Definition at line 18 of file scalar_extended_rational.hpp.

typedef extended<MPZ> EMPZ

Definition at line 17 of file scalar_extended_integer.hpp.

Definition at line 41 of file GMP.hpp.

Definition at line 42 of file GMP.hpp.

typedef __mpf_struct MPF

Definition at line 18 of file scalar_floating.hpp.

typedef MP_RAT MPQ

Definition at line 17 of file scalar_rational.hpp.

typedef MP_INT MPZ

Definition at line 18 of file scalar_integer.hpp.

typedef GMP::rational QQ

Definition at line 37 of file GMP.hpp.

typedef GMP::floating RR

Definition at line 39 of file GMP.hpp.

typedef GMP::integer ZZ

Definition at line 38 of file GMP.hpp.


Function Documentation

T mmx::abs ( const T &  x  )  [inline]

Definition at line 26 of file univariate_bounds.hpp.

00026 { return (x < 0 ? -x : x); }

scalar< T > abs ( const scalar< T > &  b  )  [inline]

Definition at line 459 of file scalar.hpp.

References NONRCODE, and NRCODE.

00460 {
00461   NRCODE(r.abs();)
00462   NONRCODE(scalar<T> r(b); r.abs(); return r;)
00463 }

void mmx::abs ( Interval< C, r > &  x,
const Interval< C, r > &  a 
) [inline]
void mmx::add ( bigunsigned< N > &  r,
const bigunsigned< N > &  a 
) [inline]

Definition at line 215 of file scalar_bigunsigned.hpp.

References add(), N(), and bigunsigned< N >::next().

00216 {
00217   add(r,a[0]);
00218   if ( ! bigunsigned<N>::s_overflow ) 
00219     {
00220       add(r.next(),a.next());
00221       if (  bigunsigned<N-1>::s_overflow ) 
00222         {
00223           bigunsigned<N>::s_overflow   = true;
00224           bigunsigned<N-1>::s_overflow = false;
00225         };
00226     };
00227 };

void mmx::add ( bigunsigned< 1 > &  r,
const bigunsigned< 1 > &  a 
) [inline]

Definition at line 212 of file scalar_bigunsigned.hpp.

References add().

00212 { add(r,a[0]); };

void mmx::add ( bigunsigned< N > &  r,
typename bigunsigned< N >::hdwi_t  n 
) [inline]

Definition at line 186 of file scalar_bigunsigned.hpp.

References N().

00187 {
00188   typedef typename bigunsigned<N>::hdwi_t hdwi_t;
00189   unsigned i = 0;
00190   while ( n )
00191     {
00192       hdwi_t delta = numerics::hdwi<hdwi_t>::nmax - r[i];
00193       if ( delta < n ) 
00194         { 
00195           r[i] += n; 
00196           n -= r[i]; 
00197         }
00198       else
00199         {
00200           r[i] += n;
00201           n     = 0;
00202           break;
00203         };
00204       i = i + 1;
00205       if ( i == N ) break;
00206     };
00207   
00208   bigunsigned<N>::s_overflow = (n != 0);
00209   
00210 };

void mmx::add ( polynomial< C, with< Rep, Ord > > &  r,
const C &  a,
const polynomial< C, with< Rep, Ord > > &  b 
) [inline]

Definition at line 29 of file polynomial_operators.hpp.

References add().

00029                                                       {
00030   add (r.rep(), b.rep(), a); 
00031 }

void mmx::add ( polynomial< C, with< Rep, Ord > > &  r,
const polynomial< C, with< Rep, Ord > > &  a,
const C &  b 
) [inline]

Definition at line 25 of file polynomial_operators.hpp.

References add().

00025                                                       {
00026   add (r.rep (), a.rep (), b); 
00027 }

void mmx::add ( polynomial< C, with< Rep, Ord > > &  r,
const polynomial< C, with< Rep, Ord > > &  a,
const polynomial< C, with< Rep, Ord > > &  b 
) [inline]

Definition at line 21 of file polynomial_operators.hpp.

References add().

00021                                                               {
00022   add (r.rep (), a.rep (), b.rep ()); 
00023 }

void mmx::add ( polynomial< C, with< Rep, Ord > > &  r,
const polynomial< C, with< Rep, Ord > > &  a 
) [inline]

Definition at line 17 of file polynomial_operators.hpp.

References add().

00017                                           { 
00018   add (r.rep (), a.rep () ); 
00019 }

void mmx::add ( Interval< C, r > &  a,
const Interval< C, r > &  b,
const Interval< C, r > &  x 
) [inline]

Definition at line 237 of file Interval_fcts.hpp.

References interval_base< T,((unsigned) r)%4 >::dwadd(), Interval< T, r >::M, Interval< T, r >::m, and interval_base< T,((unsigned) r)%4 >::upadd().

00237                                                                         {  
00238   a.m = a.dwadd(b.m,x.m); a.M = a.upadd(b.M,x.M); };

void mmx::add ( Interval< C, r > &  a,
const Interval< C, r > &  x 
) [inline]

Definition at line 233 of file Interval_fcts.hpp.

References interval_base< T,((unsigned) r)%4 >::dwadd(), Interval< T, r >::M, Interval< T, r >::m, and interval_base< T,((unsigned) r)%4 >::upadd().

00233                                                 { 
00234   a.m = a.dwadd(a.m,x.m); a.M = a.upadd(a.M,x.M); };

void mmx::add ( Interval< C, r > &  a,
const C &  x,
const Interval< C, r > &  b 
) [inline]

Definition at line 217 of file Interval_fcts.hpp.

References add().

00217                                                               { 
00218   add(a,b,x); };

void mmx::add ( Interval< C, r > &  a,
const Interval< C, r > &  b,
const C &  x 
) [inline]

Definition at line 213 of file Interval_fcts.hpp.

References interval_base< T,((unsigned) r)%4 >::dwadd(), Interval< T, r >::M, Interval< T, r >::m, and interval_base< T,((unsigned) r)%4 >::upadd().

00213                                                             { 
00214   a.m = a.dwadd(b.m,x); a.M = a.upadd(b.M,x); };

void mmx::add ( Interval< C, r > &  a,
const C &  x 
) [inline]

Definition at line 205 of file Interval_fcts.hpp.

References interval_base< T,((unsigned) r)%4 >::dwadd(), Interval< T, r >::M, Interval< T, r >::m, and interval_base< T,((unsigned) r)%4 >::upadd().

00206 {
00207   a.m = a.dwadd(a.m,x);
00208   a.M = a.upadd(a.M,x);
00209 };

void add ( dynamic_exp< E > &  r,
const dynamic_exp< E > &  A,
const dynamic_exp< E > &  B 
) [inline]
Seq<C,R> mmx::adds ( Seq< C, R >  a,
const Seq< C, R > &  b 
) [inline]

Definition at line 285 of file Seq.hpp.

References Seq< C, R >::begin(), and Seq< C, R >::end().

00286 {
00287   //assert( a.size()==b.size() );
00288   Seq<C,R> r=a;
00289 
00290   typename Seq<C,R>::const_iterator it2= b.begin();
00291 
00292   for(typename Seq<C,R>::iterator it=r.begin();it!= r.end();++it)
00293     {
00294       *it += *it2;
00295       ++it2;
00296     }
00297 
00298   return r;
00299 }

POL1 mmx::as ( const polynomial< C2, with< R2, V2 > > &  p  )  [inline]

Definition at line 173 of file polynomial_fcts.hpp.

References mmx::let::assign().

00173                                           {
00174     POL1 res; 
00175     let::assign(res,p); 
00176     return res;
00177 }

T mmx::as ( const F &  x,
const U &  u,
const V &  v 
) [inline]

Definition at line 34 of file assign.hpp.

References as_helper< T, F >::cv().

00034                                           { 
00035     return as_helper<T,F>::cv (x,u,v); 
00036   }

T mmx::as ( const F &  x,
const U &  u 
) [inline]

Definition at line 29 of file assign.hpp.

References as_helper< T, F >::cv().

00029                               { 
00030     return as_helper<T,F>::cv (x,u); 
00031   }

T as ( const F &  x  )  [inline]

Definition at line 32 of file solver_binary.hpp.

References cast_helper< T, F >::cv().

00032 {  return cast_helper<T,F>::cv (x); }

char* mmx::as_charp ( const scalar< MPQ > &  b  )  [inline]

Definition at line 479 of file scalar_rational.hpp.

References scalar< T >::rep().

00479                                              {
00480   return mpq_get_str(NULL,10,&b.rep());
00481 }

char* mmx::as_charp ( const scalar< MPZ > &  b  )  [inline]
double mmx::as_double ( const scalar< MPQ > &  a  )  [inline]

Definition at line 559 of file scalar_rational.hpp.

References scalar< T >::rep().

00559 { return mpq_get_d(&a.rep()); }

double mmx::as_double ( const scalar< MPZ > &  z  )  [inline]

Definition at line 743 of file scalar_integer.hpp.

References scalar< T >::rep().

00743 { return mpz_get_d(&z.rep()); }

double mmx::as_double ( const RR &  a  )  [inline]

Definition at line 67 of file GMP.hpp.

References scalar< T >::rep().

Referenced by print_as_double().

00067 { return mpf_get_d(&a.rep()); }

Interval< FT > mmx::as_interval ( const FT &  a,
const FT &  b 
) [inline]

Definition at line 35 of file contfrac_intervaldata.hpp.

00036     {
00037         if ( a <= b ) 
00038             return Interval<FT>( a, b);
00039         return Interval<FT>( b, a);
00040     }

IntervalData<RT,Poly> mmx::as_interval_data ( const RT &  a,
const RT &  b,
const RT &  c,
const RT &  d,
const Poly &  f 
) [inline]

Definition at line 43 of file contfrac_intervaldata.hpp.

References degree(), mmx::univariate::eval_homogeneous(), and F.

Referenced by solver< C, ContFrac< Approximate > >::solve().

00045     {
00046 
00047       Poly  X = Poly("x")*a+Poly(b), Y=Poly("x")*c+Poly(d);
00048 
00049       Poly  F = univariate::eval_homogeneous(f,X,Y);
00050       return IntervalData<RT,Poly> (a,b,c,d,F,degree(f));
00051     } 

std::string mmx::as_string ( const polynomial< C, with< Rep, Ord > > &  p,
const variables &  var 
) [inline]

Definition at line 80 of file polynomial_fcts.hpp.

References print().

00080                                                     {
00081   std::ostringstream s;
00082   print(s,p,var);
00083   return s.str();
00084 }

std::string mmx::as_string ( const polynomial< C, with< Rep, Ord > > &  p  )  [inline]

Definition at line 73 of file polynomial_fcts.hpp.

References print().

00073                                {
00074   std::ostringstream s;
00075   print(s,p);
00076   return s.str();
00077 }

void mmx::assign ( scalar< MPF > &  r,
double  d 
) [inline]

Definition at line 538 of file scalar_floating.hpp.

References scalar< T >::rep().

00538 { mpf_set_d(&r.rep(),d); }

void mmx::assign ( double &  r,
const scalar< MPF > &  z 
) [inline]
scalar< T > & BigIntFactorial ( unsigned long  n  )  [inline]

Definition at line 515 of file scalar.hpp.

References NONRCODE, and NRCODE.

00516 {
00517   NRCODE(r.factorial(n);)
00518   NONRCODE(scalar<T> r; r.factorial(n); return r;)    
00519 }

scalar<T>& mmx::BigIntPow ( unsigned long  base,
unsigned long  exp 
) [inline]

Definition at line 522 of file scalar.hpp.

References NONRCODE, and NRCODE.

00523 {
00524   NRCODE(r.pow(base, exp);)
00525   NONRCODE(scalar<T> r; r.pow(base, exp); return r;)
00526 }

signed long mmx::BigIntToSL ( const scalar< MPZ > &  b  )  [inline]

Definition at line 613 of file scalar_integer.hpp.

References scalar< T >::rep().

00614 {
00615   return mpz_get_si(&b.rep());
00616 }

unsigned long mmx::BigIntToUL ( const scalar< MPZ > &  b  )  [inline]

Definition at line 608 of file scalar_integer.hpp.

References scalar< T >::rep().

00609 {
00610   return mpz_get_ui(&b.rep());
00611 }

MP mmx::binomial ( typename MP::coeff_t  coeff,
int  i,
int  d,
typename MP::coeff_t  a 
) [inline]

Expansion of coeff*(x_i+a)^d, where i is the index of the variable x, a is the shift, d is the degree.

Definition at line 201 of file polynomial_fcts.hpp.

References pow().

00201                                                                         {
00202   MP polynomial;
00203   typename MP::coeff_t tmp;
00204   for ( int k = 0 ; k <= d ; k++ )
00205     {
00206       tmp =  coeff * binomials<typename MP::coeff_t>()(d, k) * pow(a,d-k);
00207       polynomial += MP( typename MP::monom_t( tmp , i, k ) );
00208     }
00209   return polynomial;
00210 }

T mmx::binomial ( int  n,
int  p 
) [inline]

Binomial coefficients

Definition at line 52 of file binomials.hpp.

Referenced by binary_convert< K, Approximate >::binomial().

00053 {
00054   T n1=1;
00055 
00056   if(p!=0)
00057     {
00058       if((n-p)<p) p=n-p;
00059       int n2=n;
00060       for(int i=1;i<=p;i++,n2--) n1=n1*n2/T(i);
00061     }
00062 
00063   return(n1);
00064 }

void mmx::bissect ( Interval< T, r > &  g,
Interval< T, r > &  d,
const Interval< T, r > &  x 
) [inline]

Definition at line 112 of file Interval_fcts.hpp.

References Interval< T, r >::define(), Interval< T, r >::lower(), median(), and Interval< T, r >::upper().

00113 {
00114   const T m(median(x));
00115   g.define( x.lower(), m );
00116   d.define( m, x.upper() );
00117 };

std::pair< Interval<T,r>, Interval<T,r> > mmx::bissect ( const Interval< T, r > &  x  )  [inline]

Definition at line 104 of file Interval_fcts.hpp.

References Interval< T, r >::lower(), median(), and Interval< T, r >::upper().

00105 {
00106   typedef Interval<T,r> I;
00107   const T m(median(x));
00108   return std::pair<I,I>(I(x.lower(), m), I(m, x.upper()));
00109 }

void mmx::bit_precision ( RR  b,
unsigned long  l 
) [inline]

Set the precision for RR. This precision is not the precision of the result of operations on this number.

Definition at line 86 of file GMP.hpp.

References scalar< T >::rep().

00086                                      {
00087   mpf_set_prec(&b.rep(),l);
00088 }

void mmx::bit_precision ( unsigned long  l  )  [inline]

Set the default precision for the MPZ numbers. This is not the precision of the results of operations on these numbers, because of error propagations.

Definition at line 77 of file GMP.hpp.

00077                                            {
00078   mpf_set_default_prec(l);
00079 }

long int bit_size ( const rational &  z  )  [inline]

Definition at line 32 of file glue_solver_univariate_rational.cpp.

References bit_size(), denominator(), max(), and numerator().

00032 {return std::max(bit_size(numerator(z)), bit_size(denominator(z))); }

long int mmx::bit_size ( const scalar< MPZ > &  z  )  [inline]

Definition at line 708 of file scalar_integer.hpp.

References scalar< T >::rep().

00708 {return mpz_sizeinbase(&z.rep(),2);}

long int mmx::bit_size ( const scalar< EMPZ > &  z  )  [inline]

Definition at line 364 of file scalar_extended_integer.hpp.

References extended< NT_ >::a, extended< NT_ >::b, bit_size(), max(), and scalar< T >::rep().

00364 { return std::max(bit_size(z.rep().a), bit_size(z.rep().b)); }

long int mmx::bit_size ( double  x  )  [inline]

Definition at line 537 of file scalar.hpp.

00537 { return sizeof(double) * 8; }

long int mmx::bit_size ( const ZZ &  z  )  [inline]
FT mmx::bound_root ( const POLY &  p,
const Cauchy< FT > &  m 
) [inline]
void mmx::CF_positive ( const typename K::Poly &  f,
Seq< typename K::FIT > &  RL,
bool  posneg,
 
) [inline]

Definition at line 180 of file contfrac.hpp.

References IntervalData< RT_, Poly_ >::a, IntervalData< RT_, Poly_ >::b, IntervalData< RT_, Poly_ >::c, IntervalData< RT_, Poly_ >::d, IntervalData< RT_, Poly_ >::p, Seq< C, R >::push_back(), reverse(), IntervalData< RT_, Poly_ >::s, shift_by_1(), sign_variation(), mmx::sparse::swap(), to_FIT(), to_rational(), and Kioustelidis_bound_1::upper().

Referenced by CF_solve().

00181     {
00182         //  std::cout << __FUNCTION__ << std::endl; 
00183         typedef typename K::RT    RT;
00184         typedef typename K::FT    FT;
00185         typedef typename K::FT    rational_t;
00186         typedef typename K::FIT   FIT;
00187         typedef typename K::Poly  Poly;
00188   
00189         typedef IntervalData< RT, Poly> IntervalData;
00190         
00191         meta ::Kioustelidis_bound_1 bound;
00192         
00193         
00194         int iters  = 0;
00195         const RT One( 1);
00196         FT Zero(0);
00197  
00198         // FT B = bound_root( f, Cauchy<RT>());
00199         
00200         FT B = meta::times_2_to_k( RT( 1), bound.upper( f));
00201         
00202         
00203         unsigned long s = sign_variation(f);
00204 
00205         if ( s == 0 ) { return; }
00206         if ( s == 1 ) {
00207             //      std::cout << "A) Sign variation: 1"<<std::endl;;
00208             if ( posneg )
00209             {
00210                 //        std::cout<<to_FIT( FT(0), B)<<std::endl;;
00211                 RL.push_back( to_FIT( FT(0), B));
00212             }
00213             else RL.push_back( to_FIT( FT(0), FT(-B)));
00214             return;
00215         }
00216         Poly X(2, AsSize()); X[1] = RT(1); X[0]=RT(0);
00217 
00218         std::stack< IntervalData > S;
00219         if ( posneg) S.push( IntervalData( 1, 0, 0, 1, f, s));
00220         else S.push( IntervalData( -1, 0, 0, 1, f, s));
00221 
00222         while ( !S.empty() ) {
00223             ++iters;
00224             IntervalData ID = S.top();
00225             S.pop();
00226 
00227             //std::cout << "Polynomial is " << ID.p << std::endl;
00228             // Steps 3 - 4: Choose the method for computing the lower bound 
00229 
00230 
00231             //typename K::bound Bd;
00232             // Cauchy<RT> Bd;
00233             //HongBound<RT> Bd;
00234       
00235 
00236             //    RT M = Bd.upper(ID.p);
00237             //    scale(ID,M);
00238             //    reverse(ID);
00239             //    translate_by_1(ID);
00240             //    reverse(ID);
00241 
00242             //     Interval<rational_t> q=Bd.range(ID.p);
00243             //     std::cout<<"Sign var: "<< sign_variation(ID.p)<<" ";
00244             //     RT a, b;
00245             //     if(q<0)
00246             //       {
00247             //          continue;
00248             //       }
00249             //     else if(q!=0)
00250             //       {
00251             //          a=numerator(q.lower());
00252             //          b=denominator(q.lower());
00253             //          inv_scale(ID,b);
00254             //          shift(ID, a);
00255             //          scale(ID,b);
00256             //  let::assign(a,rational_t(q.upper()-q.lower()));
00257             //  shift(ID,a);
00258             //          a=One;
00259             //       }
00260 
00261             //    std::cout<<"("<< sign_variation(ID.p)<<")"<<std::endl;;
00262 
00263 
00264             // RT a = Bd.lower(ID.p);
00265             //long k = bound.lower( ID.p);
00266             long k = AkritasBound<RT>().lower_power_2( ID.p);
00267             // std::cout << "k: " << k << std::endl; 
00268             //    std::cout<< "\t Lower bound is "<< a<< std::endl;
00269             
00270             if (k > 0) {
00271                 meta::do_scale( ID, k);
00272             }
00273             
00274             // if ( a > One ) { scale(ID,a); a = One; }
00275     
00276             // Step 5 //
00277             // if ( a >= One ) 
00278             if ( k >= 0 ) {
00279                 shift_by_1(ID);
00280                 //shift(ID, a);
00281       
00282                 if ( ID.p[0] == RT(0)) {
00283                     RL.push_back( to_FIT( to_rational( ID.b, ID.d), to_rational( ID.b, ID.d )));
00284                     ID.p /= X;
00285                 }
00286                 ID.s = sign_variation( ID.p);
00287                 if ( ID.s == 0 ) { continue; }
00288                 if ( ID.s == 1 ) {
00289                     //    std::cout << "B) Sign variation: 1"<<std::endl;
00290                     RL.push_back( to_FIT<K>( ID.a, ID.b, ID.c, ID.d, B));
00291                     continue;
00292                 }
00293             }
00294     
00295             // Step 6
00296             IntervalData I1;
00297             shift_by_1( I1, ID);
00298 
00299             unsigned long r  = 0;
00300     
00301             if (I1.p[0] == RT(0)) {
00302                 //      std::cout << "Zero at end point"<<std::endl;;
00303                 RL.push_back( to_FIT( to_rational( I1.b, I1.d), to_rational(I1.b, I1.d) ));
00304                 I1.p /= X;
00305                 r = 1;
00306             }
00307             I1.s = sign_variation( I1.p);
00308 
00309             IntervalData I2;
00310         
00311             I2.s = ID.s - I1.s - r;
00312 
00313             I2.a = ID.b;
00314             I2.b = ID.a + ID.b;
00315             I2.c = ID.d;
00316             I2.d = ID.c + ID.d;
00317     
00318             // Step 7;
00319             if ( I2.s > 1 ) {
00320                 //p2 = p2( 1 / (x+1));
00321                 reverse( I2.p, ID.p);
00322                 shift_by_1( I2.p);
00323 
00324                 if ( I2.p[0] == 0) {
00325                     I2.p /= X;
00326                 }
00327                 I2.s = sign_variation( I2.p);
00328             }
00329 
00330             // Step 8
00331             if ( I1.s < I2.s ) {
00332                 std::swap( I1, I2);
00333             }
00334     
00335             // Step 9
00336             if ( I1.s == 1 ) {
00337                 //      std::cout << "C) Sign variation: 1"<<std::endl;;
00338                 RL.push_back( to_FIT<K>( I1.a, I1.b, I1.c, I1.d, B));
00339             } else if ( I1.s > 1) {
00340                 S.push( IntervalData( I1.a, I1.b, I1.c, I1.d, I1.p, I1.s));
00341             }
00342 
00343             // Step 10
00344             if ( I2.s == 1 ) {
00345                 //      std::cout << "D) Sign variation: 1"<<std::endl;;
00346                 RL.push_back( to_FIT<K>( I2.a, I2.b, I2.c, I2.d, B));
00347             } else if ( I2.s > 1) {
00348                 S.push( IntervalData( I2.a, I2.b, I2.c, I2.d, I2.p, I2.s));
00349             }
00350         } // while
00351         //    std::cout << "-------------------- iters: " << iters << std::endl; 
00352         return;  
00353     }

OutputIterator mmx::CF_solve ( const typename K::Poly &  f,
OutputIterator  sol,
int  mult,
 
) [inline]

Definition at line 538 of file contfrac.hpp.

References CF_positive(), degree(), Seq< C, R >::push_back(), and Seq< C, R >::size().

Referenced by solve_contfrac().

00539     {
00540         typedef typename K::Poly  Poly;
00541         typedef typename K::FIT FIT;
00542 
00543         Seq < FIT > isolating_intervals;
00544   
00545         // Check if 0 is a root
00546         int idx;
00547         for (idx = 0; idx <= degree( f); ++idx) {
00548             if ( f[idx] != 0 ) break;
00549         }
00550   
00551         Poly p;
00552         if ( idx == 0 ) { p = f; } 
00553         else {
00554             p.resize( degree(f) + 1 - idx);
00555             for (int j = idx; j <= degree( f); ++j) 
00556                 p[j-idx] = f[j];
00557         }
00558   
00559         //std::cout << "Solving: " << p << std::endl; 
00560         // Isolate the negative roots
00561         for (int i = 1; i <= degree(p); i+=2) p[i] *= -1;
00562 
00563         CF_positive( p, isolating_intervals, false, K());
00564 
00565         //  std::cout << "Ok negative" << std::endl; 
00566 
00567         // Is 0 a root?
00568         if (idx != 0) isolating_intervals.push_back( FIT( 0, 0));
00569   
00570         // Isolate the positive roots
00571         for (int i = 1; i <= degree(p); i+=2) p[i] *= -1;
00572 
00573         CF_positive( p, isolating_intervals, true, K());
00574 
00575         //  std::cout << "Ok, positive" << std::endl; 
00576 
00577         //  sort( isolating_intervals.begin(), isolating_intervals.end(), CompareFIT());
00578 
00579         //  std::cout << "ok sorting" << std::endl; 
00580 
00581   //       for (unsigned i = 0 ; i < isolating_intervals.size(); ++i) {
00582 //             if ( singleton( isolating_intervals[i]) ) {
00583 //                 if ( lower( isolating_intervals[i]) == 0 ) continue;
00584       
00585 //                 Poly t( 2, AsSize());
00586 //                 t[1] = denominator( isolating_intervals[i].lower());
00587 //                 t[0] = - numerator( isolating_intervals[i].lower());
00588       
00589 //                 Poly dummy;
00590 //                 UPOLDSE::div_rem( dummy, p, t);
00591 //                 p = dummy;
00592 //             }
00593 //         }
00594   
00595         //  std::cout << "now p: " << p << ",  #nr: " << isolating_intervals.size() << std::endl; 
00596 
00597         //  std::cout << "Done...." << std::endl; 
00598         for (unsigned i = 0 ; i < isolating_intervals.size(); ++i) {*sol++ = isolating_intervals[i];}
00599         return sol;
00600     }

Seq<C> mmx::coefficients ( const polynomial< C, with< Univariate > > &  f  )  [inline]

Definition at line 77 of file ring_univariate.hpp.

00077                                      {
00078     Seq<C> r;
00079     for(int i=0;i<f.size(); i++) {
00080       r<<f[i];
00081     }
00082     return r;
00083   }

Seq< polynomial< C, with<Univariate> > > mmx::coefficients ( const polynomial< C, with< Univariate > > &  f,
const int &  v 
) [inline]

Definition at line 66 of file ring_univariate.hpp.

References degree(), Monomial, and N().

00066                                                      {
00067     int N = degree(f,v)+1;
00068     Seq<POLYNOMIAL> r(N);
00069     typename POLYNOMIAL::Monomial m;
00070     for(int i=0;i<N; i++) {
00071       r[i]=0;
00072     }
00073     return r;
00074   }

Seq<C> mmx::coefficients ( const polynomial< C, with< MonomialTensor > > &  f  )  [inline]

Definition at line 89 of file ring_monomial_tensor.hpp.

00089                                      {
00090     Seq<C> r;
00091     for(int i=0;i<f.size(); i++) {
00092       r<<f[i];
00093     }
00094     return r;
00095   }

Seq< polynomial<C, with<MonomialTensor> > > mmx::coefficients ( const polynomial< C, with< MonomialTensor > > &  f,
const int &  v 
) [inline]

Definition at line 78 of file ring_monomial_tensor.hpp.

References degree(), Monomial, N(), and POLYNOMIAL.

00078                                                      {
00079     int N = degree(f,v)+1;
00080     Seq<POLYNOMIAL> r(N);
00081     typename POLYNOMIAL::Monomial m;
00082     for(int i=0;i<N; i++) {
00083       r[i]=POLYNOMIAL(0);
00084     }
00085     return r;
00086   }

Seq<typename ring<C,Bernstein>::Polynomial> mmx::coefficients ( const typename ring< C, Bernstein >::Polynomial &  pol,
int  v 
) [inline]

Definition at line 74 of file ring_bernstein_tensor.hpp.

00074                                                                         {
00075       Seq<typename ring<C,Bernstein>::Polynomial> res;
00076       
00077       return res;
00078     }

Seq< polynomial<C, with<Rep,Ord> > > mmx::coefficients ( const polynomial< C, with< Rep, Ord > > &  pol,
int  v 
) [inline]

Definition at line 113 of file polynomial_fcts.hpp.

References coefficients(), and Seq< C, R >::rep().

00113                                            {
00114   typedef typename Polynomial::Ring Ring;
00115   Seq<Polynomial> res;
00116   coefficients(res,pol.rep(),v); 
00117   return res;
00118 }

Seq<C> mmx::coefficients ( const polynomial< C, with< Rep, Ord > > &  pol  )  [inline]
int mmx::compare ( const scalar< MPQ > &  b,
long  sl 
) [inline]

Definition at line 528 of file scalar_rational.hpp.

References assert, and scalar< T >::rep().

00529 {
00530   assert(sl>=0);
00531   return mpq_cmp_ui(&b.rep(), sl, 1);
00532 }

int mmx::compare ( const scalar< MPQ > &  b,
unsigned long  ul 
) [inline]

Definition at line 523 of file scalar_rational.hpp.

References scalar< T >::rep().

00524 {
00525   return mpq_cmp_ui(&b.rep(), ul, 1);
00526 }

int mmx::compare ( const scalar< MPQ > &  b1,
const scalar< MPQ > &  b2 
) [inline]

Definition at line 518 of file scalar_rational.hpp.

References scalar< T >::rep().

00519 {
00520   return mpq_cmp(&b1.rep(), &b2.rep());
00521 }

int mmx::compare ( const scalar< MPZ > &  b,
long  sl 
) [inline]

Definition at line 647 of file scalar_integer.hpp.

References scalar< T >::rep().

00648 {
00649   return mpz_cmp_si(&b.rep(), sl);
00650 }

int mmx::compare ( const scalar< MPZ > &  b,
unsigned long  ul 
) [inline]

Definition at line 642 of file scalar_integer.hpp.

References scalar< T >::rep().

00643 {
00644   return mpz_cmp_ui(&b.rep(), ul);
00645 }

int mmx::compare ( const scalar< MPZ > &  b1,
const scalar< MPZ > &  b2 
) [inline]

Definition at line 637 of file scalar_integer.hpp.

References scalar< T >::rep().

00638 {
00639   return mpz_cmp(&b1.rep(), &b2.rep());
00640 }

int mmx::compare ( const scalar< MPF > &  b,
long  sl 
) [inline]

Definition at line 526 of file scalar_floating.hpp.

References scalar< T >::rep().

00527 {
00528   return mpf_cmp_si(&b.rep(), sl);
00529 }

int mmx::compare ( const scalar< MPF > &  b,
unsigned long  ul 
) [inline]

Definition at line 521 of file scalar_floating.hpp.

References scalar< T >::rep().

00522 {
00523   return mpf_cmp_ui(&b.rep(), ul);
00524 }

int mmx::compare ( const scalar< MPF > &  b1,
const scalar< MPF > &  b2 
) [inline]

Definition at line 516 of file scalar_floating.hpp.

References scalar< T >::rep().

00517 {
00518   return mpf_cmp(&b1.rep(), &b2.rep());
00519 }

int compare ( const scalar< EMPZ > &  b,
int  si 
) [inline]

Definition at line 362 of file scalar_extended_rational.hpp.

References extended< NT_ >::compare(), and scalar< T >::rep().

00362 { return EMPQ::compare(b.rep(), EMPQ(scalar<MPQ>(si))); }

int compare ( const scalar< EMPZ > &  b,
long  sl 
) [inline]

Definition at line 359 of file scalar_extended_rational.hpp.

References extended< NT_ >::compare(), and scalar< T >::rep().

00359 { return EMPQ::compare(b.rep(), EMPQ(scalar<MPQ>(sl))); }

int compare ( const scalar< EMPZ > &  b,
unsigned long  ul 
) [inline]

Definition at line 356 of file scalar_extended_rational.hpp.

References extended< NT_ >::compare(), and scalar< T >::rep().

00356 { return EMPQ::compare(b.rep(), EMPQ(scalar<MPQ>(ul))); }

int compare ( const scalar< EMPZ > &  b1,
const scalar< EMPZ > &  b2 
) [inline]

Definition at line 353 of file scalar_extended_rational.hpp.

References extended< NT_ >::compare(), and scalar< T >::rep().

00353 { return EMPQ::compare(b1.rep(), b2.rep()); }

int compare ( const QQ &  a,
const QQ &  b 
) [inline]

Definition at line 72 of file GMPXX.hpp.

00072 { return cmp(a, b); }

bool mmx::contain_zero ( const Interval< T, r > &  x  )  [inline]

Definition at line 97 of file Interval_fcts.hpp.

References Interval< T, r >::lower(), and Interval< T, r >::upper().

00098 { return x.lower() <= static_cast<T>(0) && x.upper() >= static_cast<T>(0); };

polynomial<C, with<Rep,Ord> >::Scalar mmx::content ( const polynomial< C, with< Rep, Ord > > &  p  )  [inline]

Definition at line 234 of file polynomial_fcts.hpp.

Referenced by sub_resultant< PREM >::subres_gcd().

00234                               {
00235   return content(p.rep());
00236 }

void mmx::convert ( scalar< MPQ > &  dd,
char *  s 
) [inline]

Definition at line 538 of file scalar_rational.hpp.

References scalar< T >::rep().

00539 {
00540   mpq_clear(&dd.rep());
00541   mpq_init(&dd.rep());
00542   mpz_set_str(mpq_numref(&dd.rep()),s,10);
00543 }

void mmx::convert ( scalar< MPZ > &  n,
char *  s 
) [inline]

Definition at line 430 of file scalar_integer.hpp.

References scalar< T >::rep().

00431 {
00432   mpz_init_set_str(&n.rep(), s, 10);
00433 }

void mmx::convert ( scalar< MPF > &  n,
char *  s 
) [inline]

Definition at line 433 of file scalar_floating.hpp.

References scalar< T >::rep().

Referenced by binary_convert< K, Approximate >::get(), binary_convert< K, Isolate >::get(), polynomial_bernstein_tensor_of(), polynomial_sparse_of(), polynomial_tensor_of(), and ring_sparse_of().

00434 {
00435   // printf("%s\n",s);
00436   mpf_init_set_str(&n.rep(), s, 10);
00437   //cout<<"apres convert "<<mpf_get_d(n.rep())<<endl;;
00438 }

int mmx::Count ( const T &  v  )  [inline]

Definition at line 196 of file sign_variation.hpp.

References Eps(), Per(), and Var().

00197 {
00198   return (Per(v)-Var(v)+Eps(v));
00199 }

mmx::declare_binary_operator ( template< class Ca, int Na, class K >  ,
typename K::rational  ,
Interval< Ca, Na >  ,
_div_  ,
operator/   
)
mmx::declare_binary_operator ( template< class Ca, int Na, class K >  ,
typename K::rational  ,
Interval< Ca, Na >  ,
_mul_  ,
operator*   
)
mmx::declare_binary_operator ( template< class Ca, int Na, class K >  ,
typename K::rational  ,
Interval< Ca, Na >  ,
_sub_  ,
operator-   
)
mmx::declare_binary_operator ( template< class Ca, int Na, class K >  ,
typename K::rational  ,
Interval< Ca, Na >  ,
_add_  ,
operator+   
)
mmx::declare_binary_operator ( template< class Ca, int Na, class K >  ,
Interval< Ca, Na >  ,
typename K::rational  ,
_div_  ,
operator/   
)
mmx::declare_binary_operator ( template< class Ca, int Na, class K >  ,
Interval< Ca, Na >  ,
typename K::rational  ,
_mul_  ,
operator*   
)
mmx::declare_binary_operator ( template< class Ca, int Na, class K >  ,
Interval< Ca, Na >  ,
typename K::rational  ,
_sub_  ,
operator-   
)
mmx::declare_binary_operator ( template< class Ca, int Na, class K >  ,
Interval< Ca, Na >  ,
typename K::rational  ,
_add_  ,
operator+   
)
mmx::declare_binary_operator ( template< class Ca, int Na, class K >  ,
typename K::floating  ,
Interval< Ca, Na >  ,
_div_  ,
operator/   
)
mmx::declare_binary_operator ( template< class Ca, int Na, class K >  ,
typename K::floating  ,
Interval< Ca, Na >  ,
_mul_  ,
operator*   
)
mmx::declare_binary_operator ( template< class Ca, int Na, class K >  ,
typename K::floating  ,
Interval< Ca, Na >  ,
_sub_  ,
operator-   
)
mmx::declare_binary_operator ( template< class Ca, int Na, class K >  ,
typename K::floating  ,
Interval< Ca, Na >  ,
_add_  ,
operator+   
)
mmx::declare_binary_operator ( template< class Ca, int Na, class K >  ,
Interval< Ca, Na >  ,
typename K::floating  ,
_div_  ,
operator/   
)
mmx::declare_binary_operator ( template< class Ca, int Na, class K >  ,
Interval< Ca, Na >  ,
typename K::floating  ,
_mul_  ,
operator*   
)
mmx::declare_binary_operator ( template< class Ca, int Na, class K >  ,
Interval< Ca, Na >  ,
typename K::floating  ,
_sub_  ,
operator-   
)
mmx::declare_binary_operator ( template< class Ca, int Na, class K >  ,
Interval< Ca, Na >  ,
typename K::floating  ,
_add_  ,
operator+   
)
mmx::declare_binary_operator ( template< class Ca, int Na, class K >  ,
typename K::integer  ,
Interval< Ca, Na >  ,
_div_  ,
operator/   
)
mmx::declare_binary_operator ( template< class Ca, int Na, class K >  ,
typename K::integer  ,
Interval< Ca, Na >  ,
_mul_  ,
operator*   
)
mmx::declare_binary_operator ( template< class Ca, int Na, class K >  ,
typename K::integer  ,
Interval< Ca, Na >  ,
_sub_  ,
operator-   
)
mmx::declare_binary_operator ( template< class Ca, int Na, class K >  ,
typename K::integer  ,
Interval< Ca, Na >  ,
_add_  ,
operator+   
)
class Ord class X mmx::define_operator_r_r ( polynomial< C, with< Rep, Ord > >  ,
,
polynomial< C, with< Rep, Ord > >  ,
operator*  ,
use< operators_of, typename polynomial< C, with< Rep, Ord > >::rep_t >::mul   
)
class Ord class X mmx::define_operator_r_r ( polynomial< C, with< Rep, Ord > >  ,
,
polynomial< C, with< Rep, Ord > >  ,
operator-  ,
use< operators_of, typename polynomial< C, with< Rep, Ord > >::rep_t >::sub   
)
class Ord class X mmx::define_operator_r_r ( polynomial< C, with< Rep, Ord > >  ,
,
polynomial< C, with< Rep, Ord > >  ,
operator+  ,
use< operators_of, typename polynomial< C, with< Rep, Ord > >::rep_t >::add   
)
class Ord class X mmx::define_operator_rr_ ( polynomial< C, with< Rep, Ord > >  ,
polynomial< C, with< Rep, Ord > >  ,
,
operator/  ,
use< operators_of, typename polynomial< C, with< Rep, Ord > >::rep_t >::div   
)
class Ord class X mmx::define_operator_rr_ ( polynomial< C, with< Rep, Ord > >  ,
polynomial< C, with< Rep, Ord > >  ,
,
operator*  ,
use< operators_of, typename polynomial< C, with< Rep, Ord > >::rep_t >::mul   
)
class Ord class X mmx::define_operator_rr_ ( polynomial< C, with< Rep, Ord > >  ,
polynomial< C, with< Rep, Ord > >  ,
,
operator-  ,
use< operators_of, typename polynomial< C, with< Rep, Ord > >::rep_t >::sub   
)
class Ord class X mmx::define_operator_rr_ ( polynomial< C, with< Rep, Ord > >  ,
polynomial< C, with< Rep, Ord > >  ,
,
operator+  ,
use< operators_of, typename polynomial< C, with< Rep, Ord > >::rep_t >::add   
)
class O mmx::define_operator_rrr ( polynomial< C, with< Sparse, O > >  ,
polynomial< C, with< Dual, O > >  ,
polynomial< C, with< Sparse, O > >  ,
operator*  ,
sparse::mul   
)
mmx::define_operator_rrr ( polynomial< C, with< Dual, O > >  ,
polynomial< C, with< Sparse, O > >  ,
polynomial< C, with< Dual, O > >  ,
operator*  ,
sparse::mul   
) [inline]
class Ord mmx::define_operator_rrr ( polynomial< C, with< Rep, Ord > >  ,
polynomial< C, with< Rep, Ord > >  ,
polynomial< C, with< Rep, Ord > >  ,
operator%  ,
use< operators_of, typename polynomial< C, with< Rep, Ord > >::rep_t >::rem   
)
class Ord mmx::define_operator_rrr ( polynomial< C, with< Rep, Ord > >  ,
polynomial< C, with< Rep, Ord > >  ,
polynomial< C, with< Rep, Ord > >  ,
operator/  ,
use< operators_of, typename polynomial< C, with< Rep, Ord > >::rep_t >::div   
)
class Ord mmx::define_operator_rrr ( polynomial< C, with< Rep, Ord > >  ,
polynomial< C, with< Rep, Ord > >  ,
polynomial< C, with< Rep, Ord > >  ,
operator*  ,
use< operators_of, typename polynomial< C, with< Rep, Ord > >::rep_t >::mul   
)
class Ord mmx::define_operator_rrr ( polynomial< C, with< Rep, Ord > >  ,
polynomial< C, with< Rep, Ord > >  ,
polynomial< C, with< Rep, Ord > >  ,
operator-  ,
use< operators_of, typename polynomial< C, with< Rep, Ord > >::rep_t >::sub   
)
mmx::define_operator_rrr ( polynomial< C, with< Rep, Ord > >  ,
polynomial< C, with< Rep, Ord > >  ,
polynomial< C, with< Rep, Ord > >  ,
operator+  ,
use< operators_of, typename polynomial< C, with< Rep, Ord > >::rep_t >::add   
) [inline]
int mmx::degree ( const polynomial< C, with< Rep, Ord > > &  mp,
int  v 
) [inline]

Definition at line 48 of file polynomial_fcts.hpp.

References degree().

00048                                      { 
00049   return degree(mp.rep(),v); 
00050 }

int mmx::degree ( const polynomial< C, with< Rep, Ord > > &  mp  )  [inline]

Definition at line 45 of file polynomial_fcts.hpp.

References degree().

00045 { return degree(mp.rep()); }

E::degree_t mmx::degree ( const monom< C, E > &  m  )  [inline]

Definition at line 259 of file monomial.hpp.

References degree().

00259                                               {
00260   return degree(m.rep());
00261 }

dynamic_exp<E>::degree_t mmx::degree ( const dynamic_exp< E > &  t  )  [inline]
scalar<MPZ> mmx::denominator ( const scalar< MPQ > &  q  )  [inline]

Definition at line 514 of file scalar_rational.hpp.

References scalar< T >::rep().

00514 { scalar<MPZ> r; mpq_get_den(&r.rep(),&q.rep()); return r;}

ZZ mmx::denominator ( const QQ &  a  )  [inline]
polynomial<C, with<V,W> > mmx::diff ( const polynomial< C, with< V, W > > &  p,
const generic &  v 
) [inline]

Definition at line 22 of file polynomial_glue.hpp.

References as_charp(), and diff().

00022                                                               {
00023     char *x= as_charp(as_mmx(v));
00024     int i= Polynomial::Ring::vars()[x];
00025     free_charp (x);
00026     return diff(p, i);
00027   }

polynomial<C, with<Rep,Ord> > mmx::diff ( const polynomial< C, with< Rep, Ord > > &  pol  )  [inline]

Multivariate Polynomial Differentiation.

Compute the partial derivative of polynomial w.r.t v the vth variable of polynomial.

Definition at line 103 of file polynomial_fcts.hpp.

References diff().

00103                             {
00104   return diff(pol,0);//leading_variable(p.rep()));
00105 }

polynomial<C, with<Rep,Ord> > mmx::diff ( const polynomial< C, with< Rep, Ord > > &  pol,
int  v 
) [inline]

Multivariate Polynomial Differentiation.

Compute the partial derivative of polynomial w.r.t v the vth variable of polynomial.

Definition at line 93 of file polynomial_fcts.hpp.

References Polynomial.

Referenced by diff(), solver_bspline< Real >::first_root(), GLUE_14(), GLUE_15(), mmx::realroot::jacobian(), and solve().

00093                                     {
00094   Polynomial der;  diff(der.rep(),pol.rep(),v); return der;
00095 }

void mmx::div ( polynomial< C, with< Rep, Ord > > &  r,
const polynomial< C, with< Rep, Ord > > &  a,
const C &  b 
) [inline]

Definition at line 68 of file polynomial_operators.hpp.

References div().

00068                                                       {
00069   div (r.rep (), a.rep (), b); 
00070 }

void mmx::div ( polynomial< C, with< Rep, Ord > > &  r,
const polynomial< C, with< Rep, Ord > > &  a,
const polynomial< C, with< Rep, Ord > > &  b 
) [inline]

Definition at line 64 of file polynomial_operators.hpp.

References div().

00064                                                               {
00065   div (r.rep (), a.rep (), b.rep ()); 
00066 }

monom<C,E> mmx::div ( const monom< C, E > &  m1,
const monom< C, E > &  m2 
) [inline]

Definition at line 243 of file monomial.hpp.

References Monomial.

00243                                               {
00244   Monomial res(1); res*=(m1.coeff()/m2.coeff());
00245   for (int i = 0; i <= m1.nvars(); ++i)
00246     res.set_expt(i,m1[i] - m2[i]);
00247   return res;
00248 }

void mmx::div ( monom< C, E > &  a,
const monom< C, E > &  m1,
const monom< C, E > &  m2 
) [inline]

Definition at line 229 of file monomial.hpp.

References erase(), mmx::vctops::max(), and mmx::array::sub().

00229                                                           {
00230   a.coeff() = (m1.coeff()/m2.coeff());
00231   if (a.coeff() !=0)
00232     {
00233       a.rep().reserve(std::max(m1.rep().size(),m2.rep().size()));
00234       array::sub(a.rep(),m1.rep(),m2.rep());
00235     }
00236   else
00237     {
00238       erase(a.rep());
00239     }
00240 }

void mmx::div ( Interval< C, r > &  x,
const Interval< C, r > &  a,
const Interval< C, r > &  b 
) [inline]

Definition at line 527 of file Interval_fcts.hpp.

References interval_base< T,((unsigned) r)%4 >::dwdiv(), Interval< T, r >::M, Interval< T, r >::m, sign(), and interval_base< T,((unsigned) r)%4 >::updiv().

00527                                                                         {
00528   /*
00529   if ( b.m > 0 )
00530     {
00531       if ( a.m > 0 ) { 
00532         x.m = a.dwdiv(a.m,b.M);
00533         x.M = a.updiv(a.M,b.m);
00534       }
00535       else           x.m = a.dwdiv(a.m,b.m);
00536       return;
00537     }
00538   if ( b.M < 0 )
00539     {
00540       
00541     };
00542 
00543   */
00544   switch( sign(a.m) )
00545     {
00546     case 1:
00547       if ( b.m > 0 )
00548         {
00549           x.m = a.dwdiv(a.m,b.M);
00550           x.M = a.updiv(a.M,b.m);
00551         } else 
00552       if ( b.M < 0 )
00553         {
00554           x.m = a.dwdiv(a.M,b.M);
00555           x.M = a.updiv(a.m,b.m);
00556         }
00557       else throw typename Interval<C,r>::extended(a.updiv(a.m,b.m),a.dwdiv(a.M,b.M));
00558       break;
00559     case -1:
00560       if ( b.m > 0 )
00561         {
00562           x.m = a.dwdiv(a.m,b.m);
00563           x.M = a.updiv(a.M,b.M);
00564         }else 
00565       if ( b.M < 0 ) 
00566         {
00567           //      C sv(a.M);
00568           x.m = a.dwdiv(a.M,b.m);
00569           x.M = a.updiv(a.m,b.M);
00570         } 
00571       else throw typename Interval<C,r>::extended(a.updiv(a.m,b.M),a.dwdiv(a.M,b.m));
00572       break;
00573     case 0:
00574       if ( b.m > 0 )
00575         {
00576           x.m = 0;
00577           x.M = a.updiv(a.M,b.m);
00578         }
00579       else 
00580         if ( b.M < 0 )
00581           {
00582             x.m = a.dwdiv(a.M,b.m);
00583             x.M = a.updiv(a.m,b.m);
00584           }
00585         else throw typename Interval<C,r>::extended(0,0);
00586       break;
00587     };
00588 };

void mmx::div ( Interval< C, r > &  a,
const Interval< C, r > &  b 
) [inline]

Definition at line 464 of file Interval_fcts.hpp.

References C, interval_base< T,((unsigned) r)%4 >::dwdiv(), Interval< T, r >::M, Interval< T, r >::m, and interval_base< T,((unsigned) r)%4 >::updiv().

00464                                                 {
00465   if ( a.m > 0 )
00466     {
00467       if ( b.m > 0 )
00468         {
00469           a.m = a.dwdiv(a.m,b.M);
00470           a.M = a.updiv(a.M,b.m);
00471           return;
00472         };
00473       if ( b.M < 0 )
00474         {
00475           C sv(a.m);
00476           a.m = a.dwdiv(a.M,b.M);
00477           a.M = a.updiv(sv,b.m);
00478           return;
00479         };
00480       if ( r == 3 )
00481         {
00482           throw typename Interval<C,r>::extended(a.updiv(a.m,b.m),a.dwdiv(a.M,b.M));
00483         };
00484     };
00485   
00486   if ( a.M < 0 )
00487     {
00488       if ( b.m > 0 )
00489         {
00490           a.m = a.dwdiv(a.m,b.m);
00491           a.M = a.updiv(a.M,b.M);
00492           return;
00493         };
00494       
00495       if ( b.M < 0 ) 
00496         {
00497           C sv(a.m);
00498           a.m = a.dwdiv(a.M,b.m);
00499           a.M = a.updiv(sv,b.M);
00500           return;
00501         };
00502       
00503       if ( r == 3 )
00504         {
00505           throw typename Interval<C,r>::extended(a.updiv(a.m,b.M),a.dwdiv(a.M,b.m));
00506         };
00507     }
00508     
00509   if ( b.m > 0 )
00510     {
00511       a.m = a.dwdiv(a.m,b.m);
00512       a.M = a.updiv(a.M,b.m);
00513       return ;
00514     };
00515   
00516   if ( b.M < 0 )
00517     {
00518       C sv(a.m);
00519       a.m = a.dwdiv(a.M,b.m);
00520       a.M = a.updiv(sv,b.m);
00521       return;
00522     };
00523   if ( r == 3 ) throw typename Interval<C,r>::extended(0,0);
00524 };

void mmx::div ( Interval< C, r > &  a,
const C &  x,
const Interval< C, r > &  b 
) [inline]

Definition at line 450 of file Interval_fcts.hpp.

References interval_base< T,((unsigned) r)%4 >::dwdiv(), Interval< T, r >::M, Interval< T, r >::m, and interval_base< T,((unsigned) r)%4 >::updiv().

00450                                                             {
00451   if ( x > 0 )
00452     {
00453       a.m = a.dwdiv(x,b.M);
00454       a.M = a.updiv(x,b.m);
00455     }
00456   else
00457     {
00458       a.m = a.dwdiv(x,b.m);
00459       a.M = a.updiv(x,b.M);
00460     };
00461 };

void mmx::div ( Interval< C, r > &  a,
const Interval< C, r > &  b,
const C &  x 
) [inline]

Definition at line 435 of file Interval_fcts.hpp.

References div(), interval_base< T,((unsigned) r)%4 >::dwdiv(), Interval< T, r >::M, Interval< T, r >::m, and interval_base< T,((unsigned) r)%4 >::updiv().

00435                                                             {
00436   if ( &a == &b ) { div(a,x); return; };
00437   if ( x > 0 )
00438     {
00439       a.m = a.dwdiv(b.m,x);
00440       a.M = a.updiv(b.M,x);
00441     }
00442   else
00443     {
00444       a.m = a.dwdiv(b.M,x);
00445       a.M = a.updiv(b.m,x);
00446     };
00447 };

void mmx::div ( Interval< C, r > &  a,
const C &  x 
) [inline]
scalar< T > & Div2Exp ( const scalar< T > &  b,
unsigned long  exponent_of_2 
) [inline]

Definition at line 409 of file scalar.hpp.

References NONRCODE, and NRCODE.

00410 {
00411   NRCODE(r.Div2Exp(exponent_of_2);)
00412   NONRCODE(scalar<T> r(b); r.Div2Exp(exponent_of_2); return r;)
00413 }

monom<C,E> mmx::div_quo ( const monom< C, E > &  m1,
const monom< C, E > &  m2 
) [inline]

Definition at line 251 of file monomial.hpp.

References Monomial.

00251                                                   {
00252   Monomial res(1); res*=(m1.coeff()/m2.coeff());
00253   for (int i = 0; i <= m1.nvars(); ++i)
00254     res.set_expt(i,m1[i] - m2[i]);
00255   return res;
00256 }

void mmx::div_x ( POL &  p,
int  k 
) [inline]

Definition at line 8 of file contfrac_intervaldata.hpp.

Referenced by continued_fraction_subdivision< K >::solve_homography().

00009     {
00010       for(int i=0;i< int(p.size()-k);i++)
00011         p[i]=p[i+k];
00012       for(int i=p.size()-k; i<(int)p.size();i++)
00013         p[i]=0; 
00014     }

bool mmx::divide ( const monom< C, E > &  m1,
const monom< C, E > &  m2,
monom< C, E > &  r 
) [inline]

Definition at line 207 of file monomial.hpp.

References div().

Referenced by mmx::sparse::div_rem().

00207                                                             {
00208   div(r,m1,m2); 
00209   for (int i = 0; i <= r.nvars(); ++i)
00210     if(r[i]<0) return false;
00211   return true;
00212 }

void mmx::DivMod ( scalar< MPZ > &  q,
scalar< MPZ > &  r,
const scalar< MPZ > &  divdend,
unsigned long  divisor 
) [inline]

Definition at line 589 of file scalar_integer.hpp.

References scalar< T >::rep().

00590 {
00591   mpz_divmod_ui(&q.rep(), &r.rep(), &divdend.rep(), divisor);
00592 }

void mmx::DivMod ( scalar< MPZ > &  q,
scalar< MPZ > &  r,
const scalar< MPZ > &  divdend,
const scalar< MPZ > &  divisor 
) [inline]

Definition at line 583 of file scalar_integer.hpp.

References scalar< T >::rep().

00584 {
00585   mpz_divmod(&q.rep(), &r.rep(), &divdend.rep(), &divisor.rep());
00586 }

ring<C, Dual,DegRevLex> mmx::dual_of ( const ring< C, Sparse, DegRevLex > &  rg,
const generic &  x 
) [inline]

Definition at line 34 of file polynomial_dual_glue.hpp.

References RING.

00034                                                           { 
00035     return RING();
00036   }

ring<C, Dual,DegRevLex> mmx::dual_of ( const ring< C, Sparse, DegRevLex > &  rg  )  [inline]

Definition at line 30 of file polynomial_dual_glue.hpp.

References RING.

00030                                         { 
00031     return RING();
00032   }

int mmx::Eps ( const T &  v  )  [inline]

Definition at line 161 of file sign_variation.hpp.

References pow(), and sign().

Referenced by Count().

00162 {
00163   typedef typename T::const_iterator iter;
00164   int result=0;
00165   iter iti, itj=v.begin()+1;
00166   iti=itj;
00167   //  std::cout<<(*iti)<<" "<<(*itj)<<std::endl;
00168   while (itj!=v.end())
00169   {
00170     //    std::cout<<"L "<<(*iti)<<" "<<(*itj)<<std::endl;
00171     if ((*itj)==0)
00172       {
00173         iti=itj+1;
00174         while(iti!=v.end() && (*iti==0)) ++iti;
00175         if (iti!=v.end())
00176         {
00177           //      std::cout<<*iti<<" "<<*itj<<std::endl;          
00178           if (std::distance(itj,iti)%2==0)
00179             { 
00180               int val;
00181               if (sign(*(itj-1))*sign(*iti)>0) val=1; else val=-1;
00182               result += val*pow(-1,std::distance(itj,iti)/2);
00183             }
00184           itj=iti+1;
00185         }
00186         else
00187           return result;
00188       }
00189     else ++itj;
00190   }
00191   return result;
00192 }

bool mmx::eq ( const set_of< C > &  R1,
const set_of< C > &  R2 
) [inline]

Definition at line 30 of file set_of.hpp.

00031   {
00032     return R1==R2;
00033   }

bool mmx::eq ( const Seq< C, R > &  v1,
const Seq< C, R > &  v2 
) [inline]

Definition at line 194 of file Seq.hpp.

00194 {return v1==v2;}

void mmx::erase ( dynamic_exp< E > &  A  )  [inline]

Definition at line 269 of file dynamicexp.hpp.

References dynamic_exp< E >::_size, dynamic_exp< E >::_tab, and dynamic_exp< E >::clear().

Referenced by div(), mul(), operator*(), monom< C, E >::operator*=(), monom< C, E >::operator+=(), monom< C, E >::operator-=(), operator/(), and monom< C, E >::operator/=().

00269                                 {
00270   A.clear();
00271   A._tab = NULL;
00272   A._size = 0;
00273 }

void mmx::eval ( Result &  result,
const polynomial< C, with< Rep, Ord > > &  polynomial,
const Parameters &  parameters 
) [inline]

Definition at line 143 of file polynomial_fcts.hpp.

References eval().

00143                                                                                   {
00144   eval(result, polynomial.rep(), parameters ); 
00145 }

Result mmx::eval ( const polynomial< C, with< Rep, Ord > > &  polynomial,
const Parameters &  parameters,
int  n 
) [inline]

Definition at line 136 of file polynomial_fcts.hpp.

References eval().

00136                                                                                 {
00137   Result result;
00138   eval(result, polynomial.rep(), parameters, n );
00139   return result; 
00140 }

Result mmx::eval ( const polynomial< C, with< Rep, Ord > > &  polynomial,
const Parameters &  parameters 
) [inline]

Multivariate Polynomial Evaluation.

The type Prm must a container type, parameters corresponds to the 0..nvr() coordinates. The computation is done in the Sup Type of the Contained Type of Prm and Coeff. The type Result is the type of the result, it is assumed that an operator = on the computation type exists.

Definition at line 129 of file polynomial_fcts.hpp.

Referenced by template_expression< binary_operator<O, A, B > >::_eval_(), solver_mv_monomial< FT, POL >::check_root(), template_expression< binary_operator<O, A, B > >::eval(), template_expression< unary_operator<O, A > >::eval(), eval(), mmx::realroot::eval_poly_matrix(), mmx::realroot::exclude1(), mmx::realroot::include3(), template_expression< binary_operator<O, A, B > >::operator E(), template_expression< unary_operator<O, A > >::operator E(), template_expression< binary_operator<O, A, B > >::operator!=(), polynomial< C, with< Rep, Ord > >::operator()(), mmx::realroot::precondition(), and mmx::realroot::signof().

00129                                                                          {
00130   Result result;
00131   eval(result, polynomial.rep(), parameters );
00132   return result;
00133 }

bool mmx::exact_eq ( const ring< C, Sparse, DegRevLex > &  p,
const ring< C, Sparse, DegRevLex > &  q 
) [inline]

Definition at line 17 of file ring_sparse_glue.hpp.

00017 { return true;}

bool mmx::exact_eq ( const ring< C, MonomialTensor > &  p,
const ring< C, MonomialTensor > &  q 
) [inline]

Definition at line 21 of file ring_monomial_tensor_glue.hpp.

00021 { return true;}

bool mmx::exact_eq ( const MonomialTensor &  p,
const MonomialTensor &  q 
) [inline]

Definition at line 15 of file ring_monomial_tensor_glue.hpp.

00017 { return 1;}

bool mmx::exact_eq ( const ring< C, Bernstein > &  p,
const ring< C, Bernstein > &  q 
) [inline]

Definition at line 21 of file ring_bernstein_tensor_glue.hpp.

00021 { return true;}

bool mmx::exact_eq ( const Bernstein &  p,
const Bernstein &  q 
) [inline]

Definition at line 15 of file ring_bernstein_tensor_glue.hpp.

00017 { return 1;}

bool mmx::exact_eq ( const polynomial< C, with< V, W > > &  p,
const polynomial< C, with< V, W > > &  q 
) [inline]

Definition at line 15 of file polynomial_glue.hpp.

00015 { return p==q;}

bool mmx::exact_eq ( const ring< C, Dual, DegRevLex > &  p,
const ring< C, Dual, DegRevLex > &  q 
) [inline]

Definition at line 14 of file polynomial_dual_glue.hpp.

00014 { return true;}

bool mmx::exact_eq ( const Monomial &  v1,
const Monomial &  v2 
)

Definition at line 23 of file monomial_glue.hpp.

00023 {return v1==v2;}

unsigned mmx::exact_hash ( const ring< C, Sparse, DegRevLex > &  p  )  [inline]

Definition at line 15 of file ring_sparse_glue.hpp.

00015 { return 1;}

unsigned mmx::exact_hash ( const ring< C, MonomialTensor > &  p  )  [inline]

Definition at line 18 of file ring_monomial_tensor_glue.hpp.

00018 { return 1;}

unsigned mmx::exact_hash ( const MonomialTensor &  p  )  [inline]

Definition at line 15 of file ring_monomial_tensor_glue.hpp.

00017 { return 1;}

unsigned mmx::exact_hash ( const ring< C, Bernstein > &  p  )  [inline]

Definition at line 18 of file ring_bernstein_tensor_glue.hpp.

00018 { return 1;}

unsigned mmx::exact_hash ( const Bernstein &  p  )  [inline]

Definition at line 15 of file ring_bernstein_tensor_glue.hpp.

00017 { return 1;}

unsigned mmx::exact_hash ( const polynomial< C, with< V, W > > &  p  )  [inline]

Definition at line 13 of file polynomial_glue.hpp.

00013 { return 1;}

unsigned mmx::exact_hash ( const ring< C, Dual, DegRevLex > &  p  )  [inline]

Definition at line 12 of file polynomial_dual_glue.hpp.

00012 { return 1;}

unsigned mmx::exact_hash ( const Monomial &  m  ) 

Definition at line 32 of file monomial_glue.hpp.

References hash().

00032 {return hash(m);}

bool mmx::exact_neq ( const ring< C, Sparse, DegRevLex > &  p,
const ring< C, Sparse, DegRevLex > &  q 
) [inline]

Definition at line 18 of file ring_sparse_glue.hpp.

00018 { return false;}

bool mmx::exact_neq ( const ring< C, MonomialTensor > &  p,
const ring< C, MonomialTensor > &  q 
) [inline]

Definition at line 22 of file ring_monomial_tensor_glue.hpp.

00022 { return false;}

bool mmx::exact_neq ( const MonomialTensor &  p,
const MonomialTensor &  q 
) [inline]

Definition at line 15 of file ring_monomial_tensor_glue.hpp.

00017 { return 1;}

bool mmx::exact_neq ( const ring< C, Bernstein > &  p,
const ring< C, Bernstein > &  q 
) [inline]

Definition at line 22 of file ring_bernstein_tensor_glue.hpp.

00022 { return false;}

bool mmx::exact_neq ( const Bernstein &  p,
const Bernstein &  q 
) [inline]

Definition at line 15 of file ring_bernstein_tensor_glue.hpp.

00017 { return 1;}

bool mmx::exact_neq ( const polynomial< C, with< V, W > > &  p,
const polynomial< C, with< V, W > > &  q 
) [inline]

Definition at line 16 of file polynomial_glue.hpp.

00016 { return p!=q;}

bool mmx::exact_neq ( const ring< C, Dual, DegRevLex > &  p,
const ring< C, Dual, DegRevLex > &  q 
) [inline]

Definition at line 15 of file polynomial_dual_glue.hpp.

00015 { return false;}

bool mmx::exact_neq ( const Monomial &  v1,
const Monomial &  v2 
)

Definition at line 24 of file monomial_glue.hpp.

00024 {return v1!=v2;}

void mmx::ExtGCD ( scalar< MPZ > &  gcd,
scalar< MPZ > &  a,
scalar< MPZ > &  b,
const scalar< MPZ > &  x,
const scalar< MPZ > &  y 
) [inline]

Definition at line 595 of file scalar_integer.hpp.

References scalar< T >::rep().

00597 {
00598   mpz_gcdext(&gcd.rep(), &a.rep(), &b.rep(), &x.rep(), &y.rep());
00599 }

T mmx::factorial ( int  n  )  [inline]

Factorial

Definition at line 40 of file binomials.hpp.

00041 {
00042   T r=1;
00043   for (int i=2;i<=n;i++) r*=n;
00044   return(r);
00045 }

syntactic mmx::flatten ( const set_of< rational > &  Z  )  [inline]

Definition at line 9 of file set_of_glue.hpp.

syntactic mmx::flatten ( const set_of< integer > &  Z  )  [inline]

Definition at line 8 of file set_of_glue.hpp.

syntactic mmx::flatten ( const set_of< X > &  s  )  [inline]

Definition at line 35 of file set_of.hpp.

00036   {
00037     return syntactic("XXX");//type_name< X >());
00038   }

syntactic mmx::flatten ( const polynomial< C, with< Sparse, DegRevLex > > &  p  )  [inline]

Definition at line 52 of file ring_sparse_glue.hpp.

References flatten(), and pow().

00052                                               {
00053     typedef typename Polynomial::const_iterator iterator;
00054     typedef typename Polynomial::Ring           Ring;
00055     syntactic r(0);
00056     for(iterator it=p.begin(); it!=p.end();it++) {
00057       syntactic m= flatten(it->coeff());
00058       for(unsigned i=0;i<it->nbvar();i++) {
00059         syntactic v = Ring::var[i].data();
00060         m = m*pow(v,syntactic((*it)[i]));
00061       }
00062       r+=m;
00063     }
00064     return r;
00065   }

syntactic mmx::flatten ( const ring< C, Sparse, DegRevLex > &  rg  )  [inline]

Definition at line 23 of file ring_sparse_glue.hpp.

References CF(), and flatten().

00023                                          { 
00024     syntactic CF= flatten(scalar_set<C>());
00025     vector<syntactic> Lv; Lv <<CF;
00026     for(int i=0;i<rg.nbvar();i++)
00027       Lv<<syntactic(RING::var[i].data());
00028     return apply (GEN_ACCESS, Lv);
00029   }

syntactic mmx::flatten ( const polynomial< C, with< MonomialTensor > > &  p  )  [inline]

Definition at line 70 of file ring_monomial_tensor_glue.hpp.

References mmx::tensor::print_flatten().

00070                                               {
00071     typedef typename POLYNOMIAL::const_iterator iterator;
00072     typedef typename POLYNOMIAL::Ring         Ring;
00073     syntactic r(0);
00074     print_flatten(r,p.rep(),Ring::vars());
00075     return r;
00076   }

syntactic mmx::flatten ( const ring< C, MonomialTensor > &  rg  )  [inline]

Definition at line 27 of file ring_monomial_tensor_glue.hpp.

References CF(), and flatten().

00027                                          { 
00028     syntactic CF= flatten(scalar_set<C>());
00029     vector<syntactic> Lv; Lv <<CF;
00030     for(int i=0;i<rg.nbvar();i++) {
00031       Lv<<syntactic(RING::var[i].data());
00032     }
00033     return apply (GEN_ACCESS, Lv);
00034   }

syntactic mmx::flatten ( const MonomialTensor &  x  )  [inline]

Definition at line 15 of file ring_monomial_tensor_glue.hpp.

00017 { return 1;}

syntactic mmx::flatten ( const polynomial< C, with< Bernstein > > &  p  )  [inline]

Definition at line 81 of file ring_bernstein_tensor_glue.hpp.

References mmx::tensor::convertb2m(), POLYNOMIAL, and mmx::tensor::print_flatten().

00081                                               {
00082     syntactic r(0);
00083     POLYNOMIAL tmp(p);
00084     tensor::convertb2m(tmp.rep());
00085     print_flatten(r,tmp.rep(),RING::vars());
00086     return r;
00087   }

syntactic mmx::flatten ( const ring< C, Bernstein > &  rg  )  [inline]

Definition at line 27 of file ring_bernstein_tensor_glue.hpp.

References CF(), and flatten().

00027                                          { 
00028     syntactic CF= flatten(scalar_set<C>());
00029     vector<syntactic> Lv; Lv <<CF;
00030     for(int i=0;i<rg.nbvar();i++) {
00031       Lv<<syntactic(RING::var[i].data());
00032     }
00033     Lv<<syntactic("Bernstein");
00034     return apply (GEN_ACCESS, Lv);
00035   }

syntactic mmx::flatten ( const Bernstein &  x  )  [inline]

Definition at line 15 of file ring_bernstein_tensor_glue.hpp.

00017 { return 1;}

syntactic mmx::flatten ( const polynomial< C, with< V, W > > &  p  )  [inline]

Definition at line 18 of file polynomial_glue.hpp.

References flatten().

00018                                               {
00019     return flatten(p.rep());
00020   }

syntactic mmx::flatten ( const polynomial< C, with< Dual, DegRevLex > > &  p  )  [inline]

Definition at line 38 of file polynomial_dual_glue.hpp.

References flatten(), and pow().

00038                                               {
00039     typedef typename Polynomial::const_iterator iterator;
00040     syntactic r(0);
00041     for(iterator it=p.begin(); it!=p.end();it++)
00042       {
00043         syntactic m= flatten(it->coeff());
00044         for(unsigned i=0;i<it->nbvar();i++)
00045           {
00046             syntactic v = string("d")<<RING_POL::var[i].data();
00047             m = m*pow(v,syntactic(-(*it)[i]));
00048           }
00049         r+=m;
00050       }
00051     return r;
00052   }

syntactic mmx::flatten ( const ring< C, Dual, DegRevLex > &  Rg  )  [inline]

Definition at line 20 of file polynomial_dual_glue.hpp.

References CF(), and flatten().

00020                                          { 
00021     syntactic CF= flatten(scalar_set<C>());
00022     vector<syntactic> rg; rg <<CF;
00023     vector<syntactic> Lv; 
00024     for(int i=0;i<Rg.nbvar();i++)
00025       Lv<<syntactic(string("d")<<RING_POL::var[i].data());
00026     rg << apply(GEN_SQTUPLE,Lv);
00027     return apply (GEN_ACCESS, rg);
00028   }

syntactic mmx::flatten ( const monom< int > &  v  ) 

Definition at line 36 of file monomial_glue.hpp.

References flatten(), and pow().

00036                             {
00037   syntactic m= flatten(v.coeff());
00038   for(unsigned i=0;i<v.nbvar();i++)
00039     m = m*pow(syntactic(MONOMIAL::var[i].data()),v[i]);
00040   return m;
00041 }

syntactic mmx::flatten ( const interval< C > &  x  )  [inline]

Definition at line 17 of file Interval_glue.hpp.

References lower(), and upper().

Referenced by flatten(), and mmx::tensor::print_flatten().

00018   {
00019     return flatten(cons(as<generic>(lower(x)), list<generic>(as<generic>(upper(x)))));
00020   }

RR mmx::fracpart ( const RR &  r  )  [inline]

Definition at line 105 of file GMPXX.hpp.

References trunc().

00105 { return r - trunc(r); }

scalar<MPZ> mmx::gcd ( const scalar< MPZ > &  a,
const scalar< MPZ > &  b 
) [inline]

Definition at line 710 of file scalar_integer.hpp.

References scalar< T >::rep().

00711 {
00712   scalar<MPZ> r;
00713   mpz_gcd(&r.rep(), &a.rep(), &b.rep());
00714   return r;
00715 }

scalar< T > & gcd ( const scalar< T > &  b1,
const scalar< T > &  b2 
) [inline]

Definition at line 423 of file scalar.hpp.

References NONRCODE, and NRCODE.

00424 {
00425   NRCODE(r.GCD(b2);)
00426   NONRCODE(scalar<T> r(b1); r.GCD(b2); return r;)
00427 }

scalar< T > & GCD ( const scalar< T > &  b1,
const scalar< T > &  b2 
) [inline]

Definition at line 416 of file scalar.hpp.

References NONRCODE, and NRCODE.

00417 {
00418   NRCODE(r.GCD(b2);)
00419   NONRCODE(scalar<T> r(b1); r.GCD(b2); return r;)
00420 }

ZZ mmx::gcd ( const ZZ &  a,
const ZZ &  b 
) [inline]

Definition at line 51 of file GMPXX.hpp.

00052     {
00053       mpz_class r;
00054       mpz_gcd(r.get_mpz_t(), a.get_mpz_t(), b.get_mpz_t());
00055       return r;
00056     }

double mmx::gcd ( const double &  ,
const double &   
) [inline]

Definition at line 90 of file GMP.hpp.

Referenced by mmx::sparse::content(), lcm(), and sub_resultant< PREM >::subres_gcd().

00090 { return 1; }

static rational mmx::GLUE_1 ( const ring< rational, Sparse, DegRevLex > &  arg_1  )  [static]

Definition at line 31 of file glue_ring_sparse_rational.cpp.

References sample().

00031                                                           {
00032     return sample (arg_1);
00033   }

static integer mmx::GLUE_1 ( const ring< integer, Sparse, DegRevLex > &  arg_1  )  [static]

Definition at line 31 of file glue_ring_sparse_integer.cpp.

References sample().

00031                                                          {
00032     return sample (arg_1);
00033   }

static mmx_floating mmx::GLUE_1 ( const ring< mmx_floating, Sparse, DegRevLex > &  arg_1  )  [static]

Definition at line 31 of file glue_ring_sparse_floating.cpp.

References sample().

00031                                                               {
00032     return sample (arg_1);
00033   }

static interval<rational> mmx::GLUE_1 ( const rational &  arg_1  )  [static]

Definition at line 21 of file glue_interval.cpp.

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00021                                  {
00022     return interval<rational > (arg_1);
00023   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_10 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1,
const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 76 of file glue_ring_sparse_rational.cpp.

00076                                                                                                                                {
00077     return arg_1 - arg_2;
00078   }

static ring<integer, Sparse, DegRevLex>::Polynomial mmx::GLUE_10 ( const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_1,
const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 76 of file glue_ring_sparse_integer.cpp.

00076                                                                                                                              {
00077     return arg_1 - arg_2;
00078   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_10 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1,
const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 76 of file glue_ring_sparse_floating.cpp.

00076                                                                                                                                        {
00077     return arg_1 - arg_2;
00078   }

static interval<rational> mmx::GLUE_10 ( const interval< rational > &  arg_1,
const rational &  arg_2 
) [static]

Definition at line 66 of file glue_interval.cpp.

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00066                                                                    {
00067     return arg_1 - arg_2;
00068   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_11 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1,
const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 81 of file glue_ring_sparse_rational.cpp.

00081                                                                                                                                {
00082     return arg_1 * arg_2;
00083   }

static ring<integer, Sparse, DegRevLex>::Polynomial mmx::GLUE_11 ( const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_1,
const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 81 of file glue_ring_sparse_integer.cpp.

00081                                                                                                                              {
00082     return arg_1 * arg_2;
00083   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_11 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1,
const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 81 of file glue_ring_sparse_floating.cpp.

00081                                                                                                                                        {
00082     return arg_1 * arg_2;
00083   }

static interval<rational> mmx::GLUE_11 ( const rational &  arg_1,
const interval< rational > &  arg_2 
) [static]

Definition at line 71 of file glue_interval.cpp.

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00071                                                                    {
00072     return arg_1 * arg_2;
00073   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_12 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1  )  [static]

Definition at line 86 of file glue_ring_sparse_rational.cpp.

References square().

00086                                                                      {
00087     return square (arg_1);
00088   }

static ring<integer, Sparse, DegRevLex>::Polynomial mmx::GLUE_12 ( const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_1  )  [static]

Definition at line 86 of file glue_ring_sparse_integer.cpp.

References square().

00086                                                                     {
00087     return square (arg_1);
00088   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_12 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1  )  [static]

Definition at line 86 of file glue_ring_sparse_floating.cpp.

References square().

00086                                                                          {
00087     return square (arg_1);
00088   }

static interval<rational> mmx::GLUE_12 ( const interval< rational > &  arg_1,
const rational &  arg_2 
) [static]

Definition at line 76 of file glue_interval.cpp.

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00076                                                                    {
00077     return arg_1 * arg_2;
00078   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_13 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1,
const int &  arg_2 
) [static]

Definition at line 91 of file glue_ring_sparse_rational.cpp.

References pow().

00091                                                                                        {
00092     return pow (arg_1, arg_2);
00093   }

static ring<integer, Sparse, DegRevLex>::Polynomial mmx::GLUE_13 ( const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_1,
const int &  arg_2 
) [static]

Definition at line 91 of file glue_ring_sparse_integer.cpp.

References pow().

00091                                                                                       {
00092     return pow (arg_1, arg_2);
00093   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_13 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1,
const int &  arg_2 
) [static]

Definition at line 91 of file glue_ring_sparse_floating.cpp.

References pow().

00091                                                                                            {
00092     return pow (arg_1, arg_2);
00093   }

static interval<rational> mmx::GLUE_13 ( const interval< rational > &  arg_1,
const interval< rational > &  arg_2 
) [static]

Definition at line 81 of file glue_interval.cpp.

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00081                                                                              {
00082     return arg_1 / arg_2;
00083   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_14 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1,
const int &  arg_2 
) [static]

Definition at line 96 of file glue_ring_sparse_rational.cpp.

References diff().

00096                                                                                        {
00097     return diff (arg_1, arg_2);
00098   }

static ring<integer, Sparse, DegRevLex>::Polynomial mmx::GLUE_14 ( const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_1,
const int &  arg_2 
) [static]

Definition at line 96 of file glue_ring_sparse_integer.cpp.

References diff().

00096                                                                                       {
00097     return diff (arg_1, arg_2);
00098   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_14 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1,
const int &  arg_2 
) [static]

Definition at line 96 of file glue_ring_sparse_floating.cpp.

References diff().

00096                                                                                            {
00097     return diff (arg_1, arg_2);
00098   }

static rational mmx::GLUE_14 ( const interval< rational > &  arg_1  )  [static]

Definition at line 86 of file glue_interval.cpp.

References interval_lower().

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00086                                             {
00087     return interval_lower (arg_1);
00088   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_15 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1,
const generic &  arg_2 
) [static]

Definition at line 101 of file glue_ring_sparse_rational.cpp.

References diff().

00101                                                                                            {
00102     return diff (arg_1, arg_2);
00103   }

static ring<integer, Sparse, DegRevLex>::Polynomial mmx::GLUE_15 ( const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_1,
const generic &  arg_2 
) [static]

Definition at line 101 of file glue_ring_sparse_integer.cpp.

References diff().

00101                                                                                           {
00102     return diff (arg_1, arg_2);
00103   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_15 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1,
const generic &  arg_2 
) [static]

Definition at line 101 of file glue_ring_sparse_floating.cpp.

References diff().

00101                                                                                                {
00102     return diff (arg_1, arg_2);
00103   }

static rational mmx::GLUE_15 ( const interval< rational > &  arg_1  )  [static]

Definition at line 91 of file glue_interval.cpp.

References interval_upper().

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00091                                             {
00092     return interval_upper (arg_1);
00093   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_16 ( const rational &  arg_1,
const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 106 of file glue_ring_sparse_rational.cpp.

00106                                                                                             {
00107     return arg_1 + arg_2;
00108   }

static ring<integer, Sparse, DegRevLex>::Polynomial mmx::GLUE_16 ( const integer &  arg_1,
const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 106 of file glue_ring_sparse_integer.cpp.

00106                                                                                           {
00107     return arg_1 + arg_2;
00108   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_16 ( const mmx_floating &  arg_1,
const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 106 of file glue_ring_sparse_floating.cpp.

00106                                                                                                     {
00107     return arg_1 + arg_2;
00108   }

static interval<mmx_floating> mmx::GLUE_16 ( const mmx_floating &  arg_1  )  [static]

Definition at line 96 of file glue_interval.cpp.

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00096                                       {
00097     return interval<mmx_floating > (arg_1);
00098   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_17 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1,
const rational &  arg_2 
) [static]

Definition at line 111 of file glue_ring_sparse_rational.cpp.

00111                                                                                             {
00112     return arg_1 + arg_2;
00113   }

static ring<integer, Sparse, DegRevLex>::Polynomial mmx::GLUE_17 ( const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_1,
const integer &  arg_2 
) [static]

Definition at line 111 of file glue_ring_sparse_integer.cpp.

00111                                                                                           {
00112     return arg_1 + arg_2;
00113   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_17 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1,
const mmx_floating &  arg_2 
) [static]

Definition at line 111 of file glue_ring_sparse_floating.cpp.

00111                                                                                                     {
00112     return arg_1 + arg_2;
00113   }

static interval<mmx_floating> mmx::GLUE_17 ( const mmx_floating &  arg_1,
const mmx_floating &  arg_2 
) [static]

Definition at line 101 of file glue_interval.cpp.

References interval_from_pair().

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00101                                                                  {
00102     return interval_from_pair (arg_1, arg_2);
00103   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_18 ( const rational &  arg_1,
const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 116 of file glue_ring_sparse_rational.cpp.

00116                                                                                             {
00117     return arg_1 - arg_2;
00118   }

static ring<integer, Sparse, DegRevLex>::Polynomial mmx::GLUE_18 ( const integer &  arg_1,
const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 116 of file glue_ring_sparse_integer.cpp.

00116                                                                                           {
00117     return arg_1 - arg_2;
00118   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_18 ( const mmx_floating &  arg_1,
const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 116 of file glue_ring_sparse_floating.cpp.

00116                                                                                                     {
00117     return arg_1 - arg_2;
00118   }

static interval<mmx_floating> mmx::GLUE_18 ( const interval< mmx_floating > &  arg_1  )  [static]

Definition at line 106 of file glue_interval.cpp.

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00106                                                 {
00107     return -arg_1;
00108   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_19 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1,
const rational &  arg_2 
) [static]

Definition at line 121 of file glue_ring_sparse_rational.cpp.

00121                                                                                             {
00122     return arg_1 - arg_2;
00123   }

static ring<integer, Sparse, DegRevLex>::Polynomial mmx::GLUE_19 ( const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_1,
const integer &  arg_2 
) [static]

Definition at line 121 of file glue_ring_sparse_integer.cpp.

00121                                                                                           {
00122     return arg_1 - arg_2;
00123   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_19 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1,
const mmx_floating &  arg_2 
) [static]

Definition at line 121 of file glue_ring_sparse_floating.cpp.

00121                                                                                                     {
00122     return arg_1 - arg_2;
00123   }

static interval<mmx_floating> mmx::GLUE_19 ( const interval< mmx_floating > &  arg_1,
const interval< mmx_floating > &  arg_2 
) [static]

Definition at line 111 of file glue_interval.cpp.

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00111                                                                                      {
00112     return arg_1 + arg_2;
00113   }

static ring<rational, Sparse, DegRevLex> mmx::GLUE_2 ( const ring< rational, Sparse, DegRevLex > &  arg_1,
const tuple< generic > &  arg_2 
) [static]

Definition at line 36 of file glue_ring_sparse_rational.cpp.

References ring_sparse_extend_generic().

00036                                                                                        {
00037     return ring_sparse_extend_generic (arg_1, as_vector (arg_2));
00038   }

static ring<integer, Sparse, DegRevLex> mmx::GLUE_2 ( const ring< integer, Sparse, DegRevLex > &  arg_1,
const tuple< generic > &  arg_2 
) [static]

Definition at line 36 of file glue_ring_sparse_integer.cpp.

References ring_sparse_extend_generic().

00036                                                                                       {
00037     return ring_sparse_extend_generic (arg_1, as_vector (arg_2));
00038   }

static ring<mmx_floating, Sparse, DegRevLex> mmx::GLUE_2 ( const ring< mmx_floating, Sparse, DegRevLex > &  arg_1,
const tuple< generic > &  arg_2 
) [static]

Definition at line 36 of file glue_ring_sparse_floating.cpp.

References ring_sparse_extend_generic().

00036                                                                                            {
00037     return ring_sparse_extend_generic (arg_1, as_vector (arg_2));
00038   }

static interval<rational> mmx::GLUE_2 ( const rational &  arg_1,
const rational &  arg_2 
) [static]

Definition at line 26 of file glue_interval.cpp.

References interval_from_pair().

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00026                                                         {
00027     return interval_from_pair (arg_1, arg_2);
00028   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_20 ( const rational &  arg_1,
const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 126 of file glue_ring_sparse_rational.cpp.

00126                                                                                             {
00127     return arg_1 * arg_2;
00128   }

static ring<integer, Sparse, DegRevLex>::Polynomial mmx::GLUE_20 ( const integer &  arg_1,
const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 126 of file glue_ring_sparse_integer.cpp.

00126                                                                                           {
00127     return arg_1 * arg_2;
00128   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_20 ( const mmx_floating &  arg_1,
const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 126 of file glue_ring_sparse_floating.cpp.

00126                                                                                                     {
00127     return arg_1 * arg_2;
00128   }

static interval<mmx_floating> mmx::GLUE_20 ( const interval< mmx_floating > &  arg_1,
const interval< mmx_floating > &  arg_2 
) [static]

Definition at line 116 of file glue_interval.cpp.

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00116                                                                                      {
00117     return arg_1 - arg_2;
00118   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_21 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1,
const rational &  arg_2 
) [static]

Definition at line 131 of file glue_ring_sparse_rational.cpp.

00131                                                                                             {
00132     return arg_1 * arg_2;
00133   }

static ring<integer, Sparse, DegRevLex>::Polynomial mmx::GLUE_21 ( const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_1,
const integer &  arg_2 
) [static]

Definition at line 131 of file glue_ring_sparse_integer.cpp.

00131                                                                                           {
00132     return arg_1 * arg_2;
00133   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_21 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1,
const mmx_floating &  arg_2 
) [static]

Definition at line 131 of file glue_ring_sparse_floating.cpp.

00131                                                                                                     {
00132     return arg_1 * arg_2;
00133   }

static interval<mmx_floating> mmx::GLUE_21 ( const interval< mmx_floating > &  arg_1,
const interval< mmx_floating > &  arg_2 
) [static]

Definition at line 121 of file glue_interval.cpp.

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00121                                                                                      {
00122     return arg_1 * arg_2;
00123   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_22 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1,
const rational &  arg_2 
) [static]

Definition at line 136 of file glue_ring_sparse_rational.cpp.

00136                                                                                             {
00137     return arg_1 / arg_2;
00138   }

static ring<integer, Sparse, DegRevLex>::Polynomial mmx::GLUE_22 ( const ring< integer, Sparse, DegRevLex > &  arg_1,
const integer &  arg_2 
) [static]

Definition at line 136 of file glue_ring_sparse_integer.cpp.

References polynomial_sparse().

00136                                                                                 {
00137     return polynomial_sparse (arg_1, arg_2);
00138   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_22 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1,
const mmx_floating &  arg_2 
) [static]

Definition at line 136 of file glue_ring_sparse_floating.cpp.

00136                                                                                                     {
00137     return arg_1 / arg_2;
00138   }

static interval<mmx_floating> mmx::GLUE_22 ( const mmx_floating &  arg_1,
const interval< mmx_floating > &  arg_2 
) [static]

Definition at line 126 of file glue_interval.cpp.

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00126                                                                            {
00127     return arg_1 + arg_2;
00128   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_23 ( const ring< rational, Sparse, DegRevLex > &  arg_1,
const rational &  arg_2 
) [static]

Definition at line 141 of file glue_ring_sparse_rational.cpp.

References polynomial_sparse().

00141                                                                                   {
00142     return polynomial_sparse (arg_1, arg_2);
00143   }

static ring<integer, Sparse, DegRevLex>::Polynomial mmx::GLUE_23 ( const ring< integer, Sparse, DegRevLex > &  arg_1,
const integer &  arg_2,
const int &  arg_3,
const int &  arg_4 
) [static]

Definition at line 141 of file glue_ring_sparse_integer.cpp.

References polynomial_sparse().

00141                                                                                                                     {
00142     return polynomial_sparse (arg_1, arg_2, arg_3, arg_4);
00143   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_23 ( const ring< mmx_floating, Sparse, DegRevLex > &  arg_1,
const mmx_floating &  arg_2 
) [static]

Definition at line 141 of file glue_ring_sparse_floating.cpp.

References polynomial_sparse().

00141                                                                                           {
00142     return polynomial_sparse (arg_1, arg_2);
00143   }

static interval<mmx_floating> mmx::GLUE_23 ( const interval< mmx_floating > &  arg_1,
const mmx_floating &  arg_2 
) [static]

Definition at line 131 of file glue_interval.cpp.

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00131                                                                            {
00132     return arg_1 + arg_2;
00133   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_24 ( const ring< rational, Sparse, DegRevLex > &  arg_1,
const rational &  arg_2,
const int &  arg_3,
const int &  arg_4 
) [static]

Definition at line 146 of file glue_ring_sparse_rational.cpp.

References polynomial_sparse().

00146                                                                                                                       {
00147     return polynomial_sparse (arg_1, arg_2, arg_3, arg_4);
00148   }

static ring<integer, Sparse, DegRevLex>::Polynomial mmx::GLUE_24 ( const ring< integer, Sparse, DegRevLex > &  arg_1,
const string &  arg_2 
) [static]

Definition at line 146 of file glue_ring_sparse_integer.cpp.

References polynomial_sparse().

00146                                                                                {
00147     return polynomial_sparse (arg_1, arg_2);
00148   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_24 ( const ring< mmx_floating, Sparse, DegRevLex > &  arg_1,
const mmx_floating &  arg_2,
const int &  arg_3,
const int &  arg_4 
) [static]

Definition at line 146 of file glue_ring_sparse_floating.cpp.

References polynomial_sparse().

00146                                                                                                                               {
00147     return polynomial_sparse (arg_1, arg_2, arg_3, arg_4);
00148   }

static interval<mmx_floating> mmx::GLUE_24 ( const mmx_floating &  arg_1,
const interval< mmx_floating > &  arg_2 
) [static]

Definition at line 136 of file glue_interval.cpp.

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00136                                                                            {
00137     return arg_1 - arg_2;
00138   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_25 ( const ring< rational, Sparse, DegRevLex > &  arg_1,
const string &  arg_2 
) [static]

Definition at line 151 of file glue_ring_sparse_rational.cpp.

References polynomial_sparse().

00151                                                                                 {
00152     return polynomial_sparse (arg_1, arg_2);
00153   }

static ring<integer, Sparse, DegRevLex>::Polynomial mmx::GLUE_25 ( const ring< integer, Sparse, DegRevLex > &  arg_1,
const generic &  arg_2 
) [static]

Definition at line 151 of file glue_ring_sparse_integer.cpp.

References polynomial_sparse().

00151                                                                                 {
00152     return polynomial_sparse (arg_1, arg_2);
00153   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_25 ( const ring< mmx_floating, Sparse, DegRevLex > &  arg_1,
const string &  arg_2 
) [static]

Definition at line 151 of file glue_ring_sparse_floating.cpp.

References polynomial_sparse().

00151                                                                                     {
00152     return polynomial_sparse (arg_1, arg_2);
00153   }

static interval<mmx_floating> mmx::GLUE_25 ( const interval< mmx_floating > &  arg_1,
const mmx_floating &  arg_2 
) [static]

Definition at line 141 of file glue_interval.cpp.

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00141                                                                            {
00142     return arg_1 - arg_2;
00143   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_26 ( const ring< rational, Sparse, DegRevLex > &  arg_1,
const generic &  arg_2 
) [static]

Definition at line 156 of file glue_ring_sparse_rational.cpp.

References polynomial_sparse().

00156                                                                                  {
00157     return polynomial_sparse (arg_1, arg_2);
00158   }

static ring<integer, Sparse, DegRevLex>::Polynomial mmx::GLUE_26 ( const ring< integer, Sparse, DegRevLex > &  arg_1,
const string &  arg_2 
) [static]

Definition at line 156 of file glue_ring_sparse_integer.cpp.

References polynomial_sparse().

00156                                                                                {
00157     return polynomial_sparse (arg_1, arg_2);
00158   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_26 ( const ring< mmx_floating, Sparse, DegRevLex > &  arg_1,
const generic &  arg_2 
) [static]

Definition at line 156 of file glue_ring_sparse_floating.cpp.

References polynomial_sparse().

00156                                                                                      {
00157     return polynomial_sparse (arg_1, arg_2);
00158   }

static interval<mmx_floating> mmx::GLUE_26 ( const mmx_floating &  arg_1,
const interval< mmx_floating > &  arg_2 
) [static]

Definition at line 146 of file glue_interval.cpp.

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00146                                                                            {
00147     return arg_1 * arg_2;
00148   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_27 ( const ring< rational, Sparse, DegRevLex > &  arg_1,
const string &  arg_2 
) [static]

Definition at line 161 of file glue_ring_sparse_rational.cpp.

References polynomial_sparse().

00161                                                                                 {
00162     return polynomial_sparse (arg_1, arg_2);
00163   }

static ring<integer, Sparse, DegRevLex>::Polynomial mmx::GLUE_27 ( const ring< integer, Sparse, DegRevLex > &  arg_1,
const generic &  arg_2 
) [static]

Definition at line 161 of file glue_ring_sparse_integer.cpp.

References polynomial_sparse().

00161                                                                                 {
00162     return polynomial_sparse (arg_1, arg_2);
00163   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_27 ( const ring< mmx_floating, Sparse, DegRevLex > &  arg_1,
const string &  arg_2 
) [static]

Definition at line 161 of file glue_ring_sparse_floating.cpp.

References polynomial_sparse().

00161                                                                                     {
00162     return polynomial_sparse (arg_1, arg_2);
00163   }

static interval<mmx_floating> mmx::GLUE_27 ( const interval< mmx_floating > &  arg_1,
const mmx_floating &  arg_2 
) [static]

Definition at line 151 of file glue_interval.cpp.

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00151                                                                            {
00152     return arg_1 * arg_2;
00153   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_28 ( const ring< rational, Sparse, DegRevLex > &  arg_1,
const generic &  arg_2 
) [static]

Definition at line 166 of file glue_ring_sparse_rational.cpp.

References polynomial_sparse().

00166                                                                                  {
00167     return polynomial_sparse (arg_1, arg_2);
00168   }

static vector<generic> mmx::GLUE_28 ( const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_1,
const int &  arg_2 
) [static]

Definition at line 166 of file glue_ring_sparse_integer.cpp.

References polynomial_sparse_coefficients().

00166                                                                                       {
00167     return polynomial_sparse_coefficients (arg_1, arg_2);
00168   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_28 ( const ring< mmx_floating, Sparse, DegRevLex > &  arg_1,
const generic &  arg_2 
) [static]

Definition at line 166 of file glue_ring_sparse_floating.cpp.

References polynomial_sparse().

00166                                                                                      {
00167     return polynomial_sparse (arg_1, arg_2);
00168   }

static interval<mmx_floating> mmx::GLUE_28 ( const interval< mmx_floating > &  arg_1,
const interval< mmx_floating > &  arg_2 
) [static]

Definition at line 156 of file glue_interval.cpp.

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00156                                                                                      {
00157     return arg_1 / arg_2;
00158   }

static vector<generic> mmx::GLUE_29 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1,
const int &  arg_2 
) [static]

Definition at line 171 of file glue_ring_sparse_rational.cpp.

References polynomial_sparse_coefficients().

00171                                                                                        {
00172     return polynomial_sparse_coefficients (arg_1, arg_2);
00173   }

static vector<generic> mmx::GLUE_29 ( const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_1  )  [static]

Definition at line 171 of file glue_ring_sparse_integer.cpp.

References polynomial_sparse_coefficients().

00171                                                                     {
00172     return polynomial_sparse_coefficients (arg_1);
00173   }

static vector<generic> mmx::GLUE_29 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1,
const int &  arg_2 
) [static]

Definition at line 171 of file glue_ring_sparse_floating.cpp.

References polynomial_sparse_coefficients().

00171                                                                                            {
00172     return polynomial_sparse_coefficients (arg_1, arg_2);
00173   }

static mmx_floating mmx::GLUE_29 ( const interval< mmx_floating > &  arg_1  )  [static]

Definition at line 161 of file glue_interval.cpp.

References interval_lower().

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00161                                                 {
00162     return interval_lower (arg_1);
00163   }

static ring<rational, Sparse, DegRevLex> mmx::GLUE_3 ( const scalar_set< rational > &  arg_1,
const tuple< generic > &  arg_2 
) [static]

Definition at line 41 of file glue_ring_sparse_rational.cpp.

References ring_sparse_generic().

00041                                                                           {
00042     return ring_sparse_generic (arg_1, as_vector (arg_2));
00043   }

static ring<integer, Sparse, DegRevLex> mmx::GLUE_3 ( const scalar_set< integer > &  arg_1,
const tuple< generic > &  arg_2 
) [static]

Definition at line 41 of file glue_ring_sparse_integer.cpp.

References ring_sparse_generic().

00041                                                                          {
00042     return ring_sparse_generic (arg_1, as_vector (arg_2));
00043   }

static ring<mmx_floating, Sparse, DegRevLex> mmx::GLUE_3 ( const scalar_set< floating<> > &  arg_1,
const tuple< generic > &  arg_2 
) [static]

Definition at line 41 of file glue_ring_sparse_floating.cpp.

References ring_sparse_generic().

00041                                                                              {
00042     return ring_sparse_generic (arg_1, as_vector (arg_2));
00043   }

static interval<rational> mmx::GLUE_3 ( const interval< rational > &  arg_1  )  [static]

Definition at line 31 of file glue_interval.cpp.

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00031                                            {
00032     return -arg_1;
00033   }

static vector<generic> mmx::GLUE_30 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1  )  [static]

Definition at line 176 of file glue_ring_sparse_rational.cpp.

References polynomial_sparse_coefficients().

00176                                                                      {
00177     return polynomial_sparse_coefficients (arg_1);
00178   }

static vector<generic> mmx::GLUE_30 ( const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_1  )  [static]

Definition at line 176 of file glue_ring_sparse_integer.cpp.

References polynomial_sparse_monomials().

00176                                                                     {
00177     return polynomial_sparse_monomials (arg_1);
00178   }

static vector<generic> mmx::GLUE_30 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1  )  [static]

Definition at line 176 of file glue_ring_sparse_floating.cpp.

References polynomial_sparse_coefficients().

00176                                                                          {
00177     return polynomial_sparse_coefficients (arg_1);
00178   }

static mmx_floating mmx::GLUE_30 ( const interval< mmx_floating > &  arg_1  )  [static]

Definition at line 166 of file glue_interval.cpp.

References interval_upper().

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00166                                                 {
00167     return interval_upper (arg_1);
00168   }

static vector<generic> mmx::GLUE_31 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1  )  [static]

Definition at line 181 of file glue_ring_sparse_rational.cpp.

References polynomial_sparse_monomials().

00181                                                                      {
00182     return polynomial_sparse_monomials (arg_1);
00183   }

static ring<integer, Sparse, DegRevLex>::Polynomial mmx::GLUE_31 ( const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_1,
const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 181 of file glue_ring_sparse_integer.cpp.

References homogenize().

00181                                                                                                                              {
00182     return homogenize (arg_1, arg_2);
00183   }

static vector<generic> mmx::GLUE_31 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1  )  [static]
static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_32 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1,
const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 186 of file glue_ring_sparse_rational.cpp.

References homogenize().

00186                                                                                                                                {
00187     return homogenize (arg_1, arg_2);
00188   }

static ring<integer, Sparse, DegRevLex>::Polynomial mmx::GLUE_32 ( const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_1,
const int &  arg_2,
const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_3 
) [static]

Definition at line 186 of file glue_ring_sparse_integer.cpp.

References homogenize().

00186                                                                                                                                                {
00187     return homogenize (arg_1, arg_2, arg_3);
00188   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_32 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1,
const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 186 of file glue_ring_sparse_floating.cpp.

References homogenize().

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00186                                                                                                                                        {
00187     return homogenize (arg_1, arg_2);
00188   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_33 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1,
const int &  arg_2,
const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_3 
) [static]

Definition at line 191 of file glue_ring_sparse_rational.cpp.

References homogenize().

00191                                                                                                                                                  {
00192     return homogenize (arg_1, arg_2, arg_3);
00193   }

static generic mmx::GLUE_33 ( const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_1,
const vector< generic > &  arg_2 
) [static]

Definition at line 191 of file glue_ring_sparse_integer.cpp.

References polynomial_sparse_eval_generic().

00191                                                                                                   {
00192     return polynomial_sparse_eval_generic (arg_1, arg_2);
00193   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_33 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1,
const int &  arg_2,
const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_3 
) [static]

Definition at line 191 of file glue_ring_sparse_floating.cpp.

References homogenize().

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00191                                                                                                                                                          {
00192     return homogenize (arg_1, arg_2, arg_3);
00193   }

static generic mmx::GLUE_34 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1,
const vector< generic > &  arg_2 
) [static]

Definition at line 196 of file glue_ring_sparse_rational.cpp.

References polynomial_sparse_eval_generic().

00196                                                                                                    {
00197     return polynomial_sparse_eval_generic (arg_1, arg_2);
00198   }

static ring<integer, Sparse, DegRevLex>::Polynomial mmx::GLUE_34 ( const ring< integer, Sparse, DegRevLex > &  arg_1,
const int &  arg_2 
) [static]

Definition at line 196 of file glue_ring_sparse_integer.cpp.

00196                                                                             {
00197     return arg_1[arg_2];
00198   }

static generic mmx::GLUE_34 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1,
const vector< generic > &  arg_2 
) [static]
static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_35 ( const ring< rational, Sparse, DegRevLex > &  arg_1,
const int &  arg_2 
) [static]

Definition at line 201 of file glue_ring_sparse_rational.cpp.

00201                                                                              {
00202     return arg_1[arg_2];
00203   }

static vector<generic> mmx::GLUE_35 ( const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_1,
const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_2,
const int &  arg_3 
) [static]

Definition at line 201 of file glue_ring_sparse_integer.cpp.

References polynomial_sturm_sequence().

00201                                                                                                                                                {
00202     return polynomial_sturm_sequence (arg_1, arg_2, arg_3);
00203   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_35 ( const ring< mmx_floating, Sparse, DegRevLex > &  arg_1,
const int &  arg_2 
) [static]

Definition at line 201 of file glue_ring_sparse_floating.cpp.

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00201                                                                                  {
00202     return arg_1[arg_2];
00203   }

static vector<generic> mmx::GLUE_36 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1,
const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_2,
const int &  arg_3 
) [static]

Definition at line 206 of file glue_ring_sparse_rational.cpp.

References polynomial_sturm_sequence().

00206                                                                                                                                                  {
00207     return polynomial_sturm_sequence (arg_1, arg_2, arg_3);
00208   }

static ring<integer, Sparse, DegRevLex>::Polynomial mmx::GLUE_36 ( const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_1,
const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_2,
const int &  arg_3 
) [static]

Definition at line 206 of file glue_ring_sparse_integer.cpp.

References polynomial_resultant().

00206                                                                                                                                                {
00207     return polynomial_resultant (arg_1, arg_2, arg_3);
00208   }

static vector<generic> mmx::GLUE_36 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1,
const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_2,
const int &  arg_3 
) [static]

Definition at line 206 of file glue_ring_sparse_floating.cpp.

References polynomial_sturm_sequence().

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00206                                                                                                                                                          {
00207     return polynomial_sturm_sequence (arg_1, arg_2, arg_3);
00208   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_37 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1,
const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_2,
const int &  arg_3 
) [static]

Definition at line 211 of file glue_ring_sparse_rational.cpp.

References polynomial_resultant().

00211                                                                                                                                                  {
00212     return polynomial_resultant (arg_1, arg_2, arg_3);
00213   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_37 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1,
const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_2,
const int &  arg_3 
) [static]

Definition at line 211 of file glue_ring_sparse_floating.cpp.

References polynomial_resultant().

Referenced by glue_ring_sparse_floating(), and glue_ring_sparse_rational().

00211                                                                                                                                                          {
00212     return polynomial_resultant (arg_1, arg_2, arg_3);
00213   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_38 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1,
const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 216 of file glue_ring_sparse_rational.cpp.

00216                                                                                                                                {
00217     return arg_1 / arg_2;
00218   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_38 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1,
const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 216 of file glue_ring_sparse_floating.cpp.

Referenced by glue_ring_sparse_floating(), and glue_ring_sparse_rational().

00216                                                                                                                                        {
00217     return arg_1 / arg_2;
00218   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_39 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1,
const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 221 of file glue_ring_sparse_rational.cpp.

00221                                                                                                                                {
00222     return arg_1 / arg_2;
00223   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_39 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1,
const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 221 of file glue_ring_sparse_floating.cpp.

Referenced by glue_ring_sparse_floating(), and glue_ring_sparse_rational().

00221                                                                                                                                        {
00222     return arg_1 / arg_2;
00223   }

static ring<rational, Sparse, DegRevLex> mmx::GLUE_4 ( const scalar_set< rational > &  arg_1,
const tuple< generic > &  arg_2 
) [static]

Definition at line 46 of file glue_ring_sparse_rational.cpp.

References ring_sparse_generic().

00046                                                                           {
00047     return ring_sparse_generic (arg_1, as_vector (arg_2));
00048   }

static ring<integer, Sparse, DegRevLex> mmx::GLUE_4 ( const scalar_set< integer > &  arg_1,
const tuple< generic > &  arg_2 
) [static]

Definition at line 46 of file glue_ring_sparse_integer.cpp.

References ring_sparse_generic().

00046                                                                          {
00047     return ring_sparse_generic (arg_1, as_vector (arg_2));
00048   }

static ring<mmx_floating, Sparse, DegRevLex> mmx::GLUE_4 ( const scalar_set< floating<> > &  arg_1,
const tuple< generic > &  arg_2 
) [static]

Definition at line 46 of file glue_ring_sparse_floating.cpp.

References ring_sparse_generic().

00046                                                                              {
00047     return ring_sparse_generic (arg_1, as_vector (arg_2));
00048   }

static interval<rational> mmx::GLUE_4 ( const interval< rational > &  arg_1,
const interval< rational > &  arg_2 
) [static]

Definition at line 36 of file glue_interval.cpp.

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00036                                                                             {
00037     return arg_1 + arg_2;
00038   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_40 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1,
const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 226 of file glue_ring_sparse_rational.cpp.

00226                                                                                                                                {
00227     return arg_1 % arg_2;
00228   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_40 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1,
const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 226 of file glue_ring_sparse_floating.cpp.

Referenced by glue_ring_sparse_floating(), and glue_ring_sparse_rational().

00226                                                                                                                                        {
00227     return arg_1 % arg_2;
00228   }

static int mmx::GLUE_5 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1  )  [static]

Definition at line 51 of file glue_ring_sparse_rational.cpp.

References size().

00051                                                                     {
00052     return size (arg_1);
00053   }

static int mmx::GLUE_5 ( const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_1  )  [static]

Definition at line 51 of file glue_ring_sparse_integer.cpp.

References size().

00051                                                                    {
00052     return size (arg_1);
00053   }

static int mmx::GLUE_5 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1  )  [static]

Definition at line 51 of file glue_ring_sparse_floating.cpp.

References size().

00051                                                                         {
00052     return size (arg_1);
00053   }

static interval<rational> mmx::GLUE_5 ( const interval< rational > &  arg_1,
const interval< rational > &  arg_2 
) [static]

Definition at line 41 of file glue_interval.cpp.

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00041                                                                             {
00042     return arg_1 - arg_2;
00043   }

static int mmx::GLUE_6 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1  )  [static]

Definition at line 56 of file glue_ring_sparse_rational.cpp.

References degree().

00056                                                                     {
00057     return degree (arg_1);
00058   }

static int mmx::GLUE_6 ( const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_1  )  [static]

Definition at line 56 of file glue_ring_sparse_integer.cpp.

References degree().

00056                                                                    {
00057     return degree (arg_1);
00058   }

static int mmx::GLUE_6 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1  )  [static]

Definition at line 56 of file glue_ring_sparse_floating.cpp.

References degree().

00056                                                                         {
00057     return degree (arg_1);
00058   }

static interval<rational> mmx::GLUE_6 ( const interval< rational > &  arg_1,
const interval< rational > &  arg_2 
) [static]

Definition at line 46 of file glue_interval.cpp.

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00046                                                                             {
00047     return arg_1 * arg_2;
00048   }

static int mmx::GLUE_7 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1  )  [static]

Definition at line 61 of file glue_ring_sparse_rational.cpp.

References nbvar().

00061                                                                     {
00062     return nbvar (arg_1);
00063   }

static int mmx::GLUE_7 ( const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_1  )  [static]

Definition at line 61 of file glue_ring_sparse_integer.cpp.

References nbvar().

00061                                                                    {
00062     return nbvar (arg_1);
00063   }

static int mmx::GLUE_7 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1  )  [static]

Definition at line 61 of file glue_ring_sparse_floating.cpp.

References nbvar().

00061                                                                         {
00062     return nbvar (arg_1);
00063   }

static interval<rational> mmx::GLUE_7 ( const rational &  arg_1,
const interval< rational > &  arg_2 
) [static]

Definition at line 51 of file glue_interval.cpp.

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00051                                                                   {
00052     return arg_1 + arg_2;
00053   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_8 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1  )  [static]

Definition at line 66 of file glue_ring_sparse_rational.cpp.

00066                                                                     {
00067     return -arg_1;
00068   }

static ring<integer, Sparse, DegRevLex>::Polynomial mmx::GLUE_8 ( const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_1  )  [static]

Definition at line 66 of file glue_ring_sparse_integer.cpp.

00066                                                                    {
00067     return -arg_1;
00068   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_8 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1  )  [static]

Definition at line 66 of file glue_ring_sparse_floating.cpp.

00066                                                                         {
00067     return -arg_1;
00068   }

static interval<rational> mmx::GLUE_8 ( const interval< rational > &  arg_1,
const rational &  arg_2 
) [static]

Definition at line 56 of file glue_interval.cpp.

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00056                                                                   {
00057     return arg_1 + arg_2;
00058   }

static ring<rational, Sparse, DegRevLex>::Polynomial mmx::GLUE_9 ( const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_1,
const ring< rational, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 71 of file glue_ring_sparse_rational.cpp.

00071                                                                                                                               {
00072     return arg_1 + arg_2;
00073   }

static ring<integer, Sparse, DegRevLex>::Polynomial mmx::GLUE_9 ( const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_1,
const ring< integer, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 71 of file glue_ring_sparse_integer.cpp.

00071                                                                                                                             {
00072     return arg_1 + arg_2;
00073   }

static ring<mmx_floating, Sparse, DegRevLex>::Polynomial mmx::GLUE_9 ( const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_1,
const ring< mmx_floating, Sparse, DegRevLex >::Polynomial &  arg_2 
) [static]

Definition at line 71 of file glue_ring_sparse_floating.cpp.

00071                                                                                                                                       {
00072     return arg_1 + arg_2;
00073   }

static interval<rational> mmx::GLUE_9 ( const rational &  arg_1,
const interval< rational > &  arg_2 
) [static]

Definition at line 61 of file glue_interval.cpp.

Referenced by glue_ring_sparse_floating(), glue_ring_sparse_integer(), and glue_ring_sparse_rational().

00061                                                                   {
00062     return arg_1 - arg_2;
00063   }

void glue_interval (  ) 

Referenced by glue_realroot().

void glue_kernel (  ) 

Referenced by glue_realroot().

void mmx::glue_realroot (  ) 

Definition at line 22 of file glue_realroot.cpp.

References glue_interval(), glue_kernel(), glue_ring_bernstein_tensor_rational(), glue_ring_dual_rational(), glue_ring_monomial_tensor_floating(), glue_ring_monomial_tensor_integer(), glue_ring_monomial_tensor_rational(), glue_ring_sparse_complex(), glue_ring_sparse_floating(), glue_ring_sparse_integer(), glue_ring_sparse_rational(), glue_solver_univariate_floating(), glue_solver_univariate_integer(), and glue_solver_univariate_rational().

00022                    {
00023     static bool done = false;
00024     if (done) return;
00025     done = true;
00026     register_glue (string ("glue_interval"), (& (glue_interval)));
00027     register_glue (string ("glue_kernel"), (& (glue_kernel)));
00028     register_glue (string ("glue_ring_bernstein_tensor_rational"), (& (glue_ring_bernstein_tensor_rational)));
00029     register_glue (string ("glue_ring_dual_rational"), (& (glue_ring_dual_rational)));
00030     register_glue (string ("glue_ring_monomial_tensor_floating"), (& (glue_ring_monomial_tensor_floating)));
00031     register_glue (string ("glue_ring_monomial_tensor_integer"), (& (glue_ring_monomial_tensor_integer)));
00032     register_glue (string ("glue_ring_monomial_tensor_rational"), (& (glue_ring_monomial_tensor_rational)));
00033     register_glue (string ("glue_ring_sparse_complex"), (& (glue_ring_sparse_complex)));
00034     register_glue (string ("glue_ring_sparse_floating"), (& (glue_ring_sparse_floating)));
00035     register_glue (string ("glue_ring_sparse_integer"), (& (glue_ring_sparse_integer)));
00036     register_glue (string ("glue_ring_sparse_rational"), (& (glue_ring_sparse_rational)));
00037     register_glue (string ("glue_solver_univariate_floating"), (& (glue_solver_univariate_floating)));
00038     register_glue (string ("glue_solver_univariate_integer"), (& (glue_solver_univariate_integer)));
00039     register_glue (string ("glue_solver_univariate_rational"), (& (glue_solver_univariate_rational)));
00040     register_glue (string ("glue_realroot"), (& (glue_realroot)));
00041     dl_link ("numerix");
00042     glue_interval ();
00043     glue_kernel ();
00044     glue_ring_bernstein_tensor_rational ();
00045     glue_ring_dual_rational ();
00046     glue_ring_monomial_tensor_floating ();
00047     glue_ring_monomial_tensor_integer ();
00048     glue_ring_monomial_tensor_rational ();
00049     glue_ring_sparse_complex ();
00050     glue_ring_sparse_floating ();
00051     glue_ring_sparse_integer ();
00052     glue_ring_sparse_rational ();
00053     glue_solver_univariate_floating ();
00054     glue_solver_univariate_integer ();
00055     glue_solver_univariate_rational ();
00056   }

void glue_ring_bernstein_tensor_rational (  ) 

Definition at line 32 of file glue_ring_bernstein_tensor_rational.cpp.

References Polynomial.

Referenced by glue_realroot().

00032                                          {
00033     static bool done = false;
00034     if (done) return;
00035     done = true;
00036     call_glue (string ("glue_int"));
00037     call_glue (string ("glue_basix_vector_generic"));
00038     call_glue (string ("glue_string"));
00039     call_glue (string ("glue_kernel"));
00040     define_type<ring<rational, Sparse, DegRevLex> > (gen (lit ("RingSparseMonomial"), lit ("Rational")));
00041     define_type<Bernstein > (lit ("BernsteinBasis"));
00042     define_constant<Bernstein > ("Bernstein", Bernstein ());
00043     define_type<ring<rational, MonomialTensor>::Polynomial > (gen (lit ("Polynomial"), gen (lit ("RingSparseMonomial"), lit ("Rational"))));
00044   }

void glue_ring_dual_rational (  ) 

Definition at line 31 of file glue_ring_dual_rational.cpp.

Referenced by glue_realroot().

00031                              {
00032     static bool done = false;
00033     if (done) return;
00034     done = true;
00035     call_glue (string ("glue_int"));
00036     call_glue (string ("glue_basix_vector_generic"));
00037     call_glue (string ("glue_string"));
00038     call_glue (string ("glue_kernel"));
00039     call_glue (string ("glue_ring_sparse_rational"));
00040   }

void glue_ring_monomial_tensor_floating (  ) 

Definition at line 31 of file glue_ring_monomial_tensor_floating.cpp.

References Polynomial.

Referenced by glue_realroot().

00031                                         {
00032     static bool done = false;
00033     if (done) return;
00034     done = true;
00035     call_glue (string ("glue_int"));
00036     call_glue (string ("glue_basix_vector_generic"));
00037     call_glue (string ("glue_string"));
00038     call_glue (string ("glue_kernel"));
00039     define_type<ring<mmx_floating, Sparse, DegRevLex> > (gen (lit ("RingSparseMonomial"), lit ("Floating")));
00040     define_type<MonomialTensor > (lit ("MonomialBasis"));
00041     define_constant<MonomialTensor > ("Monomials", MonomialTensor ());
00042     define_type<ring<mmx_floating, Sparse, DegRevLex>::Polynomial > (gen (lit ("Polynomial"), gen (lit ("RingSparseMonomial"), lit ("Floating"))));
00043   }

void glue_ring_monomial_tensor_integer (  ) 

Definition at line 31 of file glue_ring_monomial_tensor_integer.cpp.

References Polynomial.

Referenced by glue_realroot().

00031                                        {
00032     static bool done = false;
00033     if (done) return;
00034     done = true;
00035     call_glue (string ("glue_int"));
00036     call_glue (string ("glue_basix_vector_generic"));
00037     call_glue (string ("glue_string"));
00038     call_glue (string ("glue_kernel"));
00039     define_type<ring<integer, Sparse, DegRevLex> > (gen (lit ("RingSparseMonomial"), lit ("Integer")));
00040     define_type<MonomialTensor > (lit ("MonomialBasis"));
00041     define_constant<MonomialTensor > ("Monomials", MonomialTensor ());
00042     define_type<ring<integer, Sparse, DegRevLex>::Polynomial > (gen (lit ("Polynomial"), gen (lit ("RingSparseMonomial"), lit ("Integer"))));
00043   }

void glue_ring_monomial_tensor_rational (  ) 

Definition at line 31 of file glue_ring_monomial_tensor_rational.cpp.

References Polynomial.

Referenced by glue_realroot().

00031                                         {
00032     static bool done = false;
00033     if (done) return;
00034     done = true;
00035     call_glue (string ("glue_int"));
00036     call_glue (string ("glue_basix_vector_generic"));
00037     call_glue (string ("glue_string"));
00038     call_glue (string ("glue_kernel"));
00039     define_type<ring<rational, Sparse, DegRevLex> > (gen (lit ("RingSparseMonomial"), lit ("Rational")));
00040     define_type<MonomialTensor > (lit ("MonomialBasis"));
00041     define_constant<MonomialTensor > ("Monomials", MonomialTensor ());
00042     define_type<ring<rational, Sparse, DegRevLex>::Polynomial > (gen (lit ("Polynomial"), gen (lit ("RingSparseMonomial"), lit ("Rational"))));
00043   }

void glue_ring_sparse_complex (  ) 

Definition at line 30 of file glue_ring_sparse_complex.cpp.

Referenced by glue_realroot().

00030                               {
00031     static bool done = false;
00032     if (done) return;
00033     done = true;
00034     call_glue (string ("glue_int"));
00035     call_glue (string ("glue_basix_vector_generic"));
00036     call_glue (string ("glue_string"));
00037     call_glue (string ("glue_kernel"));
00038   }

void glue_ring_sparse_floating (  ) 

Definition at line 231 of file glue_ring_sparse_floating.cpp.

References GLUE_1(), GLUE_10(), GLUE_11(), GLUE_12(), GLUE_13(), GLUE_14(), GLUE_15(), GLUE_16(), GLUE_17(), GLUE_18(), GLUE_19(), GLUE_2(), GLUE_20(), GLUE_21(), GLUE_22(), GLUE_23(), GLUE_24(), GLUE_25(), GLUE_26(), GLUE_27(), GLUE_28(), GLUE_29(), GLUE_3(), GLUE_30(), GLUE_31(), GLUE_32(), GLUE_33(), GLUE_34(), GLUE_35(), GLUE_36(), GLUE_37(), GLUE_38(), GLUE_39(), GLUE_4(), GLUE_40(), GLUE_5(), GLUE_6(), GLUE_7(), GLUE_8(), GLUE_9(), and Polynomial.

Referenced by glue_realroot().

00231                                {
00232     static bool done = false;
00233     if (done) return;
00234     done = true;
00235     call_glue (string ("glue_int"));
00236     call_glue (string ("glue_basix_vector_generic"));
00237     call_glue (string ("glue_string"));
00238     call_glue (string ("glue_kernel"));
00239     define_type<ring<mmx_floating, Sparse, DegRevLex> > (gen (lit ("RingSparseMonomial"), lit ("Floating")));
00240     define ("sample", GLUE_1);
00241     define (".[]", GLUE_2);
00242     define (".[]", GLUE_3);
00243     define ("ring", GLUE_4);
00244     define_type<ring<mmx_floating, Sparse, DegRevLex>::Polynomial > (gen (lit ("Polynomial"), gen (lit ("RingSparseMonomial"), lit ("Floating"))));
00245     define ("#", GLUE_5);
00246     define ("degree", GLUE_6);
00247     define ("nbvar", GLUE_7);
00248     define ("-", GLUE_8);
00249     define ("+", GLUE_9);
00250     define ("-", GLUE_10);
00251     define ("*", GLUE_11);
00252     define ("square", GLUE_12);
00253     define ("^", GLUE_13);
00254     define ("diff", GLUE_14);
00255     define ("diff", GLUE_15);
00256     define ("+", GLUE_16);
00257     define ("+", GLUE_17);
00258     define ("-", GLUE_18);
00259     define ("-", GLUE_19);
00260     define ("*", GLUE_20);
00261     define ("*", GLUE_21);
00262     define ("/", GLUE_22);
00263     define ("polynomial", GLUE_23);
00264     define ("polynomial", GLUE_24);
00265     define ("polynomial", GLUE_25);
00266     define ("polynomial", GLUE_26);
00267     define ("<<", GLUE_27);
00268     define ("<<", GLUE_28);
00269     define ("coefficients", GLUE_29);
00270     define ("coefficients", GLUE_30);
00271     define ("monomials", GLUE_31);
00272     define ("homogenize", GLUE_32);
00273     define ("homogenize", GLUE_33);
00274     define ("eval", GLUE_34);
00275     define (".[]", GLUE_35);
00276     define ("sturm_seq", GLUE_36);
00277     define ("resultant", GLUE_37);
00278     define ("/", GLUE_38);
00279     define ("quo", GLUE_39);
00280     define ("rem", GLUE_40);
00281   }

void glue_ring_sparse_integer (  ) 

Definition at line 211 of file glue_ring_sparse_integer.cpp.

References GLUE_1(), GLUE_10(), GLUE_11(), GLUE_12(), GLUE_13(), GLUE_14(), GLUE_15(), GLUE_16(), GLUE_17(), GLUE_18(), GLUE_19(), GLUE_2(), GLUE_20(), GLUE_21(), GLUE_22(), GLUE_23(), GLUE_24(), GLUE_25(), GLUE_26(), GLUE_27(), GLUE_28(), GLUE_29(), GLUE_3(), GLUE_30(), GLUE_31(), GLUE_32(), GLUE_33(), GLUE_34(), GLUE_35(), GLUE_36(), GLUE_4(), GLUE_5(), GLUE_6(), GLUE_7(), GLUE_8(), GLUE_9(), and Polynomial.

Referenced by glue_realroot().

00211                               {
00212     static bool done = false;
00213     if (done) return;
00214     done = true;
00215     call_glue (string ("glue_int"));
00216     call_glue (string ("glue_basix_vector_generic"));
00217     call_glue (string ("glue_string"));
00218     call_glue (string ("glue_kernel"));
00219     define_type<ring<integer, Sparse, DegRevLex> > (gen (lit ("RingSparseMonomial"), lit ("Integer")));
00220     define ("sample", GLUE_1);
00221     define (".[]", GLUE_2);
00222     define (".[]", GLUE_3);
00223     define ("ring", GLUE_4);
00224     define_type<ring<integer, Sparse, DegRevLex>::Polynomial > (gen (lit ("Polynomial"), gen (lit ("RingSparseMonomial"), lit ("Integer"))));
00225     define ("#", GLUE_5);
00226     define ("degree", GLUE_6);
00227     define ("nbvar", GLUE_7);
00228     define ("-", GLUE_8);
00229     define ("+", GLUE_9);
00230     define ("-", GLUE_10);
00231     define ("*", GLUE_11);
00232     define ("square", GLUE_12);
00233     define ("^", GLUE_13);
00234     define ("diff", GLUE_14);
00235     define ("diff", GLUE_15);
00236     define ("+", GLUE_16);
00237     define ("+", GLUE_17);
00238     define ("-", GLUE_18);
00239     define ("-", GLUE_19);
00240     define ("*", GLUE_20);
00241     define ("*", GLUE_21);
00242     define ("polynomial", GLUE_22);
00243     define ("polynomial", GLUE_23);
00244     define ("polynomial", GLUE_24);
00245     define ("polynomial", GLUE_25);
00246     define ("<<", GLUE_26);
00247     define ("<<", GLUE_27);
00248     define ("coefficients", GLUE_28);
00249     define ("coefficients", GLUE_29);
00250     define ("monomials", GLUE_30);
00251     define ("homogenize", GLUE_31);
00252     define ("homogenize", GLUE_32);
00253     define ("eval", GLUE_33);
00254     define (".[]", GLUE_34);
00255     define ("sturm_seq", GLUE_35);
00256     define ("resultant", GLUE_36);
00257   }

void glue_ring_sparse_rational (  ) 

Definition at line 231 of file glue_ring_sparse_rational.cpp.

References GLUE_1(), GLUE_10(), GLUE_11(), GLUE_12(), GLUE_13(), GLUE_14(), GLUE_15(), GLUE_16(), GLUE_17(), GLUE_18(), GLUE_19(), GLUE_2(), GLUE_20(), GLUE_21(), GLUE_22(), GLUE_23(), GLUE_24(), GLUE_25(), GLUE_26(), GLUE_27(), GLUE_28(), GLUE_29(), GLUE_3(), GLUE_30(), GLUE_31(), GLUE_32(), GLUE_33(), GLUE_34(), GLUE_35(), GLUE_36(), GLUE_37(), GLUE_38(), GLUE_39(), GLUE_4(), GLUE_40(), GLUE_5(), GLUE_6(), GLUE_7(), GLUE_8(), GLUE_9(), and Polynomial.

Referenced by glue_realroot().

00231                                {
00232     static bool done = false;
00233     if (done) return;
00234     done = true;
00235     call_glue (string ("glue_int"));
00236     call_glue (string ("glue_basix_vector_generic"));
00237     call_glue (string ("glue_string"));
00238     call_glue (string ("glue_kernel"));
00239     define_type<ring<rational, Sparse, DegRevLex> > (gen (lit ("RingSparseMonomial"), lit ("Rational")));
00240     define ("sample", GLUE_1);
00241     define (".[]", GLUE_2);
00242     define (".[]", GLUE_3);
00243     define ("ring", GLUE_4);
00244     define_type<ring<rational, Sparse, DegRevLex>::Polynomial > (gen (lit ("Polynomial"), gen (lit ("RingSparseMonomial"), lit ("Rational"))));
00245     define ("#", GLUE_5);
00246     define ("degree", GLUE_6);
00247     define ("nbvar", GLUE_7);
00248     define ("-", GLUE_8);
00249     define ("+", GLUE_9);
00250     define ("-", GLUE_10);
00251     define ("*", GLUE_11);
00252     define ("square", GLUE_12);
00253     define ("^", GLUE_13);
00254     define ("diff", GLUE_14);
00255     define ("diff", GLUE_15);
00256     define ("+", GLUE_16);
00257     define ("+", GLUE_17);
00258     define ("-", GLUE_18);
00259     define ("-", GLUE_19);
00260     define ("*", GLUE_20);
00261     define ("*", GLUE_21);
00262     define ("/", GLUE_22);
00263     define ("polynomial", GLUE_23);
00264     define ("polynomial", GLUE_24);
00265     define ("polynomial", GLUE_25);
00266     define ("polynomial", GLUE_26);
00267     define ("<<", GLUE_27);
00268     define ("<<", GLUE_28);
00269     define ("coefficients", GLUE_29);
00270     define ("coefficients", GLUE_30);
00271     define ("monomials", GLUE_31);
00272     define ("homogenize", GLUE_32);
00273     define ("homogenize", GLUE_33);
00274     define ("eval", GLUE_34);
00275     define (".[]", GLUE_35);
00276     define ("sturm_seq", GLUE_36);
00277     define ("resultant", GLUE_37);
00278     define ("/", GLUE_38);
00279     define ("quo", GLUE_39);
00280     define ("rem", GLUE_40);
00281   }

void glue_solver_univariate_floating (  ) 

Definition at line 38 of file glue_solver_univariate_floating.cpp.

Referenced by glue_realroot().

00038                                      {
00039     static bool done = false;
00040     if (done) return;
00041     done = true;
00042     call_glue (string ("glue_kernel"));
00043     call_glue (string ("glue_interval"));
00044     call_glue (string ("glue_ring_monomial_tensor_floating"));
00045   }

void glue_solver_univariate_integer (  ) 

Definition at line 38 of file glue_solver_univariate_integer.cpp.

Referenced by glue_realroot().

00038                                     {
00039     static bool done = false;
00040     if (done) return;
00041     done = true;
00042     call_glue (string ("glue_kernel"));
00043     call_glue (string ("glue_interval"));
00044     call_glue (string ("glue_ring_monomial_tensor_integer"));
00045   }

void glue_solver_univariate_rational (  ) 

Definition at line 38 of file glue_solver_univariate_rational.cpp.

Referenced by glue_realroot().

00038                                      {
00039     static bool done = false;
00040     if (done) return;
00041     done = true;
00042     call_glue (string ("glue_kernel"));
00043     call_glue (string ("glue_interval"));
00044     call_glue (string ("glue_ring_monomial_tensor_rational"));
00045   }

void mmx::HalfExtGCD ( scalar< MPZ > &  gcd,
scalar< MPZ > &  a,
const scalar< MPZ > &  x,
const scalar< MPZ > &  y 
) [inline]

Definition at line 602 of file scalar_integer.hpp.

References scalar< T >::rep().

00604 {
00605     mpz_gcdext(&gcd.rep(), &a.rep(), 0, &x.rep(), &y.rep());
00606 }

bool mmx::has_sign_variation ( const Vector &  t  )  [inline]

Definition at line 90 of file sign_variation.hpp.

References sign_variation_n().

00091 {
00092   return (sign_variation_n(t,t.size(),1)>0);
00093 }

bool mmx::has_sign_variation ( Iterator  b,
Iterator  e 
) [inline]
int mmx::hash ( const set_of< C > &  R  )  [inline]

Definition at line 28 of file set_of.hpp.

00028 { return 1;}

unsigned mmx::hash ( const Seq< C, R > &  v  )  [inline]

Definition at line 199 of file Seq.hpp.

References hash(), and Seq< C, R >::size().

00200 {
00201   register unsigned i, h= 214365, n= v.size();
00202   for (i=0; i<n; i++)
00203       h= (h<<1) ^ (h<<5) ^ (h>>27) ^ hash(v[i]);
00204   return h;
00205 }

unsigned mmx::hash ( const ring< C, Sparse, DegRevLex > &  p  )  [inline]

Definition at line 14 of file ring_sparse_glue.hpp.

00014 { return 1;}

unsigned mmx::hash ( const ring< C, MonomialTensor > &  p  )  [inline]

Definition at line 17 of file ring_monomial_tensor_glue.hpp.

00017 { return 1;}

unsigned mmx::hash ( const MonomialTensor &  p  )  [inline]

Definition at line 15 of file ring_monomial_tensor_glue.hpp.

00017 { return 1;}

unsigned mmx::hash ( const ring< C, Bernstein > &  p  )  [inline]

Definition at line 17 of file ring_bernstein_tensor_glue.hpp.

00017 { return 1;}

unsigned mmx::hash ( const Bernstein &  p  )  [inline]

Definition at line 15 of file ring_bernstein_tensor_glue.hpp.

00017 { return 1;}

unsigned mmx::hash ( const polynomial< C, with< V, W > > &  p  )  [inline]

Definition at line 12 of file polynomial_glue.hpp.

00012 { return 1;}

unsigned mmx::hash ( const ring< C, Dual, DegRevLex > &  p  )  [inline]

Definition at line 11 of file polynomial_dual_glue.hpp.

00011 { return 1;}

unsigned mmx::hash ( const Monomial &  v  ) 

Definition at line 26 of file monomial_glue.hpp.

References hash().

00026                                         {
00027   register unsigned i, h= 214365^hash(v.coeff()), n= v.size();
00028   for (i=0; i<n; i++)
00029       h= (h<<1) ^ (h<<5) ^ (h>>27) ^ hash(v[i]);
00030   return h;
00031 }

mmx::nat mmx::hash ( const interval< C > &  p  )  [inline]

Definition at line 12 of file Interval_glue.hpp.

Referenced by exact_hash(), hash(), and soft_hash().

00012 { return 1;}

polynomial<C, with<Rep,Ord> > mmx::homogenize ( const polynomial< C, with< Rep, Ord > > &  p,
int  i,
const polynomial< C, with< Rep, Ord > > &  v 
) [inline]

Definition at line 153 of file polynomial_fcts.hpp.

References homogenize(), and Polynomial.

00153                                                             {
00154   Polynomial r; homogenize(r.rep(),p.rep(),i,v.rep()); return r;
00155 }

polynomial<C, with<Rep,Ord> > mmx::homogenize ( const polynomial< C, with< Rep, Ord > > &  p,
const polynomial< C, with< Rep, Ord > > &  v 
) [inline]

Definition at line 148 of file polynomial_fcts.hpp.

References Polynomial.

Referenced by GLUE_31(), GLUE_32(), GLUE_33(), and homogenize().

00148                                                      {
00149   Polynomial r; homogenize(r.rep(),p.rep(),v.rep()); return r;
00150 }

Interval<T,r> mmx::hull ( const Interval< T, r > &  a,
const Interval< T, r > &  b 
) [inline]

Definition at line 125 of file Interval_fcts.hpp.

References Interval< T, r >::lower(), mmx::vctops::max(), min(), and Interval< T, r >::upper().

00125                                                        {
00126   return Interval<T,r>( std::min(a.lower(),b.lower()), std::max(a.upper(),b.upper()) );
00127 };

void hull ( Interval< T, r > &  v,
const Interval< T, r > &  a,
const Interval< T, r > &  b 
) [inline]

Definition at line 120 of file Interval_fcts.hpp.

References Interval< T, r >::define(), Interval< T, r >::lower(), mmx::vctops::max(), mmx::vctops::min(), and Interval< T, r >::upper().

00120                                                                          {
00121   v.define( std::min( a.lower(), b.lower() ), std::max( a.upper(), b.upper() ) );
00122 };

bool mmx::in ( const T &  x,
const Interval< T, r > &  y 
) [inline]

Definition at line 100 of file Interval_fcts.hpp.

References Interval< T, r >::lower(), and Interval< T, r >::upper().

Referenced by run_solver().

00101 { return y.lower() <= x && x <= y.upper(); };

bool intersect ( Interval< T, r > &  result,
const Interval< T, r > &  a,
const Interval< T, r > &  b 
) [inline]

Definition at line 140 of file Interval_fcts.hpp.

References Interval< T, r >::define(), intersectp(), lower(), mmx::vctops::max(), mmx::vctops::min(), and upper().

Referenced by interval_newton< INT, CT >::newton_iteration().

00141                                                             {
00142   if ( intersectp( a, b ) )
00143     {
00144       result.define(std::max(lower(a),lower(b)),std::min(upper(a),upper(b)));
00145       return true;
00146     };
00147   return false;
00148 };

Interval<T,r> mmx::intersection ( const Interval< T, r > &  a,
const Interval< T, r > &  b 
) [inline]

Definition at line 135 of file Interval_fcts.hpp.

References lower(), max(), min(), and upper().

00135                                                                {
00136   return Interval<T,r>(std::max(lower(a),lower(b)),std::min(upper(a),upper(b)));
00137 };

bool mmx::intersectp ( const Interval< T, r > &  a,
const Interval< T, r > &  b 
) [inline]

Definition at line 130 of file Interval_fcts.hpp.

References lower(), and upper().

Referenced by intersect().

00130                                                              {
00131   return lower(a) <= upper(b) && lower(b) <= upper(a);
00132 };

interval<C> mmx::interval_from_pair ( const C &  a,
const C &  b 
) [inline]

Definition at line 24 of file Interval_glue.hpp.

References Interval.

Referenced by GLUE_17(), and GLUE_2().

00025   {
00026     return Interval(a,b);
00027   }

C mmx::interval_lower ( const interval< C > &  I  )  [inline]

Definition at line 29 of file Interval_glue.hpp.

References lower().

Referenced by GLUE_14(), and GLUE_29().

00029 {return lower(I);}

C mmx::interval_size ( const interval< C > &  p  )  [inline]

Definition at line 72 of file Interval_glue.hpp.

References lower(), and upper().

00073   {
00074     return upper(p)-lower(p); 
00075   }

C mmx::interval_upper ( const interval< C > &  I  )  [inline]

Definition at line 30 of file Interval_glue.hpp.

References upper().

Referenced by GLUE_15(), and GLUE_30().

00030 {return upper(I);}

void mmx::inv_scale ( IntervalData< RT, Poly > &  ID,
const RT &  a 
) [inline]

Definition at line 248 of file contfrac_intervaldata.hpp.

References IntervalData< RT_, Poly_ >::b, IntervalData< RT_, Poly_ >::d, mmx::univariate::inv_scale(), and IntervalData< RT_, Poly_ >::p.

00249   {
00250     univariate::inv_scale( ID.p, ID.p, a);
00251     ID.b *= a;
00252     ID.d *= a;
00253   }

bool mmx::is_polynomial ( const std::ostringstream &  sm  )  [inline]

Definition at line 465 of file monomial.hpp.

Referenced by print(), and print_as_double().

00465                                                       {
00466     for(unsigned i=1; i<sm.str().length();i++)
00467       if(sm.str()[i]=='+' || (sm.str()[i]=='-' && (i>0 && sm.str()[i-1]=='e'))) return true;
00468     return false;
00469   }

bool mmx::IsEven ( const scalar< MPZ > &  b  )  [inline]

Definition at line 676 of file scalar_integer.hpp.

References scalar< T >::rep().

00676                                           {
00677   return b.rep()._mp_size == 0 || (b.rep()._mp_d[0] ^ ((mp_limb_t) 0));
00678 }

bool mmx::IsMinusOne ( const scalar< MPZ > &  b  )  [inline]

Definition at line 668 of file scalar_integer.hpp.

References scalar< T >::rep().

00668                                               {
00669   return b.rep()._mp_size == -1 && b.rep()._mp_d[0] == 1;
00670 }

bool mmx::IsNegative ( const scalar< MPZ > &  b  )  [inline]

Definition at line 656 of file scalar_integer.hpp.

References scalar< T >::rep().

00656                                               {
00657   return b.rep()._mp_size < 0;
00658 }

bool mmx::IsOdd ( const scalar< MPZ > &  b  )  [inline]

Definition at line 672 of file scalar_integer.hpp.

References scalar< T >::rep().

00672                                          {
00673   return b.rep()._mp_size != 0 && (b.rep()._mp_d[0] & ((mp_limb_t) 1));
00674 }

bool mmx::IsOne ( const scalar< MPZ > &  b  )  [inline]

Definition at line 664 of file scalar_integer.hpp.

References scalar< T >::rep().

00664                                         {
00665   return b.rep()._mp_size == 1 && b.rep()._mp_d[0] == 1;
00666 }

bool mmx::IsPerfectSquare ( const scalar< MPZ > &  b  )  [inline]

Definition at line 680 of file scalar_integer.hpp.

References scalar< T >::rep().

00681 {
00682   return mpz_perfect_square_p(&b.rep());
00683 }

bool mmx::IsPositive ( const scalar< MPZ > &  b  )  [inline]

Definition at line 652 of file scalar_integer.hpp.

References scalar< T >::rep().

00652                                               {
00653   return b.rep()._mp_size > 0;
00654 }

bool mmx::IsProbablyPrime ( const scalar< MPZ > &  b,
int  reps 
) [inline]

Definition at line 685 of file scalar_integer.hpp.

References scalar< T >::rep().

00686 {
00687   return mpz_probab_prime_p(&b.rep(), reps);
00688 }

scalar<MPZ> mmx::isqrt ( const scalar< MPZ > &  a  )  [inline]

Definition at line 726 of file scalar_integer.hpp.

References sqrt().

00726 { return sqrt(a) + 1; }

ZZ mmx::isqrt ( const ZZ &  a  )  [inline]

Definition at line 104 of file GMPXX.hpp.

References sqrt().

00104 { return sqrt(a) + 1; }

bool mmx::IsZero ( const scalar< MPZ > &  b  )  [inline]

Definition at line 660 of file scalar_integer.hpp.

References scalar< T >::rep().

00660                                           {
00661   return b.rep()._mp_size == 0;
00662 }

Seq<C,R>::const_iterator mmx::iterate ( const Seq< C, R > &  m  )  [inline]

Definition at line 210 of file Seq.hpp.

References Seq< C, R >::begin().

00210 {return m.begin();}

Real mmx::knotSum ( Real *  t,
int  k,
int  d 
) [inline]

Definition at line 21 of file solver_uv_bspline.hpp.

References Real.

Referenced by solver_bspline< Real >::first_root().

00022 {
00023   Real ret = t[k+1];
00024   for ( int i=2; i<=d; ++i) ret+=t[k+i];
00025   return ret;
00026 }

scalar<MPZ> mmx::lcm ( const scalar< MPZ > &  a,
const scalar< MPZ > &  b 
) [inline]

Definition at line 717 of file scalar_integer.hpp.

References gcd().

00717 { return (a*b)/gcd(a,b); }

ZZ mmx::lcm ( const ZZ &  a,
const ZZ &  b 
) [inline]

Definition at line 58 of file GMPXX.hpp.

References gcd().

Referenced by mmx::array::lcm_denominator(), and mmx::univariate::numer().

00058 { return (a*b)/gcd(a,b); }

size_t mmx::log ( const scalar< MPZ > &  b,
int  base 
) [inline]

Definition at line 623 of file scalar_integer.hpp.

References assert, and scalar< T >::rep().

00624 {
00625   assert(base >= 2 && base <= 36);
00626   return mpz_sizeinbase(&b.rep(), base);
00627 }

size_t mmx::log ( const scalar< MPZ > &  b  )  [inline]

Definition at line 618 of file scalar_integer.hpp.

References scalar< T >::rep().

00619 {
00620   return mpz_size(&b.rep());
00621 }

size_t mmx::log ( const scalar< MPF > &  b  )  [inline]

Definition at line 506 of file scalar_floating.hpp.

References scalar< T >::rep().

Referenced by mmx::univariate::reciprocal().

00507 {
00508   return mpf_size(&b.rep());
00509 }

T mmx::lower ( const Interval< T, r > &  x  )  [inline]
int mmx::lvar ( const dynamic_exp< E > &  A  )  [inline]

Definition at line 262 of file dynamicexp.hpp.

References dynamic_exp< E >::_size.

Referenced by monom< C, E >::l_variable(), monom< C, E >::nbvar(), and monom< C, E >::nvars().

00262                                     {
00263   int r=A._size-1;
00264   while(r>=0 && (A[r]==0)) r--;
00265   return r;
00266 }

set_of<C> mmx::make_set ( const C &  c  )  [inline]

Definition at line 27 of file set_of.hpp.

00027 { return set_of<C>(); }

scalar<MPQ> mmx::max ( const scalar< MPQ > &  a1,
const scalar< MPQ > &  a2 
) [inline]

Definition at line 535 of file scalar_rational.hpp.

00535 {return (a1>a2?a1:a2);}

scalar< EMPQ > max ( const scalar< EMPZ > &  a1,
const scalar< EMPZ > &  a2 
) [inline]
FT mmx::max_bound ( const POLY &  p,
const Cauchy< FT > &  m 
) [inline]

Definition at line 330 of file univariate_bounds.hpp.

References bound_root().

00331   {
00332     return bound_root(p,m);
00333   }

C mmx::max_value ( Iterator  b,
Iterator  e 
) [inline]

Definition at line 211 of file sign_variation.hpp.

References C, and max().

00212 {
00213   C r = *b;
00214   for (Iterator i=b; i != e; i++)  r = max(r,*i);
00215   return r;
00216 }

void mmx::MCF_positive ( const typename K::Poly &  f,
Seq< typename K::root_t > &  RL,
bool  posneg,
 
) [inline]

Definition at line 360 of file contfrac.hpp.

References IntervalData< RT_, Poly_ >::a, abs(), IntervalData< RT_, Poly_ >::b, bound_root(), IntervalData< RT_, Poly_ >::c, IntervalData< RT_, Poly_ >::d, IntervalData< RT_, Poly_ >::p, Seq< C, R >::push_back(), reverse(), IntervalData< RT_, Poly_ >::s, scale(), shift(), shift_by_1(), sign(), sign_variation(), mmx::sparse::swap(), and to_FIT().

00361     {
00362         //  std::cout << __FUNCTION__ << std::endl; 
00363         typedef typename K::RT    RT;
00364         typedef typename K::FT    FT;
00365         typedef typename K::root_t   FIT;
00366         typedef typename K::Poly  Poly;
00367   
00368         typedef IntervalData< RT, Poly> IntervalData;
00369   
00370         int iters  = 0;
00371         //std::cout <<"Polynomial is "<< f << std::endl;
00372 
00373         FT B = bound_root( f, Cauchy<FT>());
00374         //  std::cout << "Upper bound is "<< B << " Positive or negative " << posneg << std::endl;
00375         unsigned long s = sign_variation( f);
00376         if ( s == 0 ) { return; }
00377         if ( s == 1 ) {
00378             if ( posneg ) RL.push_back( to_FIT( FT(0), B));
00379             else RL.push_back( to_FIT( FT(0), FT(-B)));
00380             return;
00381         }
00382 
00383         Poly X(2, AsSize()); X[1] = RT(1);
00384 
00385         std::stack< IntervalData > S;
00386         if ( posneg) S.push( IntervalData( 1, 0, 0, 1, f, s));
00387         else S.push( IntervalData( -1, 0, 0, 1, f, s));
00388 
00389         IntervalData ID, I1, I2;// ID is the data associated with the parent and
00390         // I1, I2 are the data associated with its children
00391 
00392         RT lowerBound;
00393         FT midpoint; // The point corresponding to the midpoint of the interval 
00394         // with endpoints (a/c), (b/d).
00395         FT temp; // A temporary variable 
00396         unsigned long mult = 0; // multiplicity of an exact root.
00397 
00398         while ( !S.empty() ) {
00399             ++iters;
00400             ID = S.top();
00401             S.pop();
00402             //    std::cout <<"Transformation is " << ID.a << ":" << ID.b << ":"<< ID.c << ":" << ID.d << std::endl;
00403     
00404             // Steps 3 - 4
00405             lowerBound =  CauchyMinimumBound( ID.p);
00406             std::cout << "lower bound is "<< lowerBound << std::endl;
00407     
00408             if(ID.c == 0){// then ID.a is not equal to zero
00409                 midpoint = FT(ID.d * B - ID.b*sign(ID.a), 2* abs(ID.a));
00410                 //std::cout << "Midpoint = " << midpoint << std::endl;
00411             }else if (ID.d > ID.c ){
00412                 midpoint = FT(ID.d, ID.c);
00413             }else{}
00414 
00415             if(midpoint < 1)  midpoint = 1;
00416             std::cout << "Midpoint = " << midpoint << std::endl;
00417     
00418             if(lowerBound >= midpoint){
00419                 if ( lowerBound > 1 ) {
00420                     UPOLDSE::scale( ID.p, ID.p, lowerBound);
00421                     ID.a *= lowerBound;
00422                     ID.c *= lowerBound;
00423                     lowerBound = 1;
00424                 }
00425     
00426                 if ( lowerBound == 1 ) {
00427                     shift_by_1( ID.p, ID.p);// If we scaled above then this is required
00428                     ID.b += ID.a;               // to bring the origin to lowerBound
00429                     ID.d += ID.c;
00430       
00431                     if ( ID.p[0] == RT(0)) {
00432                         RL.push_back( to_FIT( FT( ID.b, ID.d), FT( ID.b, ID.d)));
00433                         ID.p /= X;
00434                     }
00435                     ID.s = sign_variation( ID.p);
00436                     if ( ID.s == 0 ) { continue; }
00437                     if ( ID.s == 1 ) {
00438                         RL.push_back( to_FIT<K>( ID.a, ID.b, ID.c, ID.d, B));
00439                         continue;
00440                     }
00441                 }
00442 
00443                 shift_by_1( I1.p, ID.p);
00444                 I1.a = ID.a;
00445                 I1.b = ID.a + ID.b;
00446                 I1.c = ID.c;
00447                 I1.d = ID.c + ID.d;
00448     
00449                 if (I1.p[0] == RT(0)) {
00450                     RL.push_back( to_FIT( FT( I1.b, I1.d), FT( I1.b, I1.d)));
00451                     I1.p /= X;
00452                     mult = 1;
00453                 }
00454                 I1.s = sign_variation( I1.p);
00455 
00456                 I2.s = ID.s - I1.s - mult;
00457                 I2.a = ID.b;
00458                 I2.b = ID.a + ID.b;
00459                 I2.c = ID.d;
00460                 I2.d = ID.c + ID.d;
00461     
00462                 if ( I2.s > 1 ) {
00463                     //p2 = p2( 1 / (x+1));
00464                     reverse( I2.p, ID.p);
00465                     shift_by_1( I2.p);
00466                 }
00467             }else{// midpoint > lowerbound, so perform subdivision like the Descartes method
00468                 // Construct the polynomial p(X+midpoint)
00469                 //      std::cout << "Performing shift by midpoint " << std::endl;
00470                 UPOLDSE::shift(I1.p, ID.p, RT(midpoint));
00471                 I1.a = ID.a;
00472                 I1.b = ID.a * RT(midpoint) + ID.b;
00473                 I1.c = ID.c;
00474                 I1.d = ID.c * RT(midpoint) + ID.d;
00475                 mult = 0;
00476                 //      std::cout <<"Transformation is " << I1.a << ":" << I1.b << ":"<< I1.c << ":" << I1.d << std::endl;
00477 
00478                 if (I1.p[0] == RT(0)) {
00479                     RL.push_back( to_FIT( FT( I1.b, I1.d), FT( I1.b, I1.d)));
00480                     I1.p /= X;
00481                     mult = 1;
00482                 }
00483                 I1.s = sign_variation( I1.p);
00484 
00485                 I2.a = ID.b;
00486                 I2.b = ID.b + ID.a * RT(midpoint);
00487                 I2.c = ID.d;
00488                 I2.d = ID.d + ID.c * RT(midpoint);
00489                 I2.s = ID.s - I1.s - mult;
00490 
00491                 //      std::cout <<"Transformation is " << I2.a << ":" << I2.b << ":"<< I2.c << ":" << I2.d << std::endl;
00492                 //      std::cout << "Predicted sign variations of I2 " << ID.s - I1.s - mult << std::endl;
00493       
00494                 if( I2.s > 1){// Construct the polynomial (X+1)^n p(midpoint/(X+1))
00495                     //  std::cout << "Before scaling by " << RT(midpoint) << "poly is "<< ID.p << std::endl;
00496                     UPOLDSE::scale( I2.p, ID.p, RT(midpoint));
00497                     //  std::cout << "After scaling poly is "<< I2.p << std::endl;      
00498                     //  std::cout << "Sign variations of I2 " << sign_variation(I2.p) << std::endl;
00499                     reverse(I2.p);
00500                     //  std::cout << "poly is " << I2.p << std::endl;
00501                     shift_by_1(I2.p);
00502                     //  std::cout << "After shift poly is " << I2.p << std::endl;
00503                 }
00504             }// end of else
00505 
00506             if(I2.s > 1){
00507                 if ( I2.p[0] == 0) {//If I2.p[0] = 0 then so is I1.p[0]; so avoid recounting
00508                     I2.p /= X;
00509                 }
00510                 I2.s = sign_variation( I2.p);
00511             }
00512             //    std::cout <<"Sign variations " << I1.s << ":" << I2.s << std::endl;
00513 
00514             if ( I1.s < I2.s ) {
00515                 std::swap( I1, I2);
00516             }
00517     
00518             if ( I1.s == 1 ) {
00519                 RL.push_back( to_FIT<K>( I1.a, I1.b, I1.c, I1.d, B));
00520             } else if ( I1.s > 1) {
00521                 S.push( IntervalData( I1.a, I1.b, I1.c, I1.d, I1.p, I1.s));
00522             }
00523     
00524             if ( I2.s == 1 ) {
00525                 RL.push_back( to_FIT<K>( I2.a, I2.b, I2.c, I2.d, B));
00526             } else if ( I2.s > 1) {
00527                 S.push( IntervalData( I2.a, I2.b, I2.c, I2.d, I2.p, I2.s));
00528             }
00529         } // while
00530         std::cout << "---------------- iters: " << iters << std::endl; 
00531         return;  
00532     }

T mmx::median ( const Interval< T, r > &  x  )  [inline]

Definition at line 91 of file Interval_fcts.hpp.

References lower(), and upper().

Referenced by bissect().

00091 { return (lower(x)+upper(x))/T(2); };

monom<C,E> mmx::MGcd ( const monom< C, E > &  m1,
const monom< C, E > &  m2 
) [inline]

Definition at line 264 of file monomial.hpp.

References Monomial.

00264                                                {
00265   int d = Gcd(m1.coeff(),m2.coeff());
00266   Monomial res(d);
00267   int v = Min(m1.nvars(),m2.nvars());
00268   for (int i = 0; i <= v; ++i)
00269     res.set_expt(i, Min(m1[i],m2[i]));
00270   return res;
00271 }

scalar<MPQ> mmx::min ( const scalar< MPQ > &  a1,
const scalar< MPQ > &  a2 
) [inline]

Definition at line 534 of file scalar_rational.hpp.

00534 {return (a1<a2?a1:a2);}

scalar< EMPQ > min ( const scalar< EMPZ > &  a1,
const scalar< EMPZ > &  a2 
) [inline]
FT mmx::min_bound ( const POLY &  p,
Cauchy< FT >   
) [inline]

Definition at line 337 of file univariate_bounds.hpp.

References bound_root(), degree(), mmx::univariate::degree(), and mmx::univariate::reverse().

00338   {
00339     using univariate::degree;
00340 
00341     POLY f(p);
00342     univariate::reverse(f, degree(p));
00343     FT tmp =  bound_root(f, Cauchy<FT>());
00344     //    let::convert(denominator(tmp), numerator(tmp), texp::As<FT>());
00345     return FT(1)/tmp;
00346   }

C mmx::min_value ( Iterator  b,
Iterator  e 
) [inline]

Definition at line 203 of file sign_variation.hpp.

References C, and min().

00204 {
00205   C r = *b;
00206   for (Iterator i=b; i != e; i++)  r = min(r,*i);
00207   return r;
00208 }

scalar< T > & Mod2Exp ( const scalar< T > &  b,
unsigned long  exponent_of_2 
) [inline]

Definition at line 430 of file scalar.hpp.

References NONRCODE, and NRCODE.

00431 {
00432   NRCODE(r.Mod2Exp(exponent_of_2);)
00433   NONRCODE(scalar<T> r(b); r.Mod2Exp(exponent_of_2); return r;)
00434 }

monom<int> mmx::monomial_from_vector ( const vector< int > &  t  ) 

Definition at line 45 of file monomial_glue.hpp.

References MONOMIAL, and N().

00045                                              {
00046   nat sz=N(t);
00047   MONOMIAL r(1,sz, AsSize());
00048   for(nat i=0;i<sz;i++)
00049     r.set_expt(i,t[i]);
00050   return r;
00051 }

Seq<C,R> mmx::mul ( b,
Seq< C, R >  a 
) [inline]

Definition at line 304 of file Seq.hpp.

References Seq< C, R >::begin(), and Seq< C, R >::end().

00305 {
00306   Seq<C,R> r=a;
00307   for(typename Seq<C,R>::iterator it=r.begin();it!= r.end();++it)
00308     *it= b * *it ;
00309   return r;
00310 }

void mmx::mul ( polynomial< C, with< Rep, Ord > > &  r,
const C &  a,
const polynomial< C, with< Rep, Ord > > &  b 
) [inline]

Definition at line 60 of file polynomial_operators.hpp.

References mul().

00060                                                       {
00061   mul (r.rep (), b.rep (), a); 
00062 }

void mmx::mul ( polynomial< C, with< Rep, Ord > > &  r,
const polynomial< C, with< Rep, Ord > > &  a,
const C &  b 
) [inline]

Definition at line 57 of file polynomial_operators.hpp.

References mul().

00057                                                       {
00058   mul (r.rep (), a.rep (), b); }

void mmx::mul ( polynomial< C, with< Rep, Ord > > &  r,
const polynomial< C, with< Rep, Ord > > &  a,
const polynomial< C, with< Rep, Ord > > &  b 
) [inline]

Definition at line 53 of file polynomial_operators.hpp.

References mul().

00053                                                               {
00054   mul (r.rep (), a.rep (), b.rep ()); 
00055 }

void mmx::mul ( polynomial< C, with< Rep, Ord > > &  r,
const polynomial< C, with< Rep, Ord > > &  a 
) [inline]

Definition at line 49 of file polynomial_operators.hpp.

References mul().

00049                                           {
00050   mul (r.rep (), a.rep () ); 
00051 }

void mmx::mul ( monom< C, E > &  a,
const monom< C, E > &  m1,
const monom< C, E > &  m2 
) [inline]

Definition at line 215 of file monomial.hpp.

References mmx::array::add(), erase(), mmx::vctops::max(), and Scalar.

00215                                                           {
00216    a.coeff() = (m1.coeff()*m2.coeff());
00217    if (a.coeff() !=(typename Monomial::Scalar)0)
00218      {
00219        a.rep().reserve(std::max(m1.rep().size(),m2.rep().size()));
00220        array::add(a.rep(),m1.rep(),m2.rep());
00221      }
00222    else
00223      {
00224        erase(a.rep());
00225      }
00226 }

void mmx::mul ( Interval< C, r > &  x,
const Interval< C, r > &  a,
const Interval< C, r > &  b 
) [inline]

Definition at line 352 of file Interval_fcts.hpp.

References C, interval_base< T,((unsigned) r)%4 >::dwmul(), Interval< T, r >::M, Interval< T, r >::m, mul(), and interval_base< T,((unsigned) r)%4 >::upmul().

00352                                                                         {
00353   if ( &x == &a ) { mul(x,b); return; };
00354   if ( &x == &b ) { mul(x,a); return; };
00355   
00356   if ( a.m > 0 ) 
00357     {
00358       if ( b.m > 0 )
00359         {
00360           x.m = a.dwmul(a.m,b.m);
00361           x.M = a.upmul(a.M,b.M);
00362           return;
00363         };
00364       if ( b.M < 0 ) 
00365         {
00366           x.m = a.dwmul(a.M,b.m);
00367           x.M = a.upmul(a.m,b.M);
00368           return;
00369         };
00370       x.m = a.dwmul(a.M,b.m);
00371       x.M = a.upmul(a.M,b.M);
00372       return;
00373     };
00374   //std::cout << "popo\n";
00375   if ( a.M < 0 )
00376     {
00377       if ( b.m > 0 )
00378         {
00379           x.m = a.dwmul(b.M,a.m);
00380           x.M = a.upmul(b.m,a.M);
00381           return;
00382         };
00383       if ( b.M < 0 )
00384         {
00385           x.m = a.dwmul(a.M,b.M);
00386           x.M = a.upmul(a.m,b.m);
00387           return;
00388         };
00389        x.m = a.dwmul(a.m,b.M);
00390       x.M = a.upmul(a.m,b.m);
00391       return;
00392     };
00393   
00394   if ( b.m > 0 ) 
00395     {
00396       x.m = a.dwmul(a.m,b.M);
00397       x.M = a.upmul(a.M,b.M);
00398       return;
00399     }
00400   if ( b.M < 0 )
00401     {
00402       x.m = a.dwmul(a.M,b.m);
00403       x.M = a.upmul(a.m,b.m);
00404       return;
00405     };
00406   
00407   C m0(a.dwmul(a.M,b.m));
00408   C m1(a.dwmul(a.m,b.M));
00409   if ( m0 > m1 ) m0 = m1;
00410   
00411   C M0(a.upmul(a.M,b.M));
00412   C M1(a.upmul(a.m,b.m));
00413   if ( M0 < M1 ) M0 = M1;
00414   
00415   x.m = m0;
00416   x.M = M0;
00417 };

void mmx::mul ( Interval< C, r > &  a,
const Interval< C, r > &  b 
) [inline]

Definition at line 284 of file Interval_fcts.hpp.

References C, interval_base< T,((unsigned) r)%4 >::dwmul(), Interval< T, r >::M, Interval< T, r >::m, and interval_base< T,((unsigned) r)%4 >::upmul().

00284                                                 {
00285   if ( a.m > 0 ) 
00286     {
00287       if ( b.m > 0 )
00288         {
00289           a.m = a.dwmul(a.m,b.m);
00290           a.M = a.upmul(a.M,b.M);
00291           return;
00292         };
00293       if ( b.M < 0 ) 
00294         {
00295           C sv(a.m);
00296           a.m = a.dwmul(a.M,b.m);
00297           a.M = a.upmul(sv,b.M);
00298           return;
00299         };
00300       a.m = a.dwmul(a.M,b.m);
00301       a.M = a.upmul(a.M,b.M);
00302       return;
00303     };
00304   
00305   if ( a.M < 0 )
00306     {
00307       if ( b.m > 0 )
00308         {
00309           a.m = a.dwmul(b.M,a.m);
00310           a.M = a.upmul(b.m,a.M);
00311           return;
00312         };
00313       if ( b.M < 0 )
00314         {
00315           C sv(a.m);
00316           a.m = a.dwmul(a.M,b.M);
00317           a.M = a.upmul(sv,b.m);
00318           return;
00319         };
00320       C sv(a.m);
00321       a.m = a.dwmul(a.m,b.M);
00322       a.M = a.upmul(sv,b.m);
00323       return;
00324     };
00325   
00326   if ( b.m > 0 ) 
00327     {
00328       a.m = a.dwmul(a.m,b.M);
00329       a.M = a.upmul(a.M,b.M);
00330       return;
00331     }
00332   if ( b.M < 0 )
00333     {
00334       C sv(a.m);
00335       a.m = a.dwmul(a.M,b.m);
00336       a.M = a.upmul(sv,b.m);
00337       return;
00338     };
00339   //  std::cout << "last case X\n";
00340   C m0(a.dwmul(a.M,b.m));
00341   C m1(a.dwmul(a.m,b.M));
00342   if ( m0 > m1 ) m0 = m1;
00343   C M0(a.upmul(a.M,b.M));
00344   C M1(a.upmul(a.m,b.m));
00345   if ( M0 < M1 ) M0 = M1;
00346   a.m = m0;
00347   a.M = M0;
00348 
00349 };

void mmx::mul ( Interval< C, r > &  a,
const C &  x,
const Interval< C, r > &  b 
) [inline]

Definition at line 279 of file Interval_fcts.hpp.

References mul().

00279                                                              { 
00280   mul(a,b,x); };

void mmx::mul ( Interval< C, r > &  a,
const Interval< C, r > &  b,
const C &  x 
) [inline]

Definition at line 264 of file Interval_fcts.hpp.

References interval_base< T,((unsigned) r)%4 >::dwmul(), Interval< T, r >::M, Interval< T, r >::m, mul(), and interval_base< T,((unsigned) r)%4 >::upmul().

00264                                                             {
00265   if ( &a == &b ) { mul(a,x); return; };
00266   if ( x > 0 )
00267     {
00268       a.m = a.dwmul(b.m,x);
00269       a.M = a.upmul(b.M,x);
00270     }
00271   else 
00272     {
00273       a.m = a.dwmul(b.M,x);
00274       a.M = a.dwmul(b.m,x);
00275     };
00276 };

void mmx::mul ( Interval< C, r > &  a,
const C &  x 
) [inline]
scalar< T > & Mul2Exp ( const scalar< T > &  b,
unsigned long  exponent_of_2 
) [inline]

Definition at line 437 of file scalar.hpp.

References NONRCODE, and NRCODE.

00438 {
00439   NRCODE(r.Mul2Exp(exponent_of_2);)
00440   NONRCODE(scalar<T> r(b); r.Mul2Exp(exponent_of_2); return r;)
00441 }

int mmx::N ( const monom< int > &  v  )  [inline]
int mmx::nbvar ( const polynomial< C, with< Rep, Ord > > &  mp  )  [inline]
scalar<T>& mmx::neg ( const scalar< T > &  b  )  [inline]
void mmx::neg ( Interval< C, r > &  a,
const Interval< C, r > &  b 
) [inline]

Definition at line 198 of file Interval_fcts.hpp.

References Interval< T, r >::m, and Interval< T, r >::M.

00199 {
00200   a.M = -b.m;
00201   a.m = -b.M;
00202 };

void mmx::neg ( Interval< C, r > &  a  )  [inline]

Definition at line 190 of file Interval_fcts.hpp.

References C, Interval< T, r >::m, and Interval< T, r >::M.

Referenced by mmx::sparse::mul(), and operator-().

00191 {
00192   C sv(a.M);
00193   a.M = -a.m;
00194   a.m = -sv;
00195 };

bool mmx::neq ( const Seq< C, R > &  v1,
const Seq< C, R > &  v2 
) [inline]

Definition at line 196 of file Seq.hpp.

00196 {return v1!=v2;}

scalar<MPZ> mmx::numerator ( const scalar< MPQ > &  q  )  [inline]

Definition at line 513 of file scalar_rational.hpp.

References scalar< T >::rep().

00513 { scalar<MPZ> r; mpq_get_num(&r.rep(),&q.rep()); return r;}

ZZ mmx::numerator ( const QQ &  a  )  [inline]
bool mmx::operator!= ( const set_of< X > &  r1,
const set_of< X > &  r2 
) [inline]

Definition at line 25 of file set_of.hpp.

00025 { return !(r1==r2); }

bool mmx::operator!= ( const Seq< C, R > &  a,
const Seq< C, R > &  b 
) [inline]

Definition at line 241 of file Seq.hpp.

00241 {return !(a==b);}

bool mmx::operator!= ( const ring< C, Sparse, DegRevLex > &  p,
const ring< C, Sparse, DegRevLex > &  q 
) [inline]

Definition at line 21 of file ring_sparse_glue.hpp.

00021 { return false;}

bool mmx::operator!= ( const ring< C, MonomialTensor > &  p,
const ring< C, MonomialTensor > &  q 
) [inline]

Definition at line 25 of file ring_monomial_tensor_glue.hpp.

00025 { return false;}

bool mmx::operator!= ( const MonomialTensor &  p,
const MonomialTensor &  q 
) [inline]

Definition at line 15 of file ring_monomial_tensor_glue.hpp.

00017 { return 1;}

bool mmx::operator!= ( const ring< C, Bernstein > &  p,
const ring< C, Bernstein > &  q 
) [inline]

Definition at line 25 of file ring_bernstein_tensor_glue.hpp.

00025 { return false;}

bool mmx::operator!= ( const Bernstein &  p,
const Bernstein &  q 
) [inline]

Definition at line 15 of file ring_bernstein_tensor_glue.hpp.

00017 { return 1;}

bool mmx::operator!= ( const polynomial< C, V > &  p,
const X &  q 
) [inline]

Definition at line 181 of file polynomial_operators.hpp.

00181 {return !(p==q);}

bool mmx::operator!= ( const ring< C, Dual, DegRevLex > &  p,
const ring< C, Dual, DegRevLex > &  q 
) [inline]

Definition at line 18 of file polynomial_dual_glue.hpp.

00018 { return false;}

bool mmx::operator!= ( const extended< NT > &  lhs,
const extended< NT > &  rhs 
) [inline]

Definition at line 95 of file extended.hpp.

00096 {
00097     return !(lhs == rhs);
00098 }

scalar<T>& mmx::operator% ( const scalar< T > &  b,
long int  sl 
) [inline]

Definition at line 389 of file scalar.hpp.

References OPCODE.

00389 { OPCODE(b,sl,%=) }

scalar<T>& mmx::operator% ( const scalar< T > &  b,
int  sl 
) [inline]

Definition at line 374 of file scalar.hpp.

References OPCODE.

00374 { OPCODE(b,sl,%=) }

scalar<T>& mmx::operator% ( const scalar< T > &  b,
unsigned  sl 
) [inline]

Definition at line 359 of file scalar.hpp.

References OPCODE.

00359 { OPCODE(b,sl,%=) }

scalar<T>& mmx::operator% ( const scalar< T > &  b,
long  sl 
) [inline]
scalar< T > & operator% ( const scalar< T > &  b,
unsigned long  ul 
) [inline]

Definition at line 328 of file scalar.hpp.

References OPCODE.

00329 {
00330   OPCODE(b,ul,%=)
00331 }

unsigned mmx::operator& ( const bigunsigned< N > &  b,
unsigned  n 
) [inline]

Definition at line 178 of file scalar_bigunsigned.hpp.

00179 {
00180   return b[0] & n;
00181 };

scalar<MPQ> mmx::operator* ( int  a1,
const scalar< MPQ > &  a2 
) [inline]

Definition at line 435 of file scalar_rational.hpp.

00436 {
00437   return a2 * scalar<MPQ>(a1);
00438 }

scalar<MPQ> mmx::operator* ( const scalar< MPQ > &  a2,
int  a1 
) [inline]

Definition at line 429 of file scalar_rational.hpp.

00430 {
00431   return a2 * scalar<MPQ>(a1);
00432 }

scalar<MPQ> mmx::operator* ( const scalar< MPZ > &  a1,
const scalar< MPQ > &  a2 
) [inline]

Definition at line 423 of file scalar_rational.hpp.

00424 {
00425   return a2*scalar<MPQ>(a1);
00426 }

scalar<MPQ> mmx::operator* ( const scalar< MPQ > &  a1,
const scalar< MPZ > &  a2 
) [inline]

Definition at line 418 of file scalar_rational.hpp.

00419 {
00420   return a1*scalar<MPQ>(a2);
00421 }

scalar<MPQ> mmx::operator* ( const scalar< MPQ > &  a1,
const scalar< MPQ > &  a2 
) [inline]

Definition at line 408 of file scalar_rational.hpp.

References scalar< T >::rep().

00409 {
00410   //   static 
00411   scalar<MPQ> result;
00412   // if(mpq_cmp_ui(&a1.rep(),0ul,1ul) && mpq_cmp_ui(&a2.rep(),0ul,1ul))
00413   mpq_mul(&result.rep(), &a1.rep(), &a2.rep());
00414   return result;
00415 }

scalar<MPZ> mmx::operator* ( const scalar< MPZ > &  a1,
const scalar< MPZ > &  a2 
) [inline]

Definition at line 400 of file scalar_integer.hpp.

References scalar< T >::rep().

00401 {
00402   scalar<MPZ> result;
00403   mpz_mul(&result.rep(), &a1.rep(), &a2.rep());
00404   return result;
00405 }

scalar<MPF> mmx::operator* ( const scalar< MPF > &  a1,
const scalar< MPF > &  a2 
) [inline]

Definition at line 404 of file scalar_floating.hpp.

References scalar< T >::rep().

00405 {
00406   scalar<MPF> result;
00407   mpf_mul(&result.rep(), &a1.rep(), &a2.rep());
00408   return result;
00409 }

scalar<EMPQ> mmx::operator* ( const scalar< MPQ > &  a1,
const scalar< EMPQ > &  a2 
) [inline]

Definition at line 258 of file scalar_extended_rational.hpp.

References scalar< T >::rep().

00259 {
00260     scalar<EMPQ> result;
00261     result.rep() = EMPQ(a1) * a2.rep();
00262     return result;
00263 }

scalar<EMPQ> mmx::operator* ( const scalar< EMPQ > &  a1,
const scalar< MPQ > &  a2 
) [inline]

Definition at line 251 of file scalar_extended_rational.hpp.

References scalar< T >::rep().

00252 {
00253     scalar<EMPQ> result;
00254     result.rep() = a1.rep() * EMPQ(a2);
00255     return result;
00256 }

scalar< EMPQ > operator* ( int  a1,
const scalar< EMPZ > &  a2 
) [inline]

Definition at line 272 of file scalar_extended_rational.hpp.

References scalar< T >::rep().

00273 {
00274     scalar<EMPQ> result;
00275     result.rep() = EMPQ(scalar<MPQ>(a1)) * a2.rep();
00276     return result;
00277 }

scalar< EMPQ > operator* ( const scalar< EMPZ > &  a2,
int  a1 
) [inline]

Definition at line 266 of file scalar_extended_rational.hpp.

00267 {
00268     return a2 * scalar<EMPQ>(a1);
00269 }

scalar<EMPZ> mmx::operator* ( const scalar< MPZ > &  a1,
const scalar< EMPZ > &  a2 
) [inline]

Definition at line 239 of file scalar_extended_integer.hpp.

References scalar< T >::rep().

00240 {
00241     scalar<EMPZ> result;
00242     result.rep() = EMPZ(a1) * a2.rep();
00243     return result;
00244 }

scalar<EMPZ> mmx::operator* ( const scalar< EMPZ > &  a1,
const scalar< MPZ > &  a2 
) [inline]

Definition at line 232 of file scalar_extended_integer.hpp.

References scalar< T >::rep().

00233 {
00234     scalar<EMPZ> result;
00235     result.rep() = a1.rep() * EMPZ(a2);
00236     return result;
00237 }

scalar< EMPQ > operator* ( const scalar< EMPZ > &  a1,
const scalar< EMPZ > &  a2 
) [inline]

Definition at line 242 of file scalar_extended_rational.hpp.

References extended< NT_ >::a, extended< NT_ >::b, extended< NT_ >::c, and scalar< T >::rep().

00243 {
00244     scalar<EMPQ> result;
00245     EMPQ v(scalar<MPQ>(a1.rep().a), scalar<MPQ>(a1.rep().b), scalar<MPQ>(a1.rep().c));
00246     result.rep() = v * a2.rep();
00247     return result;
00248 }

scalar<T>& mmx::operator* ( const scalar< T > &  b,
long int  sl 
) [inline]

Definition at line 383 of file scalar.hpp.

References OPCODE.

00383 { OPCODE(b,sl,*=) }

scalar<T>& mmx::operator* ( const scalar< T > &  b,
int  sl 
) [inline]

Definition at line 368 of file scalar.hpp.

References OPCODE.

00368 { OPCODE(b,sl,*=) }

scalar<T>& mmx::operator* ( const scalar< T > &  b,
unsigned  sl 
) [inline]

Definition at line 353 of file scalar.hpp.

References OPCODE.

00353 { OPCODE(b,sl,*=) }

scalar<T>& mmx::operator* ( double  d,
const scalar< T > &  b 
) [inline]
scalar< T > & operator* ( long  sl,
const scalar< T > &  b 
) [inline]

Definition at line 402 of file scalar.hpp.

00403 {
00404   return b * sl;
00405 }

scalar<T>& mmx::operator* ( int  sl,
const scalar< T > &  b 
) [inline]
scalar<T>& mmx::operator* ( const scalar< T > &  b,
long  sl 
) [inline]
scalar< T > & operator* ( unsigned long  ul,
const scalar< T > &  b 
) [inline]

Definition at line 341 of file scalar.hpp.

00342 {
00343   return b * ul;
00344 }

scalar< T > & operator* ( const scalar< T > &  b,
unsigned long  ul 
) [inline]

Definition at line 316 of file scalar.hpp.

References OPCODE.

00317 {
00318   OPCODE(b,ul,*=)
00319 }

monom<C,E> mmx::operator* ( const C &  c2,
const monom< C, E > &  m1 
) [inline]

Definition at line 427 of file monomial.hpp.

00427                                                {
00428   return(m1*c2);
00429 }

monom<C,E> mmx::operator* ( const monom< C, E > &  m1,
const C &  c2 
) [inline]

Definition at line 420 of file monomial.hpp.

References erase(), and Monomial.

00420                                                {
00421   Monomial res(m1);
00422   res.coeff() *= c2;
00423   if (res.coeff() ==0) erase(res.rep());
00424   return (res);
00425 }

monom<C,E> mmx::operator* ( const monom< C, E > &  m1,
const monom< C, E > &  m2 
) [inline]

Definition at line 197 of file monomial.hpp.

References Monomial, and mul().

00197                                                    {
00198   Monomial r; mul(r,m1,m2); return r;
00199 }

interval<C> mmx::operator* ( const C &  c,
const interval< C > &  I 
) [inline]

Definition at line 66 of file Interval_glue.hpp.

References Interval.

00067   {
00068     return Interval(c,c)*I;
00069   }

interval<C> mmx::operator* ( const interval< C > &  I,
const C &  c 
) [inline]

Definition at line 62 of file Interval_glue.hpp.

References Interval.

00063   {
00064     return I* Interval(c,c);
00065   }

texp::sup< Interval<Ca,Na> , typename K::integer >::T mmx::operator* ( const Interval< Ca, Na > &  Ia,
const typename K::integer &  Ib 
) [inline]

Definition at line 703 of file Interval_fcts.hpp.

References mul().

00703                                                                             {
00704   typename texp::sup<ARG0,ARG1>::T res; mul(res,Ia,Ib); return res;
00705 }

texp::sup< Interval<Ca,Na> , Cb >::T mmx::operator* ( const Cb &  Ia,
const Interval< Ca, Na > &  Ib 
) [inline]

Definition at line 682 of file Interval_fcts.hpp.

References mul().

00682                                                                             {
00683   typename texp::sup<ARG0,ARG1>::T res; mul(res,Ib,(typename texp::sup<Ca,Cb>::T)Ia); return res;
00684 }

texp::sup< Interval<Ca,Na> , Cb >::T mmx::operator* ( const Interval< Ca, Na > &  Ia,
const Cb &  Ib 
) [inline]

Definition at line 669 of file Interval_fcts.hpp.

References mul().

00669                                                                             {
00670   typename texp::sup<ARG0,ARG1>::T res; mul(res,Ia,(typename texp::sup<Ca,Cb>::T)Ib); return res;
00671 }

texp::sup< Interval<Ca,Na> , Interval<Cb,Nb> >::T mmx::operator* ( const Interval< Ca, Na > &  Ia,
const Interval< Cb, Nb > &  Ib 
) [inline]

Definition at line 651 of file Interval_fcts.hpp.

References mul().

00651                                                                             {
00652   typename texp::sup<ARG0,ARG1>::T res; mul(res,Ia,Ib); return res;
00653 }

extended<NT> mmx::operator* ( const extended< NT > &  lhs,
const extended< NT > &  rhs 
) [inline]

Definition at line 101 of file extended.hpp.

References extended< NT_ >::a, extended< NT_ >::b, common_root, and extended_check.

00102 {
00103     extended_check(lhs, rhs);
00104     typename extended<NT>::T root = common_root(lhs, rhs);
00105     return extended<NT>(lhs.a * rhs.a + lhs.b * rhs.b * root,
00106                         lhs.a * rhs.b + lhs.b * rhs.a,
00107                         root);
00108 }

extended<NT>& mmx::operator*= ( extended< NT > &  x,
const extended< NT > &  other 
) [inline]

Definition at line 172 of file extended.hpp.

00173 {
00174     x = x * other;
00175     return x;
00176 }

Seq<C,R> mmx::operator+ ( Seq< C, R >  a,
const Seq< C, R > &  b 
) [inline]

Definition at line 275 of file Seq.hpp.

References Seq< C, R >::begin(), Seq< C, R >::end(), and Seq< C, R >::push_back().

00276 {
00277   Seq<C,R> r=a;
00278   for(typename Seq<C,R>::const_iterator it=b.begin();it!= b.end();++it)
00279       r.push_back(*it);
00280   return r;
00281 }

scalar<MPQ> mmx::operator+ ( const scalar< MPQ > &  a1,
const scalar< MPQ > &  a2 
) [inline]

Definition at line 385 of file scalar_rational.hpp.

References scalar< T >::rep().

00386 {
00387   scalar<MPQ> result;
00388   mpq_add(&result.rep(), &a1.rep(), &a2.rep());
00389   //mpq_canonicalize(&result.rep());
00390   return result;
00391 }

scalar<MPZ> mmx::operator+ ( const scalar< MPZ > &  a1,
const scalar< MPZ > &  a2 
) [inline]

Definition at line 378 of file scalar_integer.hpp.

References scalar< T >::rep().

00379 {
00380   scalar<MPZ> result;
00381   mpz_add(&result.rep(), &a1.rep(), &a2.rep());
00382   return result;
00383 }

scalar<MPF> mmx::operator+ ( const scalar< MPF > &  a1,
const scalar< MPF > &  a2 
) [inline]

Definition at line 382 of file scalar_floating.hpp.

References scalar< T >::rep().

00383 {
00384   scalar<MPF> result;
00385   mpf_add(&result.rep(), &a1.rep(), &a2.rep());
00386   return result;
00387 }

scalar< EMPQ > operator+ ( const scalar< EMPZ > &  a1,
const scalar< EMPZ > &  a2 
) [inline]

Definition at line 201 of file scalar_extended_rational.hpp.

References scalar< T >::rep().

00202 {
00203     scalar<EMPQ> result;
00204     result.rep() = a1.rep() + a2.rep();
00205     return result;
00206 }

bigunsigned<N> mmx::operator+ ( const bigunsigned< N > &  b,
unsigned  n 
) [inline]

Definition at line 170 of file scalar_bigunsigned.hpp.

References add().

00171 {
00172   bigunsigned<N> tmp;
00173   tmp = b;
00174   add(tmp,n);
00175   return tmp;
00176 };

scalar<T>& mmx::operator+ ( const scalar< T > &  b,
long int  sl 
) [inline]

Definition at line 377 of file scalar.hpp.

References OPCODE.

00377 { OPCODE(b,sl,+=) }

scalar<T>& mmx::operator+ ( const scalar< T > &  b,
int  sl 
) [inline]

Definition at line 362 of file scalar.hpp.

References OPCODE.

00362 { OPCODE(b,sl,+=) }

scalar<T>& mmx::operator+ ( const scalar< T > &  b,
unsigned  sl 
) [inline]

Definition at line 347 of file scalar.hpp.

References OPCODE.

00347 { OPCODE(b,sl,+=) }

scalar< T > & operator+ ( long  sl,
const scalar< T > &  b 
) [inline]

Definition at line 396 of file scalar.hpp.

00397 {
00398   return b + sl;
00399 }

scalar<T>& mmx::operator+ ( const scalar< T > &  b,
long  sl 
) [inline]
scalar< T > & operator+ ( unsigned long  ul,
const scalar< T > &  b 
) [inline]

Definition at line 335 of file scalar.hpp.

00336 {
00337   return b + ul;
00338 }

scalar< T > & operator+ ( const scalar< T > &  b,
unsigned long  ul 
) [inline]

Definition at line 304 of file scalar.hpp.

References OPCODE.

00305 {
00306   OPCODE(b,ul,+=)
00307 }

monom<C,E> mmx::operator+ ( const monom< C, E > &  m1,
const monom< C, E > &  m2 
) [inline]

Definition at line 381 of file monomial.hpp.

References Monomial.

00381                                                        {
00382   Monomial res(m1);
00383   res.coeff() += m2.coeff();
00384   return (*res);
00385 }

interval<C> mmx::operator+ ( const C &  c,
const interval< C > &  I 
) [inline]

Definition at line 48 of file Interval_glue.hpp.

References Interval.

00049   {
00050     return Interval(c,c)+I;
00051   }

interval<C> mmx::operator+ ( const interval< C > &  I,
const C &  c 
) [inline]

Definition at line 44 of file Interval_glue.hpp.

References Interval.

00045   {
00046     return I+ Interval(c,c);
00047   }

texp::sup< Interval<Ca,Na> , typename K::integer >::T mmx::operator+ ( const Interval< Ca, Na > &  Ia,
const typename K::integer &  Ib 
) [inline]

Definition at line 697 of file Interval_fcts.hpp.

References add().

00697                                                                             {
00698   typename texp::sup<ARG0,ARG1>::T res; add(res,Ia,(Ca)Ib); return res;
00699 }

texp::sup< Interval<Ca,Na> , Cb >::T mmx::operator+ ( const Cb &  Ia,
const Interval< Ca, Na > &  Ib 
) [inline]

Definition at line 676 of file Interval_fcts.hpp.

References add().

00676                                                                             {
00677   typename texp::sup<ARG0,ARG1>::T res; add(res,Ib,(typename texp::sup<Ca,Cb>::T)Ia); return res;
00678 }

texp::sup< Interval<Ca,Na> , Cb >::T mmx::operator+ ( const Interval< Ca, Na > &  Ia,
const Cb &  Ib 
) [inline]

Definition at line 663 of file Interval_fcts.hpp.

References add().

00663                                                                             {
00664   typename texp::sup<ARG0,ARG1>::T res; add(res,Ia,(typename texp::sup<Ca,Cb>::T)Ib); return res;
00665 }

texp::sup< Interval<Ca,Na> , Interval<Cb,Nb> >::T mmx::operator+ ( const Interval< Ca, Na > &  Ia,
const Interval< Cb, Nb > &  Ib 
) [inline]

Definition at line 645 of file Interval_fcts.hpp.

References add().

00645                                                                             {
00646   typename texp::sup<ARG0,ARG1>::T res; add(res,Ia,Ib); return res;
00647 }

extended<NT> mmx::operator+ ( const extended< NT > &  lhs,
const extended< NT > &  rhs 
) [inline]

Definition at line 122 of file extended.hpp.

References extended< NT_ >::a, extended< NT_ >::b, common_root, and extended_check.

00123 {
00124     extended_check(lhs, rhs);
00125     typename extended<NT>::T root = common_root(lhs, rhs);
00126     return extended<NT>(lhs.a + rhs.a,
00127                         lhs.b + rhs.b,
00128                         root);
00129 }

extended<NT>& mmx::operator+= ( extended< NT > &  x,
const extended< NT > &  other 
) [inline]

Definition at line 158 of file extended.hpp.

00159 {
00160     x = x + other;
00161     return x;
00162 }

scalar<MPQ> mmx::operator- ( const scalar< MPQ > &  a1  )  [inline]

Definition at line 402 of file scalar_rational.hpp.

References scalar< T >::rep().

00403 {
00404   scalar<MPQ> r;  mpq_neg(&r.rep(), &a1.rep()); return r;
00405 }

scalar<MPQ> mmx::operator- ( const scalar< MPQ > &  a1,
const scalar< MPQ > &  a2 
) [inline]

Definition at line 394 of file scalar_rational.hpp.

References scalar< T >::rep().

00395 {
00396   scalar<MPQ> result;
00397   mpq_sub(&result.rep(), &a1.rep(), &a2.rep());
00398   //mpq_canonicalize(&result.rep());
00399   return result;
00400 }

scalar<MPZ> mmx::operator- ( const scalar< MPZ > &  a1  )  [inline]

Definition at line 394 of file scalar_integer.hpp.

References scalar< T >::rep().

00395 {
00396   scalar<MPZ> r;  mpz_neg(&r.rep(), &a1.rep()); return r;
00397 }

scalar<MPZ> mmx::operator- ( const scalar< MPZ > &  a1,
const scalar< MPZ > &  a2 
) [inline]

Definition at line 386 of file scalar_integer.hpp.

References scalar< T >::rep().

00387 {
00388    scalar<MPZ> result;
00389    mpz_sub(&result.rep(), &a1.rep(), &a2.rep());
00390    return result;
00391  }

scalar<MPF> mmx::operator- ( const scalar< MPF > &  a1  )  [inline]

Definition at line 398 of file scalar_floating.hpp.

References scalar< T >::rep().

00399 {
00400   scalar<MPF> r;  mpf_neg(&r.rep(), &a1.rep()); return r;
00401 }

scalar<MPF> mmx::operator- ( const scalar< MPF > &  a1,
const scalar< MPF > &  a2 
) [inline]

Definition at line 390 of file scalar_floating.hpp.

References scalar< T >::rep().

00391 {
00392   scalar<MPF> result;
00393   mpf_sub(&result.rep(),&a1.rep(), &a2.rep());
00394   return result;
00395 }

scalar< EMPQ > operator- ( const scalar< EMPZ > &  a1  )  [inline]

Definition at line 217 of file scalar_extended_rational.hpp.

References scalar< T >::rep().

00218 {
00219     scalar<EMPQ> result;
00220     result.rep() = -a1.rep();
00221     return result;
00222 }

scalar< EMPQ > operator- ( const scalar< EMPZ > &  a1,
const scalar< EMPZ > &  a2 
) [inline]

Definition at line 209 of file scalar_extended_rational.hpp.

References scalar< T >::rep().

00210 {
00211     scalar<EMPQ> result;
00212     result.rep() = a1.rep() - a2.rep();
00213     return result;
00214 }

scalar<T>& mmx::operator- ( const scalar< T > &  b,
long int  sl 
) [inline]

Definition at line 380 of file scalar.hpp.

References OPCODE.

00380 { OPCODE(b,sl,-=) }

scalar<T>& mmx::operator- ( const scalar< T > &  b,
int  sl 
) [inline]

Definition at line 365 of file scalar.hpp.

References OPCODE.

00365 { OPCODE(b,sl,-=) }

scalar<T>& mmx::operator- ( const scalar< T > &  b,
unsigned  sl 
) [inline]

Definition at line 350 of file scalar.hpp.

References OPCODE.

00350 { OPCODE(b,sl,-=) }

scalar<T>& mmx::operator- ( const scalar< T > &  b,
long  sl 
) [inline]
scalar< T > & operator- ( const scalar< T > &  b,
unsigned long  ul 
) [inline]

Definition at line 310 of file scalar.hpp.

References OPCODE.

00311 {
00312   OPCODE(b,ul,-=)
00313 }

polynomial<C, with<Rep,Ord> > mmx::operator- ( const polynomial< C, with< Rep, Ord > > &  p  )  [inline]

Definition at line 140 of file polynomial_operators.hpp.

References mul(), and POLYNOMIAL.

00140                                { 
00141   POLYNOMIAL r(p); mul(r.rep(),(typename POLYNOMIAL::value_type)(-1)); return r;
00142 }

monom<C,E> mmx::operator- ( const monom< C, E > &  m1,
const monom< C, E > &  m2 
) [inline]

Definition at line 388 of file monomial.hpp.

References Monomial.

00388                                                       {
00389         Monomial res(m1);
00390         res.coeff() -= m2.coeff();
00391         return (res);
00392 }

interval<C> mmx::operator- ( const C &  c,
const interval< C > &  I 
) [inline]

Definition at line 57 of file Interval_glue.hpp.

References Interval.

00058   {
00059     return Interval(c,c)-I;
00060   }

interval<C> mmx::operator- ( const interval< C > &  I,
const C &  c 
) [inline]

Definition at line 53 of file Interval_glue.hpp.

References Interval.

00054   {
00055     return I- Interval(c,c);
00056   }

texp::sup< Interval<Ca,Na> , typename K::integer >::T mmx::operator- ( const Interval< Ca, Na > &  Ia,
const typename K::integer &  Ib 
) [inline]

Definition at line 700 of file Interval_fcts.hpp.

References sub().

00700                                                                             {
00701   typename texp::sup<ARG0,ARG1>::T res; sub(res,Ia,(Ca)Ib); return res;
00702 }

texp::sup< Interval<Ca,Na> , Cb >::T mmx::operator- ( const Cb &  Ia,
const Interval< Ca, Na > &  Ib 
) [inline]

Definition at line 679 of file Interval_fcts.hpp.

References add().

00679                                                                             {
00680   typename texp::sup<ARG0,ARG1>::T res; add(res,-Ib,(typename texp::sup<Ca,Cb>::T)Ia); return res;
00681 }

texp::sup< Interval<Ca,Na> , Cb >::T mmx::operator- ( const Interval< Ca, Na > &  Ia,
const Cb &  Ib 
) [inline]

Definition at line 666 of file Interval_fcts.hpp.

References sub().

00666                                                                             {
00667   typename texp::sup<ARG0,ARG1>::T res; sub(res,Ia,(typename texp::sup<Ca,Cb>::T)Ib); return res;
00668 }

texp::sup< Interval<Ca,Na> , Interval<Cb,Nb> >::T mmx::operator- ( const Interval< Ca, Na > &  Ia,
const Interval< Cb, Nb > &  Ib 
) [inline]

Definition at line 648 of file Interval_fcts.hpp.

References sub().

00648                                                                             {
00649   typename texp::sup<ARG0,ARG1>::T res; sub(res,Ia,Ib); return res;
00650 }

Interval<C,R> mmx::operator- ( const Interval< C, R > &  I  )  [inline]

Definition at line 639 of file Interval_fcts.hpp.

References neg().

00639                                   {
00640   Interval<C,R> res; neg(res,I); return res;
00641 }

extended<NT> mmx::operator- ( const extended< NT > &  lhs  )  [inline]

Definition at line 142 of file extended.hpp.

References extended< NT_ >::a, extended< NT_ >::b, and extended< NT_ >::c.

00143 {
00144     return extended<NT>(-lhs.a,
00145                         -lhs.b,
00146                         lhs.c);
00147 }

extended<NT> mmx::operator- ( const extended< NT > &  lhs,
const extended< NT > &  rhs 
) [inline]

Definition at line 132 of file extended.hpp.

References extended< NT_ >::a, extended< NT_ >::b, common_root, and extended_check.

00133 {
00134     extended_check(lhs, rhs);
00135     typename extended<NT>::T root = common_root(lhs, rhs);
00136     return extended<NT>(lhs.a - rhs.a,
00137                         lhs.b - rhs.b,
00138                         root);
00139 }

extended<NT>& mmx::operator-= ( extended< NT > &  x,
const extended< NT > &  other 
) [inline]

Definition at line 165 of file extended.hpp.

00166 {
00167     x = x - other;
00168     return x;
00169 }

Seq<C,R> mmx::operator/ ( Seq< C, R >  a,
const C  b 
) [inline]

Definition at line 314 of file Seq.hpp.

References Seq< C, R >::begin(), and Seq< C, R >::end().

00315 {
00316   Seq<C,R> r=a;
00317   for(typename Seq<C,R>::iterator it=r.begin();it!= r.end();++it)
00318     *it= *it / b;
00319   return r;
00320 }

scalar<MPQ> mmx::operator/ ( const scalar< MPQ > &  a1,
const scalar< MPZ > &  a2 
) [inline]

Definition at line 449 of file scalar_rational.hpp.

00450 {
00451   return a1/scalar<MPQ>(a2);
00452 }

scalar<MPQ> mmx::operator/ ( const scalar< MPQ > &  a1,
const scalar< MPQ > &  a2 
) [inline]

Definition at line 441 of file scalar_rational.hpp.

References scalar< T >::rep().

00442 {
00443   scalar<MPQ> result;
00444   mpq_div(&result.rep(), &a1.rep(), &a2.rep());
00445   return result;
00446 }

scalar<MPZ> mmx::operator/ ( const scalar< MPZ > &  a1,
const scalar< MPZ > &  a2 
) [inline]

Definition at line 409 of file scalar_integer.hpp.

References scalar< T >::rep().

00410 {
00411   scalar<MPZ> result;
00412   mpz_div(&result.rep(), &a1.rep(), &a2.rep());
00413   return result;
00414 }

scalar<MPF> mmx::operator/ ( const scalar< MPF > &  a1,
const scalar< MPF > &  a2 
) [inline]

Definition at line 412 of file scalar_floating.hpp.

References scalar< T >::rep().

00413 {
00414   scalar<MPF> result;
00415   mpf_div(&result.rep(), &a1.rep(), &a2.rep());
00416   return result;
00417 }

scalar<EMPQ> mmx::operator/ ( const scalar< EMPQ > &  a1,
const scalar< MPQ > &  a2 
) [inline]

Definition at line 288 of file scalar_extended_rational.hpp.

References scalar< T >::rep().

00289 {
00290     scalar<EMPQ> result;
00291     result.rep() = a1.rep() / EMPQ(a2);
00292     return result;
00293 }

scalar<EMPZ> mmx::operator/ ( const scalar< EMPZ > &  a1,
const scalar< MPZ > &  a2 
) [inline]

Definition at line 269 of file scalar_extended_integer.hpp.

References scalar< T >::rep().

00270 {
00271     scalar<EMPZ> result;
00272     result.rep() = a1.rep() / EMPZ(a2);
00273     return result;
00274 }

scalar< EMPQ > operator/ ( const scalar< EMPZ > &  a1,
const scalar< EMPZ > &  a2 
) [inline]

Definition at line 296 of file scalar_extended_rational.hpp.

References extended< NT_ >::a, extended< NT_ >::b, extended< NT_ >::c, and scalar< T >::rep().

00297 {
00298     scalar<EMPQ> result;
00299     EMPQ v(scalar<MPQ>(a2.rep().a), scalar<MPQ>(a2.rep().b), scalar<MPQ>(a2.rep().c));
00300     result.rep() = a1.rep() / v;
00301     return result;
00302 }

scalar<T>& mmx::operator/ ( const scalar< T > &  b,
long int  sl 
) [inline]

Definition at line 386 of file scalar.hpp.

References OPCODE.

00386 { OPCODE(b,sl,/=) }

scalar<T>& mmx::operator/ ( const scalar< T > &  b,
int  sl 
) [inline]

Definition at line 371 of file scalar.hpp.

References OPCODE.

00371 { OPCODE(b,sl,/=) }

scalar<T>& mmx::operator/ ( const scalar< T > &  b,
unsigned  sl 
) [inline]

Definition at line 356 of file scalar.hpp.

References OPCODE.

00356 { OPCODE(b,sl,/=) }

scalar<T>& mmx::operator/ ( const scalar< T > &  b,
long  sl 
) [inline]
scalar< T > & operator/ ( const scalar< T > &  b,
unsigned long  ul 
) [inline]

Definition at line 322 of file scalar.hpp.

References OPCODE.

00323 {
00324   OPCODE(b,ul,/=)
00325 }

monom<C,E> mmx::operator/ ( const monom< C, E > &  m1,
const C &  c2 
) [inline]

Definition at line 432 of file monomial.hpp.

References erase(), and Monomial.

00432                                                {
00433   Monomial res(m1);
00434   res.coeff() /= c2;
00435   if (res.coeff() ==0) erase(res.rep());
00436   return (res);
00437 }

monom<C,E> mmx::operator/ ( const monom< C, E > &  m1,
const monom< C, E > &  m2 
) [inline]

Definition at line 202 of file monomial.hpp.

References div(), and Monomial.

00202                                                    {
00203   Monomial r; div(r,m1,m2); return r;
00204 }

texp::sup< Interval<Ca,Na> , typename K::integer >::T mmx::operator/ ( const Interval< Ca, Na > &  Ia,
const typename K::integer &  Ib 
) [inline]

Definition at line 706 of file Interval_fcts.hpp.

References div().

00706                                                                             {
00707   typename texp::sup<ARG0,ARG1>::T res; div(res,Ia,Ib); return res;
00708 }

texp::sup< Interval<Ca,Na> , Cb >::T mmx::operator/ ( const Cb &  Ia,
const Interval< Ca, Na > &  Ib 
) [inline]

Definition at line 685 of file Interval_fcts.hpp.

References div().

00685                                                                             {
00686   typename texp::sup<ARG0,ARG1>::T res; div(res,Ib,(typename texp::sup<Ca,Cb>::T)Ia); return res;
00687 }

texp::sup< Interval<Ca,Na> , Cb >::T mmx::operator/ ( const Interval< Ca, Na > &  Ia,
const Cb &  Ib 
) [inline]

Definition at line 672 of file Interval_fcts.hpp.

References div().

00672                                                                             {
00673   typename texp::sup<ARG0,ARG1>::T res; div(res,Ia,(typename texp::sup<Ca,Cb>::T)Ib); return res;
00674 }

texp::sup< Interval<Ca,Na> , Interval<Cb,Nb> >::T mmx::operator/ ( const Interval< Ca, Na > &  Ia,
const Interval< Cb, Nb > &  Ib 
) [inline]

Definition at line 654 of file Interval_fcts.hpp.

References div().

00654                                                                             {
00655   typename texp::sup<ARG0,ARG1>::T res; div(res,Ia,Ib); return res;
00656 }

extended<NT> mmx::operator/ ( const extended< NT > &  lhs,
const extended< NT > &  rhs 
) [inline]

Definition at line 111 of file extended.hpp.

References extended< NT_ >::a, extended< NT_ >::b, extended< NT_ >::c, common_root, denominator(), and extended_check.

00112 {
00113     extended_check(lhs, rhs);
00114     typename extended<NT>::T root = common_root(lhs, rhs);
00115     typename extended<NT>::T denominator = rhs.a * rhs.a - rhs.b * rhs.b * root;
00116     return extended<NT>((lhs.a * rhs.a - lhs.b * rhs.b * lhs.c) / denominator,
00117                         (lhs.b * rhs.a - lhs.a * rhs.b) / denominator,
00118                         root);
00119 }

extended<NT>& mmx::operator/= ( extended< NT > &  x,
const extended< NT > &  other 
) [inline]

Definition at line 179 of file extended.hpp.

00180 {
00181     x = x / other;
00182     return x;
00183 }

bool mmx::operator< ( const extended< NT > &  lhs,
const extended< NT > &  rhs 
) [inline]

Definition at line 186 of file extended.hpp.

References extended< NT_ >::compare().

00187 {
00188     return extended<NT>::compare(lhs, rhs) < 0;
00189 }

std::ostream& mmx::operator<< ( std::ostream &  os,
const Seq< C, R > &  s 
) [inline]

Output operator.

Definition at line 249 of file Seq.hpp.

00250 {
00251   if(s.size()){
00252     typename Seq<C,R>::const_iterator it=s.begin(); os<<*it; ++it;
00253     for( ;it!= s.end();++it) os <<", "<<*it;
00254   }
00255   return os;
00256 }

Seq<C,R>& mmx::operator<< ( Seq< C, R > &  r,
const C &  x 
) [inline]

Definition at line 231 of file Seq.hpp.

References C.

00232 {
00233   r.push_back(x); return r;
00234 }

std::ostream& mmx::operator<< ( std::ostream &  os,
const std::vector< C > &  V 
) [inline]

Definition at line 23 of file Seq.hpp.

References print(), and V.

00024 {
00025     return mmx::array::print(os,V);
00026 }

std::ostream & operator<< ( std::ostream &  os,
const scalar< MPQ > &  b 
) [inline]

Definition at line 473 of file scalar_rational.hpp.

00474 {
00475   mpq_out_str(stdout, 10, &b.rep());  //MP_INT tmp; //mpz_init(&tmp);
00476   return os;       
00477 }

scalar<MPZ> mmx::operator<< ( const scalar< MPZ > &  x,
long int  s 
) [inline]

Definition at line 691 of file scalar_integer.hpp.

References scalar< T >::rep().

00691                                                            {
00692   scalar<MPZ> r; 
00693   if (s >= 0) mpz_mul_2exp (&r.rep(), &x.rep(), s);
00694   else mpz_div_2exp (&r.rep(), &x.rep(), -s);
00695   return r; 
00696 }

std::ostream& mmx::operator<< ( std::ostream &  os,
const scalar< MPZ > &  b 
) [inline]

Definition at line 438 of file scalar_integer.hpp.

00439 {
00440   mpz_out_str(stdout, 10, &b.rep());
00441   return os;
00442 }

std::ostream& mmx::operator<< ( std::ostream &  os,
const scalar< MPF > &  b 
) [inline]

Definition at line 443 of file scalar_floating.hpp.

00444 {
00445   double temp;
00446   temp=mpf_get_d(&b.rep());
00447   os<<temp;
00448   //mpf_out_str(stdout, 10,16,&b.rep()); 
00449   return os;
00450 }

scalar<EMPZ> mmx::operator<< ( const scalar< EMPZ > &  x,
long int  s 
) [inline]

Definition at line 329 of file scalar_extended_integer.hpp.

References extended< NT_ >::a, extended< NT_ >::b, and scalar< T >::rep().

00329                                                              {
00330   scalar<EMPZ> r;
00331   r.rep().a <<= s;
00332   r.rep().b <<= s;
00333   return r;
00334 }

std::ostream & operator<< ( std::ostream &  os,
const scalar< EMPZ > &  b 
) [inline]

Definition at line 321 of file scalar_extended_rational.hpp.

00322 {
00323     os << b.rep().a << " + " << b.rep().b << " * sqrt( " << b.rep().c << " )";
00324     return os;
00325 }

std::ostream& mmx::operator<< ( std::ostream &  o,
const bigunsigned< N > &  bi 
) [inline]

Definition at line 267 of file scalar_bigunsigned.hpp.

References print().

00268 {
00269   print(o,bi);
00270   return o;
00271 };

bigunsigned<N> mmx::operator<< ( const bigunsigned< N > &  b,
unsigned  n 
) [inline]

Definition at line 154 of file scalar_bigunsigned.hpp.

00155 {
00156   bigunsigned<N> tmp = b;
00157   tmp <<= n;
00158   return tmp;
00159 };

std::ostream& mmx::operator<< ( std::ostream &  os,
const polynomial< C, with< Rep, Ord > > &  mp 
) [inline]

Definition at line 57 of file polynomial_fcts.hpp.

References print().

00057                                                   {
00058   print(os, mp.rep(), Polynomial::Ring::vars()); return os;
00059 }

std::ostream& mmx::operator<< ( std::ostream &  os,
const monom< C, E > &  m 
) [inline]

Output operator.

Definition at line 541 of file monomial.hpp.

References print().

00542 {
00543   if (m.coeff() ==0 )    os<<"(0)";
00544   else 
00545     print(os,m);
00546   
00547   return os;
00548 }

std::ostream& mmx::operator<< ( std::ostream &  o,
const Interval< T, r > &  i 
) [inline]

Definition at line 168 of file Interval_fcts.hpp.

00169 {
00170   o << "[" << (i.lower()) << ", " << (i.upper()) << "]";
00171   return o;
00172 };

std::ostream& mmx::operator<< ( std::ostream &  os,
const dynamic_exp< E > &  t 
) [inline]

Definition at line 199 of file dynamicexp.hpp.

00199                                                                      {
00200   bool first=true;
00201   if(t._size)
00202         for (typename dynamic_exp<E>::size_type i = 0; i < t._size; ++i)
00203         {
00204           if (t[i] == 1){
00205                 if(first) first=false; else os <<"*";
00206                 os <<'X'<< i;
00207           }else if (t[i] == 0);
00208           else {
00209                 if(first) first=false; else os <<"*";
00210                 os <<"X"<< i << '^' <<(int)(t[i]);
00211           }
00212         }
00213   return os;
00214 }

scalar<MPZ>& mmx::operator<<= ( scalar< MPZ > &  x,
long int  s 
) [inline]

Definition at line 699 of file scalar_integer.hpp.

00700 {
00701   if (s >= 0) mpz_mul_2exp (&x.rep(), &x.rep(), s);
00702   else mpz_div_2exp (&x.rep(), &x.rep(), -s);
00703   return x; 
00704 }

scalar<EMPZ>& mmx::operator<<= ( scalar< EMPZ > &  x,
long int  s 
) [inline]

Definition at line 337 of file scalar_extended_integer.hpp.

References extended< NT_ >::a, and scalar< T >::rep().

00338 {
00339   x.rep().a <<= s;
00340   x.rep().b <<= s;
00341   return x;
00342 }

extended<NT>& mmx::operator<<= ( extended< NT > &  x,
long int  s 
) [inline]

Definition at line 150 of file extended.hpp.

00151 {
00152     x.a <<= s;
00153     x.b <<= s;
00154     return x;
00155 }

bool mmx::operator<= ( const extended< NT > &  lhs,
const extended< NT > &  rhs 
) [inline]

Definition at line 192 of file extended.hpp.

References extended< NT_ >::compare().

00193 {
00194     return extended<NT>::compare(lhs, rhs) <= 0;
00195 }

bool mmx::operator== ( const set_of< X > &  r1,
const set_of< X > &  r2 
) [inline]

Definition at line 23 of file set_of.hpp.

00023 { return true; }

bool mmx::operator== ( const Seq< C, R > &  a,
const Seq< C, R > &  b 
) [inline]

Definition at line 238 of file Seq.hpp.

References Seq< C, R >::rep().

00239    {return a.rep()==b.rep();}

bool mmx::operator== ( const ring< C, Sparse, DegRevLex > &  p,
const ring< C, Sparse, DegRevLex > &  q 
) [inline]

Definition at line 20 of file ring_sparse_glue.hpp.

00020 { return true;}

bool mmx::operator== ( const ring< C, MonomialTensor > &  p,
const ring< C, MonomialTensor > &  q 
) [inline]

Definition at line 24 of file ring_monomial_tensor_glue.hpp.

00024 { return true;}

bool mmx::operator== ( const MonomialTensor &  p,
const MonomialTensor &  q 
) [inline]

Definition at line 15 of file ring_monomial_tensor_glue.hpp.

00017 { return 1;}

bool mmx::operator== ( const ring< C, Bernstein > &  p,
const ring< C, Bernstein > &  q 
) [inline]

Definition at line 24 of file ring_bernstein_tensor_glue.hpp.

00024 { return true;}

bool mmx::operator== ( const Bernstein &  p,
const Bernstein &  q 
) [inline]

Definition at line 15 of file ring_bernstein_tensor_glue.hpp.

00017 { return 1;}

bool mmx::operator== ( const polynomial< C, with< Rep, Ord > > &  mp,
unsigned  n 
) [inline]

Definition at line 175 of file polynomial_operators.hpp.

References C.

00175                                               {
00176   return mp.rep() == (C)n; 
00177 }

bool mmx::operator== ( const polynomial< C, with< Rep, Ord > > &  mp,
const C &  c 
) [inline]

Definition at line 170 of file polynomial_operators.hpp.

00170                                                {
00171   return mp.rep() == c; 
00172 }

bool mmx::operator== ( const ring< C, Dual, DegRevLex > &  p,
const ring< C, Dual, DegRevLex > &  q 
) [inline]

Definition at line 17 of file polynomial_dual_glue.hpp.

00017 { return true;}

bool mmx::operator== ( const extended< NT > &  lhs,
const extended< NT > &  rhs 
) [inline]

Definition at line 88 of file extended.hpp.

References extended< NT_ >::a, extended< NT_ >::b, and extended_check.

Referenced by bernstein< C >::operator==().

00089 {
00090     extended_check(lhs, rhs);
00091     return lhs.a == rhs.a && lhs.b == rhs.b;
00092 }

bool mmx::operator> ( const extended< NT > &  lhs,
const extended< NT > &  rhs 
) [inline]

Definition at line 198 of file extended.hpp.

References extended< NT_ >::compare().

00199 {
00200     return extended<NT>::compare(lhs, rhs) > 0;
00201 }

bool mmx::operator>= ( const extended< NT > &  lhs,
const extended< NT > &  rhs 
) [inline]

Definition at line 204 of file extended.hpp.

References extended< NT_ >::compare().

00205 {
00206     return extended<NT>::compare(lhs, rhs) >= 0;
00207 }

std::istream& mmx::operator>> ( std::istream &  is,
Seq< C, R > &  V 
) [inline]

Input operator for standard matrices. The input format is of the form s c0 c1 ... where s is the number of elements.

Definition at line 264 of file Seq.hpp.

References Seq< C, R >::rep().

00265 {
00266    typedef typename R::size_type size_type;
00267    size_type s;
00268    is >> s;
00269    V.rep().resize(s);
00270    for(size_type i=0; i< s; ++i) is >> V[i];
00271    return(is);
00272 }

std::istream& mmx::operator>> ( std::istream &  is,
scalar< MPQ > &  b 
) [inline]

Definition at line 489 of file scalar_rational.hpp.

References scalar< T >::rep().

00490 {
00491   std::string s;is >> s;
00492   MP_INT tmp;
00493   mpz_init_set_str(&tmp,s.c_str(), 10);
00494   mpq_init(&b.rep());
00495   mpq_set_z(&b.rep(),&tmp);
00496     return is;          
00497 }

std::istream& mmx::operator>> ( std::istream &  is,
scalar< MPZ > &  b 
) [inline]

Definition at line 454 of file scalar_integer.hpp.

References scalar< T >::rep().

00455 {
00456   std::string s;is >> s;
00457   mpz_init_set_str(&b.rep(),s.c_str(), 10);
00458   return is;
00459 }

std::istream& mmx::operator>> ( std::istream &  is,
scalar< MPF > &  b 
) [inline]

Definition at line 453 of file scalar_floating.hpp.

References scalar< T >::rep().

00454 {
00455   std::string s;is >> s;
00456   mpf_init_set_str(&b.rep(),s.c_str(), 10);
00457   return is;
00458 }

class Ord polynomial<C, with<Rep,Ord> > mmx::operator^ ( const polynomial< C, with< Rep, Ord > > &  a,
unsigned  n 
)

Definition at line 165 of file polynomial_operators.hpp.

References pow().

00165                                            {
00166   return pow (a, n); }

bigunsigned<N> mmx::operator| ( const bigunsigned< N > &  b,
unsigned  n 
) [inline]

Definition at line 162 of file scalar_bigunsigned.hpp.

00163 {
00164   bigunsigned<N> tmp = b;
00165   tmp <<= n;
00166   return tmp;
00167 };

int mmx::Per ( const T &  v  )  [inline]

Per is computing the number of equal consecutive signs -1 to 1.

Definition at line 147 of file sign_variation.hpp.

References sign().

Referenced by Count().

00148 {
00149   typedef typename T::const_iterator iter;
00150   int per=0;
00151   iter it0=v.begin(),it1=it0;++it1;
00152   for(;it1!=v.end();++it0,++it1)
00153   {
00154         if(sign(*it0)*sign(*it1)>0) per++;
00155   }
00156   return (per);
00157 }

polynomial<C, with<Bernstein> > mmx::polynomial_bernstein_tensor ( const ring< C, Bernstein > &  r,
const generic &  s 
) [inline]

Definition at line 105 of file ring_bernstein_tensor_glue.hpp.

References as_charp(), and POLYNOMIAL.

00105                                                                {
00106     return POLYNOMIAL(as_charp(as_mmx(s)));
00107   }

polynomial<C, with<Bernstein> > mmx::polynomial_bernstein_tensor ( const ring< C, Bernstein > &  r,
const string &  s 
) [inline]

Definition at line 100 of file ring_bernstein_tensor_glue.hpp.

References as_charp(), and POLYNOMIAL.

00100                                                               {
00101     return POLYNOMIAL(as_charp(s));
00102   }

polynomial<C, with<Bernstein> > mmx::polynomial_bernstein_tensor ( const ring< C, Bernstein > &  r,
const C &  c,
const int &  d,
const int &  v 
) [inline]

Definition at line 95 of file ring_bernstein_tensor_glue.hpp.

References POLYNOMIAL.

00095                                                                                      {
00096     return POLYNOMIAL(c,d,v);
00097   }

polynomial<C, with<Bernstein> > mmx::polynomial_bernstein_tensor ( const ring< C, Bernstein > &  r,
const C &  c 
) [inline]

Definition at line 90 of file ring_bernstein_tensor_glue.hpp.

References POLYNOMIAL.

00090                                                          {
00091     return POLYNOMIAL(c);
00092   }

vector<generic> mmx::polynomial_bernstein_tensor_coefficients ( const polynomial< C, with< Bernstein > > &  p  )  [inline]

Definition at line 140 of file ring_bernstein_tensor_glue.hpp.

00140                                                                 {
00141     vector<generic> r;
00142    for(unsigned i=0; i< p.size();i++)
00143      r<< as<generic>(p[i]);
00144    return r;
00145   }

vector<generic> mmx::polynomial_bernstein_tensor_coefficients ( const polynomial< C, with< Bernstein > > &  f,
const int &  v 
) [inline]

Definition at line 131 of file ring_bernstein_tensor_glue.hpp.

References coefficients(), and Seq< C, R >::size().

00131                                                                                {
00132     Seq<POLYNOMIAL> l = coefficients(f,v);
00133     vector<generic> r;
00134     for(unsigned i=0; i< l.size(); i++)
00135       r<< as<generic>(l[i]);
00136     return r;
00137   }

polynomial<C, with<Bernstein> > mmx::polynomial_bernstein_tensor_of ( const polynomial< C, with< Sparse, DegRevLex > > &  f  )  [inline]

Definition at line 110 of file ring_bernstein_tensor_glue.hpp.

References convert(), and POLYNOMIAL.

00110                                                                                    {
00111     POLYNOMIAL r;
00112     convert(r.rep(), f.rep());
00113     return r;
00114   }

polynomial<C, with<Dual,DegRevLex> > mmx::polynomial_dual ( const ring< C, Dual, DegRevLex > &  r,
const generic &  s 
) [inline]

Definition at line 69 of file polynomial_dual_glue.hpp.

References as_charp(), and Polynomial.

00069                                                    {
00070     return Polynomial(as_charp(as_mmx(s)));
00071   }

polynomial<C, with<Dual,DegRevLex> > mmx::polynomial_dual ( const ring< C, Dual, DegRevLex > &  rg,
const string &  s 
) [inline]

Definition at line 65 of file polynomial_dual_glue.hpp.

References as_charp(), and Polynomial.

00065                                                    {
00066     return Polynomial(as_charp(s));
00067   }

polynomial<C, with<Dual,DegRevLex> > mmx::polynomial_dual ( const ring< C, Dual, DegRevLex > &  rg,
const C &  c,
int  d,
int  v 
) [inline]

Definition at line 60 of file polynomial_dual_glue.hpp.

References Polynomial.

00060                                                             {
00061     return Polynomial(c,v,d);
00062   }

polynomial<C, with<Dual,DegRevLex> > mmx::polynomial_dual ( const ring< C, Dual, DegRevLex > &  rg,
const C &  c 
) [inline]

Definition at line 55 of file polynomial_dual_glue.hpp.

References Polynomial.

00055                                               {
00056     return Polynomial(c);
00057   }

vector<generic> mmx::polynomial_dual_coefficients ( const polynomial< C, with< Dual, DegRevLex > > &  p  )  [inline]

Definition at line 83 of file polynomial_dual_glue.hpp.

00083                                                     {
00084     typedef typename Polynomial::const_iterator const_iterator;
00085     vector<generic> r;
00086     for(const_iterator it=p.begin(); it!=p.end();it++)
00087      r<< as<generic>(it->coeff());
00088     return r;
00089   }

vector<generic> mmx::polynomial_dual_coefficients ( const polynomial< C, with< Dual, DegRevLex > > &  f,
const int &  v 
) [inline]

Definition at line 74 of file polynomial_dual_glue.hpp.

References coefficients(), and Seq< C, R >::size().

00074                                                                    {
00075     Seq<Polynomial> l = coefficients(f,v);
00076     vector<generic> r;
00077     for(unsigned i=0; i< l.size(); i++)
00078       r<< as<generic>(l[i]);
00079     return r;
00080   }

polynomial<C, with<V,W> > mmx::polynomial_gcd ( const polynomial< C, with< V, W > > &  p,
const polynomial< C, with< V, W > > &  q,
int  v 
) [inline]

Definition at line 68 of file polynomial_glue.hpp.

00069 {
00070 
00071 
00072     return p;
00073 }

polynomial<C, with<V,W> > mmx::polynomial_resultant ( const polynomial< C, with< V, W > > &  p,
const polynomial< C, with< V, W > > &  q,
int  v 
) [inline]

Definition at line 58 of file polynomial_glue.hpp.

References Polynomial, and sub_resultant< PREM >::sequence().

Referenced by GLUE_36(), and GLUE_37().

00059   {
00060     Seq< Seq<Polynomial> >  s = sub_resultant<euclidean>::sequence(p,q,v);
00061 
00062     Polynomial r;
00063     return (s[0])[0];
00064   }

polynomial< C, with<Sparse,DegRevLex> > mmx::polynomial_sparse ( const ring< C, Sparse, DegRevLex > &  r,
const generic &  s 
) [inline]

Definition at line 82 of file ring_sparse_glue.hpp.

References as_charp(), and Polynomial.

00082                                                     {
00083    return Polynomial(as_charp(as_mmx(s)));
00084   }

polynomial< C, with<Sparse,DegRevLex> > mmx::polynomial_sparse ( const ring< C, Sparse, DegRevLex > &  r,
const string &  s 
) [inline]

Definition at line 77 of file ring_sparse_glue.hpp.

References as_charp(), and Polynomial.

00077                                                    {
00078     return Polynomial(as_charp(s));
00079  }

polynomial< C, with<Sparse,DegRevLex> > mmx::polynomial_sparse ( const ring< C, Sparse, DegRevLex > &  r,
const C &  c,
const int &  d,
const int &  v 
) [inline]

Definition at line 73 of file ring_sparse_glue.hpp.

References Polynomial.

00073                                                                           {
00074    return Polynomial(c,d,v);
00075  }

polynomial< C, with<Sparse,DegRevLex> > mmx::polynomial_sparse ( const ring< C, Sparse, DegRevLex > &  r,
const C &  c 
) [inline]

Definition at line 68 of file ring_sparse_glue.hpp.

References Polynomial.

Referenced by GLUE_22(), GLUE_23(), GLUE_24(), GLUE_25(), GLUE_26(), GLUE_27(), and GLUE_28().

00068                                               {
00069     return Polynomial(c);
00070  }

vector<generic> mmx::polynomial_sparse_coefficients ( const polynomial< C, with< Sparse, DegRevLex > > &  p  )  [inline]

Definition at line 96 of file ring_sparse_glue.hpp.

00096                                                      {
00097    typedef typename Polynomial::const_iterator const_iterator;
00098    vector<generic> r;
00099    for(const_iterator it=p.begin(); it!=p.end();it++)
00100      r<< as<generic>(it->coeff());
00101    return r;
00102  }

vector<generic> mmx::polynomial_sparse_coefficients ( const polynomial< C, with< Sparse, DegRevLex > > &  f,
const int &  v 
) [inline]

Definition at line 87 of file ring_sparse_glue.hpp.

References coefficients(), and Seq< C, R >::size().

Referenced by GLUE_28(), GLUE_29(), and GLUE_30().

00087                                                                     {
00088    Seq<Polynomial> l = coefficients(f,v);
00089    vector<generic> r;
00090    for(unsigned i=0; i< l.size(); i++)
00091      r<< as<generic>(l[i]);
00092    return r;
00093  }

generic mmx::polynomial_sparse_eval_generic ( const polynomial< C, with< Sparse, DegRevLex > > &  p,
const vector< generic > &  v 
) [inline]

Definition at line 118 of file ring_sparse_glue.hpp.

Referenced by GLUE_33(), and GLUE_34().

00118                                                                                {
00119   return sparse::eval<generic>(p.rep(),v);
00120  }

vector<generic> mmx::polynomial_sparse_monomials ( const polynomial< C, with< Sparse, DegRevLex > > &  p  )  [inline]

Definition at line 105 of file ring_sparse_glue.hpp.

References C, Monomial, and Polynomial.

Referenced by GLUE_30(), and GLUE_31().

00105                                                   {
00106    typedef typename Polynomial::const_iterator const_iterator;
00107    typedef typename Polynomial::Monomial       Monomial;
00108    vector<generic> r;
00109    for(const_iterator it=p.begin(); it!=p.end();it++){
00110      Monomial m(*it);
00111      m.coeff()= C(1);
00112      r<< as<generic>(Polynomial(m));
00113    }
00114    return r;
00115  }

polynomial<C, with<Sparse,DegRevLex> > mmx::polynomial_sparse_of ( const polynomial< C, with< Bernstein > > &  f  )  [inline]

Definition at line 117 of file ring_bernstein_tensor_glue.hpp.

References convert().

00117                                              {
00118     polynomial<C, with<Sparse,DegRevLex> > r;
00119     convert(r.rep(), f.rep());
00120     return r;
00121   }

vector<generic> mmx::polynomial_sturm_sequence ( const polynomial< C, with< V, W > > &  p,
const polynomial< C, with< V, W > > &  q,
int  v 
) [inline]

Definition at line 30 of file polynomial_glue.hpp.

References coefficients(), sub_resultant< PREM >::sequence(), and Seq< C, R >::size().

Referenced by GLUE_35(), and GLUE_36().

00031   {
00032     vector<generic> res;
00033 
00034     Seq<Polynomial> lp = coefficients(p,v);
00035     vector<generic> vp;
00036     for (unsigned j=0;j<lp.size();j++)
00037       vp << as<generic>(lp[j]);
00038     res << as<generic>(vp);
00039 
00040     Seq<Polynomial> lq = coefficients(q,v);
00041     vector<generic> vq;
00042     for (unsigned j=0;j<lq.size();j++)
00043       vq << as<generic>(lq[j]);
00044     res << as<generic>(vq);
00045     
00046     Seq< Seq<Polynomial> >  s = sub_resultant<euclidean>::sequence(p,q,v);
00047     for(unsigned i=0;i<s.size();i++) {    
00048       Seq<Polynomial> ri = s[s.size()-i-1];
00049       vector<generic> vi;
00050       for (unsigned j=0;j<ri.size();j++)
00051         vi << as<generic>(ri[j]);
00052       res << as<generic>(vi);
00053     }
00054     return res;
00055   } 

polynomial<C, with<MonomialTensor> > mmx::polynomial_tensor ( const ring< C, MonomialTensor > &  r,
const generic &  s 
) [inline]

Definition at line 94 of file ring_monomial_tensor_glue.hpp.

References as_charp(), and POLYNOMIAL.

00094                                                      {
00095     return POLYNOMIAL(as_charp(as_mmx(s)));
00096   }

polynomial<C, with<MonomialTensor> > mmx::polynomial_tensor ( const ring< C, MonomialTensor > &  r,
const string &  s 
) [inline]

Definition at line 89 of file ring_monomial_tensor_glue.hpp.

References as_charp(), and POLYNOMIAL.

00089                                                     {
00090     return POLYNOMIAL(as_charp(s));
00091   }

polynomial<C, with<MonomialTensor> > mmx::polynomial_tensor ( const ring< C, MonomialTensor > &  r,
const C &  c,
const int &  d,
const int &  v 
) [inline]

Definition at line 84 of file ring_monomial_tensor_glue.hpp.

References POLYNOMIAL.

00084                                                                            {
00085     return POLYNOMIAL(c,d,v);
00086   }

polynomial<C, with<MonomialTensor> > mmx::polynomial_tensor ( const ring< C, MonomialTensor > &  r,
const C &  c 
) [inline]

Definition at line 79 of file ring_monomial_tensor_glue.hpp.

References POLYNOMIAL.

00079                                                {
00080     return POLYNOMIAL(c);
00081   }

vector<generic> mmx::polynomial_tensor_coefficients ( const polynomial< C, with< MonomialTensor > > &  p  )  [inline]

Definition at line 122 of file ring_monomial_tensor_glue.hpp.

00122                                                       {
00123     vector<generic> r;
00124    for(unsigned i=0; i< p.size();i++)
00125      r<< as<generic>(p[i]);
00126    return r;
00127   }

vector<generic> mmx::polynomial_tensor_coefficients ( const polynomial< C, with< MonomialTensor > > &  f,
const int &  v 
) [inline]

Definition at line 113 of file ring_monomial_tensor_glue.hpp.

References coefficients(), and Seq< C, R >::size().

00113                                                                      {
00114     Seq<POLYNOMIAL> l = coefficients(f,v);
00115     vector<generic> r;
00116     for(unsigned i=0; i< l.size(); i++)
00117       r<< as<generic>(l[i]);
00118     return r;
00119   }

polynomial<C, with<MonomialTensor> > mmx::polynomial_tensor_of ( const polynomial< C, with< Sparse, DegRevLex > > &  f  )  [inline]

Definition at line 99 of file ring_monomial_tensor_glue.hpp.

References convert(), and POLYNOMIAL.

00099                                                                           {
00100     POLYNOMIAL r;
00101     convert(r.rep(), f.rep());
00102     return r;
00103   } 

polynomial<C, with<MonomialTensor> > mmx::polynomial_tensor_of ( const polynomial< C, with< Bernstein > > &  f  )  [inline]

Definition at line 124 of file ring_bernstein_tensor_glue.hpp.

References convert().

00124                                              {
00125     polynomial<C, with<MonomialTensor> > r;
00126     convert(r.rep(), f.rep());
00127     return r;
00128   }

scalar<MPZ> mmx::pow ( const scalar< MPZ > &  a,
unsigned  n 
) [inline]

Definition at line 719 of file scalar_integer.hpp.

References scalar< T >::rep().

00720 {
00721   scalar<MPZ> r;
00722   mpz_pow_ui(&r.rep(), &a.rep(), n);
00723   return r;
00724 }

scalar< T > pow ( const scalar< T > &  base,
unsigned long  exp 
) [inline]

Definition at line 473 of file scalar.hpp.

References NONRCODE, and NRCODE.

00474 {
00475   NRCODE(r.pow(exp);)
00476   NONRCODE(scalar<T> r(base); r.pow(exp); return r;)
00477 }

monom<C,E> mmx::pow ( const monom< C, E > &  m1,
int  n 
) [inline]

Definition at line 275 of file monomial.hpp.

References Monomial.

00275                                {
00276   Monomial res(m1);
00277   for (int i = 0; i <= m1.nvars(); ++i)
00278     res.set_expt(i,m1[i]*n);
00279   return res;
00280 }

ZZ mmx::pow ( const ZZ &  a,
unsigned  n 
) [inline]

Definition at line 98 of file GMPXX.hpp.

00099     {
00100       mpz_class r;
00101       mpz_pow_ui(r.get_mpz_t(), a.get_mpz_t(), n);
00102       return r;
00103     }

T pow ( const T &  a,
int  i 
) [inline]

Definition at line 15 of file polynomial_fcts.hpp.

References assert.

Referenced by binomial(), interval_rep< POL >::contract_box(), mmx::tensor::contraction(), mmx::sparse::convert(), Eps(), flatten(), GLUE_13(), BezierBound::lower_bound(), mmx::array::norm(), operator^(), mmx::tensor::print_flatten(), euclidean::pseudo_div(), mmx::univariate::reciprocal(), mmx::sparse::scale(), scale(), sub_resultant< PREM >::sequence(), solver< C, ProjRd< MTH > >::set_precision(), and mmx::sparse::subs().

00015                            {
00016     assert(i>=0);
00017     if(i == 1) return a;
00018     if(i > 0)
00019       {
00020         if (a == T(1))  return a;
00021         if (a == T(-1)) return (i % 2  == 0) ? T(1) : T(-1);
00022         T y(a);
00023         T z(1);
00024         unsigned int n = i;
00025         unsigned int m;
00026         while (n > 0) {
00027           m = n / 2;
00028           if (n %2 )
00029             {
00030               z *= y;
00031             }
00032           y = y * y;
00033           n = m;
00034         }
00035         return z;
00036       }
00037     return T(1);
00038   }

T mmx::pow2 ( int  i  )  [inline]

Definition at line 31 of file univariate_bounds.hpp.

References assert.

00032   {
00033     assert(i>=0);
00034     if(i == 1) return 2;
00035     if(i > 0)
00036     {
00037       T y(2);
00038       T z(1);
00039       unsigned int n = i;
00040       unsigned int m;
00041       while (n > 0) {
00042         m = n / 2;
00043         if (n %2 )
00044           {
00045             z *= y;
00046           }
00047         y = y * y;
00048         n = m;
00049       }
00050       return z;
00051     }
00052     return T(1);
00053   }

scalar< T > & PowMod ( const scalar< T > &  b,
unsigned long  exp,
const scalar< T > &  m 
) [inline]

Definition at line 451 of file scalar.hpp.

References NONRCODE, and NRCODE.

00452 {
00453   NRCODE(r.PowMod(exp, m);)
00454   NONRCODE(scalar<T> r(b); r.PowMod(exp,m); return r;)
00455 }

scalar< T > & PowMod ( const scalar< T > &  b,
const scalar< T > &  exp,
const scalar< T > &  m 
) [inline]

Definition at line 444 of file scalar.hpp.

References NONRCODE, and NRCODE.

00445 {
00446   NRCODE(r.PowMod(exp, m);)
00447   NONRCODE(scalar<T> r(b); r.PowMod(exp,m); return r;)
00448 }

void mmx::Precision ( scalar< MPF > &  b,
unsigned long  l 
) [inline]

Set the precision for MPZ. This precision is not the precision of the result of operations on this number.

Definition at line 473 of file scalar_floating.hpp.

References scalar< T >::rep().

00474 {
00475   mpf_set_prec(&b.rep(),l);
00476 }

void mmx::Precision ( RR  b,
unsigned long  l 
) [inline]

Set the precision for RR. This precision is not the precision of the result of operations on this number.

Definition at line 121 of file GMPXX.hpp.

00122 {
00123     mpf_set_prec(b.get_mpf_t(),l);
00124 
00125     }

void Precision ( unsigned long  l  )  [inline]

Set the default precision for the MPZ numbers. This is not the precision of the results of operations on these numbers, because of error propagations.

Definition at line 465 of file scalar_floating.hpp.

00466 {
00467    mpf_set_default_prec(l);
00468 }

void mmx::print ( OSTREAM &  os,
const scalar< MPQ > &  b 
) [inline]

Definition at line 484 of file scalar_rational.hpp.

References as_charp().

00484                                          {
00485   os<<as_charp(b);
00486 }

void mmx::print ( OSTREAM &  os,
const scalar< MPZ > &  b 
) [inline]

Definition at line 449 of file scalar_integer.hpp.

References as_charp().

00449                                          {
00450     os << as_charp(b);
00451 }

void mmx::print ( OSTREAM &  os,
const scalar< EMPZ > &  b 
) [inline]

Definition at line 300 of file scalar_extended_integer.hpp.

References extended< NT_ >::a, extended< NT_ >::b, extended< NT_ >::c, and scalar< T >::rep().

00300                                           {
00301     os << b.rep().a << " + " << b.rep().b << " * sqrt( " << b.rep().c << " )";
00302 }

void mmx::print ( std::ostream &  o,
const bigunsigned< N > &  bi 
) [inline]

Definition at line 258 of file scalar_bigunsigned.hpp.

References reverse(), and rprint().

00259 {
00260   bigunsigned<N> tmp;
00261   reverse(tmp,bi);
00262   rprint(o,tmp);
00263   
00264 };

void mmx::print ( OSTREAM &  os,
double  x 
) [inline]

Definition at line 16 of file print.hpp.

00016 { os<<x;}

void mmx::print ( OSTREAM &  os,
unsigned  x 
) [inline]

Definition at line 15 of file print.hpp.

00015 { os<<x;}

void mmx::print ( OSTREAM &  os,
long int  x 
) [inline]

Definition at line 14 of file print.hpp.

00014 { os<<x;}

void mmx::print ( OSTREAM &  os,
int  x 
) [inline]

Definition at line 13 of file print.hpp.

00013 { os<<x;}

OSTREAM& mmx::print ( OSTREAM &  os,
const polynomial< C, with< Rep, Ord > > &  mp,
const variables &  Var 
) [inline]

Definition at line 67 of file polynomial_fcts.hpp.

References print().

00067                                                                {
00068   print(os,mp.rep(),Var); return os;
00069 }

OSTREAM& mmx::print ( OSTREAM &  os,
const polynomial< C, with< Rep, Ord > > &  mp 
) [inline]

Definition at line 62 of file polynomial_fcts.hpp.

References print().

00062                                          {
00063   print(os,mp.rep()); return os;
00064 }

OSTREAM& mmx::print ( OSTREAM &  os,
const monom< C, E > &  m,
const variables &  V = variables::default_ 
) [inline]

Definition at line 473 of file monomial.hpp.

References C, is_polynomial(), print(), print_pp(), and V.

00474                                                {
00475   if (m.coeff() == C(0) )
00476     os<<"0";
00477   else {
00478     int i=m.nvars();
00479     while(i> -1 && m[i]==0) i--;
00480     if(i<0)
00481       print(os,m.coeff());
00482     else {
00483       if(m.coeff() != (C)1) {
00484         if(m.coeff()==(C)-1) 
00485           { os << "-"; }
00486         else 
00487           {  
00488             std::ostringstream sm;
00489             print(sm,m.coeff()); 
00490             bool is_pol = is_polynomial(sm);
00491             if (is_pol) os <<"+(";
00492             os<<sm.str();
00493             if (is_pol) os <<")";
00494             os <<"*"; 
00495           }
00496       }
00497       print_pp(os,m,V);
00498     }
00499   }
00500   return os;
00501 }

void mmx::print ( OSTREAM &  os,
const Interval< T, r > &  a 
) [inline]

Definition at line 135 of file Interval.hpp.

Referenced by as_string(), operator<<(), print(), and print_as_double().

00135                                            {
00136   //os<<"[";print(os,a.lower());os<<",";mmx::print(os,a.upper());os<<"]";
00137 }

OSTREAM& mmx::print_as_double ( OSTREAM &  os,
const monom< C, E > &  m,
const variables &  V = variables::default_ 
) [inline]

Definition at line 506 of file monomial.hpp.

References as_double(), C, is_polynomial(), print(), print_pp(), and V.

00507                                                {
00508   if (m.coeff() == C(0) )
00509     os<<"0";
00510   else {
00511     int i=m.nvars();
00512     while(i> -1 && m[i]==0) i--;
00513     if(i<0)
00514       print(os,as_double(m.coeff()));
00515     else {
00516       if(m.coeff() != (C)1) {
00517         if(m.coeff()==(C)-1) 
00518           { os << "-"; }
00519         else 
00520           {  
00521             std::ostringstream sm;
00522             print(sm,as_double(m.coeff())); 
00523             bool is_pol = is_polynomial(sm);
00524             if (is_pol) os <<"+(";
00525             os<<sm.str();
00526             if (is_pol) os <<")";
00527             os <<"*"; 
00528           }
00529       }
00530       print_pp(os,m,V);
00531     }
00532   }
00533   return os;
00534 }

OSTREAM& mmx::print_pp ( OSTREAM &  os,
const monom< C, E > &  m,
const variables &  V 
) [inline]

Definition at line 444 of file monomial.hpp.

Referenced by print(), and print_as_double().

00444                                                                 { 
00445     bool first=true;
00446     for (typename E::size_type i = 0; i < m.rep().size(); ++i)
00447       {
00448         if (m[i] !=0)
00449           {
00450             if(first) {
00451               first =false;
00452             } else {
00453               os<<'*';
00454             }
00455             os << V[i];
00456             if (m[i] != 1) {
00457               os << '^' <<m[i];
00458             }
00459           }
00460       }
00461     return os;
00462   }

const ShapeForeachContainer<T>* mmx::qForeachContainer ( const ShapeForeachContainerBase *  base,
const T *   
) [inline]

Definition at line 395 of file Seq.hpp.

00395                                                                                                                                  { 
00396     return static_cast<const ShapeForeachContainer<T> *>(base) ;
00397 }

ShapeForeachContainer<T> mmx::qForeachContainerNew ( const T &  t  )  [inline]

Definition at line 391 of file Seq.hpp.

00391                                                                                        {
00392     return ShapeForeachContainer<T>(t) ; 
00393 }

T* mmx::qForeachpointer ( const T &   )  [inline]

Definition at line 387 of file Seq.hpp.

00387                                                            { 
00388     return 0 ; 
00389 }

scalar<T> mmx::quo ( const scalar< T > &  dividend,
const scalar< T > &  divisor 
) [inline]

Definition at line 480 of file scalar.hpp.

References NONRCODE, and NRCODE.

00481 {
00482   NRCODE(r.quo(divisor);)
00483   NONRCODE(scalar<T> r(dividend); r.quo(divisor); return r;)
00484 }

scalar< T > quo ( const scalar< T > &  dividend,
unsigned long  divisor 
) [inline]

Definition at line 487 of file scalar.hpp.

References NONRCODE, and NRCODE.

00488 {
00489   NRCODE(r.quo(divisor);)
00490   NONRCODE(scalar<T> r(dividend); r.quo(divisor); return r;)
00491 }

unsigned long mmx::QuoRem ( scalar< MPZ > &  q,
scalar< MPZ > &  r,
const scalar< MPZ > &  divdend,
unsigned long  divisor 
) [inline]

Definition at line 577 of file scalar_integer.hpp.

References scalar< T >::rep().

00578 {
00579   return mpz_mdivmod_ui(&q.rep(), &r.rep(), &divdend.rep(), divisor);
00580 }

void mmx::QuoRem ( scalar< MPZ > &  q,
scalar< MPZ > &  r,
const scalar< MPZ > &  divdend,
const scalar< MPZ > &  divisor 
) [inline]

Definition at line 571 of file scalar_integer.hpp.

References scalar< T >::rep().

00572 {
00573   mpz_mdivmod(&q.rep(), &r.rep(), &divdend.rep(), &divisor.rep());
00574 }

scalar<MPZ> mmx::rceil ( const scalar< MPQ > &  q  )  [inline]

Definition at line 516 of file scalar_rational.hpp.

References rfloor().

00516 { return rfloor(q)+1; }

scalar<MPZ> mmx::rceil ( const scalar< MPZ > &  q  )  [inline]

Definition at line 520 of file scalar_integer.hpp.

References rfloor().

00520 { return rfloor(q)+1; }

double mmx::rceil ( double  x  )  [inline]

Definition at line 536 of file scalar.hpp.

References ceil().

00536 { return ceil(x); }

const C& mmx::read ( const Seq< C, R > &  m,
unsigned  i 
) [inline]

Definition at line 191 of file Seq.hpp.

References C.

00191 { return m[i]; }

void mmx::reciprocal ( polynomial< C, with< Rep, Ord > > &  f,
const int &  v 
) [inline]

Inplace reciprocal w.r.t. variable v

Definition at line 228 of file polynomial_fcts.hpp.

Referenced by box_rep< POL >::restrict(), box_rep< POL >::reverse_and_shift_box(), and box_rep< POL >::reverse_box().

00228                                             { 
00229   reciprocal( f.rep(), v ); 
00230 }

unsigned long rem ( const scalar< T > &  b,
unsigned long  divisor 
) [inline]

Definition at line 508 of file scalar.hpp.

References scalar< T >::rem().

00509 {
00510   scalar<T> r(b);
00511   return r.rem(divisor);
00512 }

scalar< T > & rem ( const scalar< T > &  dividend,
const scalar< T > &  divisor 
) [inline]

Definition at line 494 of file scalar.hpp.

References NONRCODE, and NRCODE.

00495 {
00496   NRCODE(r.rem(divisor);)
00497   NONRCODE(scalar<T> r(dividend); r.rem(divisor); return r;)
00498 }

void mmx::rem ( polynomial< C, with< Rep, Ord > > &  r,
const polynomial< C, with< Rep, Ord > > &  a,
const polynomial< C, with< Rep, Ord > > &  b 
) [inline]
const R& mmx::rep ( const shared_object< R > &  r  )  [inline]

Allows us to access to the data when we use shared object.

Definition at line 192 of file shared_object.hpp.

References R.

00192 {return *r;}

R& mmx::rep ( shared_object< R > &  r  )  [inline]

Allows us to access to the data when we use shared object.

Definition at line 188 of file shared_object.hpp.

References R.

00188 {return *r;}

const R& mmx::rep ( const R &  r  )  [inline]

Allows us to access to the data when we don't use shared object.

Definition at line 184 of file shared_object.hpp.

References R.

00184 {return r;}

R& mmx::rep ( R &  r  )  [inline]
void mmx::reverse ( bigunsigned< N > &  r,
const bigunsigned< N > &  lu 
) [inline]

Definition at line 230 of file scalar_bigunsigned.hpp.

References N(), and hdwi< hardware_int >::reverse().

00231 {
00232   typedef typename bigunsigned<N>::hdwi_t hdwi_t;
00233   for ( unsigned i = 0; i < N/2; i ++ )
00234     {
00235       r[i] = numerics::hdwi<hdwi_t>::reverse(lu[N-1-i]);
00236       r[N-1-i] = numerics::hdwi<hdwi_t>::reverse(lu[i]);
00237     };
00238   if ( N & 1 ) r[N/2] = numerics::hdwi<hdwi_t>::reverse(lu[N/2]);
00239 };

void mmx::reverse ( IntervalData< RT, Poly > &  I1  )  [inline]
void mmx::reverse ( Poly &  R  )  [inline]

Definition at line 146 of file contfrac_intervaldata.hpp.

References degree().

00147   { 
00148     int deg = degree(R);
00149     Poly temp(R);
00150     for (int i = 0; i <= deg; ++i)
00151       R[i] = temp[deg-i];
00152   }

void mmx::reverse ( Poly &  R,
const Poly &  P 
) [inline]
void mmx::reverse_shift ( IntervalData< RT, Poly > &  I2,
const IntervalData< RT, Poly > &  ID 
) [inline]

Definition at line 286 of file contfrac_intervaldata.hpp.

References IntervalData< RT_, Poly_ >::a, IntervalData< RT_, Poly_ >::b, IntervalData< RT_, Poly_ >::c, IntervalData< RT_, Poly_ >::d, IntervalData< RT_, Poly_ >::p, reverse(), IntervalData< RT_, Poly_ >::s, shift_by_1(), and sign_variation().

00287   {
00288     I2.a = ID.b;
00289     I2.b = ID.a + ID.b;
00290     I2.c = ID.d;
00291     I2.d = ID.c + ID.d;
00292     I2.p= ID.p;
00293     reverse(I2);
00294     shift_by_1(I2);
00295     I2.s = sign_variation(I2.p);
00296   }

void mmx::reverse_shift_homography ( IntervalData< RT, Poly > &  I2,
const IntervalData< RT, Poly > &  ID 
) [inline]

Definition at line 276 of file contfrac_intervaldata.hpp.

References IntervalData< RT_, Poly_ >::a, IntervalData< RT_, Poly_ >::b, IntervalData< RT_, Poly_ >::c, and IntervalData< RT_, Poly_ >::d.

Referenced by continued_fraction_subdivision< K >::solve_homography().

00277   {
00278     I2.a = ID.b;
00279     I2.b = ID.a + ID.b;
00280     I2.c = ID.d;
00281     I2.d = ID.c + ID.d;
00282   }

scalar<MPZ> mmx::rfloor ( const scalar< MPQ > &  q  )  [inline]

Definition at line 515 of file scalar_rational.hpp.

References denominator(), and numerator().

00515 { scalar<MPZ> r=numerator(q); r/=denominator(q); return r; }

scalar<MPZ> mmx::rfloor ( const scalar< MPZ > &  q  )  [inline]

Definition at line 519 of file scalar_integer.hpp.

00519 { return q; }

double mmx::rfloor ( double  x  )  [inline]

Definition at line 535 of file scalar.hpp.

References floor().

Referenced by solver_cffirst< Real, POL >::first_root_floor(), and rceil().

00535 { return floor(x); }

ring<C,Bernstein> mmx::ring_bernstein_extend_generic ( const ring< C, Bernstein > &  R,
const vector< generic > &  s 
) [inline]

Definition at line 74 of file ring_bernstein_tensor_glue.hpp.

References as_charp(), N(), nbvar(), and POLYNOMIAL.

00074                                                                          {
00075     int nv= RING::nbvar();
00076     for(nat j=0;j<N(s);j++) 
00077       R[nv+j] = POLYNOMIAL( as_charp(as_mmx(s[j])) );
00078     return R;
00079   }

ring<C,Bernstein> mmx::ring_bernstein_generic ( const scalar_set< C > &  rg,
const Bernstein &  b,
const vector< generic > &  s 
) [inline]

Definition at line 67 of file ring_bernstein_tensor_glue.hpp.

References as_charp(), N(), and RING.

00067                                                                                                  {
00068     string v;
00069     for(nat i=0;i<N(s);i++) v <<" "<<as_mmx(s[i]);
00070     return RING(as_charp(v));
00071   }

ring<C,Bernstein> mmx::ring_bernstein_of ( const ring< C, Sparse, DegRevLex > &  r  )  [inline]

Definition at line 56 of file ring_bernstein_tensor_glue.hpp.

References ring< C, B, O >::nbvar(), and RING.

00056                                                            {
00057     std::string v;
00058     for(int i=0; i<r.nbvar(); i++) {
00059       v += ring<C, Sparse, DegRevLex >::var[i];
00060       if(i<r.nbvar()-1) v +=" ";
00061     }
00062     return RING(v.data());;
00063   }

ring<C,Bernstein> mmx::ring_bernstein_string ( const scalar_set< C > &  rg,
const vector< string > &  s 
) [inline]

Definition at line 38 of file ring_bernstein_tensor_glue.hpp.

References as_charp(), N(), and RING.

00038                                                                           {
00039     string v;
00040     for(nat i=0;i<N(s);i++)   v <<" "<<s[i];
00041     return RING(as_charp(v));
00042   }

ring<C, Sparse,DegRevLex > mmx::ring_sparse_extend_generic ( const ring< C, Sparse, DegRevLex > &  R,
const vector< generic > &  s 
) [inline]

Definition at line 45 of file ring_sparse_glue.hpp.

References as_charp(), N(), nbvar(), and Polynomial.

Referenced by GLUE_2().

00045                                                                                 {
00046     int nv= RING::nbvar();
00047     for(nat j=0;j<N(s);j++) 
00048       R[nv+j] = Polynomial(as_charp(as_mmx(s[j])));
00049     return R;
00050   }

ring<C, Sparse,DegRevLex > mmx::ring_sparse_generic ( const scalar_set< C > &  rg,
const vector< generic > &  s 
) [inline]

Definition at line 39 of file ring_sparse_glue.hpp.

References as_charp(), N(), and RING.

Referenced by GLUE_3(), and GLUE_4().

00039                                                                          {
00040     string v;
00041     for(nat i=0;i<N(s);i++) v <<" "<<as_mmx(s[i]);
00042     return RING(as_charp(v));
00043   }

polynomial<C, with<Sparse, DegRevLex> > mmx::ring_sparse_of ( const polynomial< C, with< MonomialTensor > > &  f  )  [inline]

Definition at line 106 of file ring_monomial_tensor_glue.hpp.

References convert(), and POLYNOMIAL.

00106                                        {
00107     POLYNOMIAL r;
00108     convert(r.rep(), f.rep());
00109     return r;
00110   }

ring<C, Sparse,DegRevLex > mmx::ring_sparse_string ( const scalar_set< C > &  rg,
const vector< string > &  s 
) [inline]

Definition at line 32 of file ring_sparse_glue.hpp.

References as_charp(), N(), and RING.

00032                                                                        {
00033     string v;
00034     for(nat i=0;i<N(s);i++)   v <<" "<<s[i];
00035     return RING(as_charp(v));
00036   }

ring<C, MonomialTensor > mmx::ring_tensor_extend_generic ( const ring< C, MonomialTensor > &  R,
const vector< generic > &  s 
) [inline]

Definition at line 63 of file ring_monomial_tensor_glue.hpp.

References as_charp(), N(), nbvar(), and POLYNOMIAL.

00063                                                                                 {
00064     int nv= RING::nbvar();
00065     for(nat j=0;j<N(s);j++) 
00066       R[nv+j] = POLYNOMIAL(as_charp(as_mmx(s[j])));
00067     return R;
00068   }

ring<C, MonomialTensor > mmx::ring_tensor_generic ( const scalar_set< C > &  rg,
const MonomialTensor &  b,
const vector< generic > &  s 
) [inline]

Definition at line 56 of file ring_monomial_tensor_glue.hpp.

References as_charp(), N(), and RING.

00057                                               {
00058     string v;
00059     for(nat i=0;i<N(s);i++) v <<" "<<as_mmx(s[i]);
00060     return RING(as_charp(v));
00061   }

ring<C, MonomialTensor > mmx::ring_tensor_of ( const ring< C, Sparse, DegRevLex > &  r  )  [inline]

Definition at line 43 of file ring_monomial_tensor_glue.hpp.

References ring< C, B, O >::nbvar(), and RING.

00043                                                                  {
00044     typedef ring<C, Sparse, DegRevLex>  SparseRing;
00045     std::string v;
00046     for(int i=0; i<r.nbvar(); i++) {
00047       v +=SparseRing::var[i];
00048       if(i<r.nbvar()-1) v +=" ";
00049     }
00050     return RING(v.data());;
00051   }

ring<C,Bernstein> mmx::ring_tensor_of ( const ring< C, Bernstein > &  r  )  [inline]

Definition at line 45 of file ring_bernstein_tensor_glue.hpp.

References ring< C, Bernstein >::nbvar(), and RING.

00045                                                 {
00046     typedef ring<C, Bernstein >  Ring;
00047     std::string v;
00048     for(int i=0; i<r.nbvar(); i++) {
00049       v += Ring::var[i];
00050       if(i<r.nbvar()-1) v +=" ";
00051     }
00052     return RING(v.data());;
00053   }

ring<C, MonomialTensor > mmx::ring_tensor_string ( const scalar_set< C > &  rg,
const vector< string > &  s 
) [inline]

Definition at line 37 of file ring_monomial_tensor_glue.hpp.

References as_charp(), N(), and RING.

00037                                                                        {
00038     string v;
00039     for(nat i=0;i<N(s);i++)   v <<" "<<s[i];
00040     return RING(as_charp(v));
00041   }

void mmx::rprint ( std::ostream &  o,
bigunsigned< N > &  bu 
) [inline]

Definition at line 251 of file scalar_bigunsigned.hpp.

References N(), and rprint().

00252 {
00253   for ( unsigned i = 0; i < N; i ++ )
00254     rprint(o,bu[i]);
00255 };

void mmx::rprint ( std::ostream &  o,
unsigned  n 
) [inline]

Definition at line 241 of file scalar_bigunsigned.hpp.

Referenced by print(), and rprint().

00242 {
00243   for ( unsigned b = 0; b < numerics::hdwi<unsigned>::nbit; b ++ )
00244     {
00245         o << ( n& 1);
00246         n >>= 1;
00247     };
00248 };

void mmx::run_solver ( int  argc,
char **  argv 
) [inline]

Definition at line 18 of file solver_run.hpp.

References Seq< C, R >::begin(), degree(), Seq< C, R >::end(), in(), max(), N(), POL, mmx::xml::print(), mmx::xml::read(), and solve().

00018                                         {                                                       
00019     double total=0,start,end;                             
00020     
00021     using std::cout;
00022     using std::endl;
00023     using std::string;
00024     
00025     int N=0;
00026     bool verbose=true;
00027     for(int i=0;i<argc;i++)
00028       if (string(argv[i]) == string("-h")) {                                 
00029           std::cout<<"Usage: "<<argv[0]<<" file [-h|-q|-v|-prec]\n"
00030                    <<" -q      : quiet computation\n"
00031                    <<" -v      : verbose computation\n"
00032                    <<" -prec N : precision of result with N digits"
00033                    <<std::endl;
00034         return;                                                   
00035       } else if (string(argv[i]) == string("-v"))                 
00036         verbose=true;                                               
00037       else if (string(argv[i]) == string("-q"))                   
00038         verbose=false;                                               
00039       else if (string(argv[i]) == string("-prec"))
00040         N = atoi(argv[i+1]);                                        
00041     
00042     std::ifstream in(argv[1],std::ios::in);
00043     if(!in.good()) {                                    
00044       std::cout<<"file: "<<argv[1]<<std::endl;
00045       return;                                 
00046     }
00047     std::string s;
00048     typedef POL upol_t;                          
00049     Seq<POL>  L;                         
00050     POL p;
00051     int nbp=0;
00052     int deg=0;
00053     variables Vr("x");
00054     while(xml::read(in,p,Vr) && (N==0 || nbp < N)) {
00055       L<<p;                            
00056       deg= std::max(deg,degree(p));              
00057       nbp++;
00058     }
00059     int nr=0;
00060     for(typename Seq<POL>::const_iterator it = L.begin(); it != L.end(); ++it) {
00061       if(verbose) {        
00062         xml::print(std::cout,*it,"polynomial")<<std::endl;
00063         typename SLV::Solutions sol;
00064         if(N>0) SLV::set_precision(N);
00065         SLV::solve(sol,*it);
00066         nr+= sol.size();                       
00067         xml::print(std::cout,sol,"solution")<<std::endl;
00068       } else { 
00069         typename SLV::Solutions sol;
00070         start = clock();
00071         SLV::solve(sol,*it);
00072         end = clock();  total += (end - start);
00073         nr+= sol.size();
00074       }
00075     }
00076     cout << "<nb_pol>" <<  nbp << "</nb_pol>";
00077     cout << "<degree>" <<  deg << "</degree>";
00078     cout << "<nb_root>" <<nr<<"</nb_root>";
00079     if(!verbose) {
00080       cout << "<time>" << (total / CLOCKS_PER_SEC) << "</time> ";
00081       cout << "<speed>" << int(nr/(total / CLOCKS_PER_SEC)) << "</speed>";
00082     }
00083     std::cout<<std::endl;
00084   }

C mmx::sample ( const ring< C, Sparse, O > &  R  )  [inline]

Definition at line 82 of file ring_sparse.hpp.

References C.

00082 { return (C)0; }

C mmx::sample ( const ring< C, Dual, O > &  rg  )  [inline]

Definition at line 70 of file ring_dual.hpp.

References C.

00070 { return (C)0;} 

C mmx::sample ( const ring< C, B, O > &  R  )  [inline]

Function which returns an element of the ring (here 0).

Definition at line 70 of file ring.hpp.

References C.

Referenced by GLUE_1().

00070 { return (C)0; }

void mmx::scale ( IntervalData< RT, Poly > &  ID,
long  k 
) [inline]

Definition at line 237 of file contfrac_intervaldata.hpp.

References IntervalData< RT_, Poly_ >::a, IntervalData< RT_, Poly_ >::c, IntervalData< RT_, Poly_ >::p, pow(), and mmx::univariate::scale().

00238   {
00239     RT a = pow( RT( 2), k);
00240     
00241     univariate::scale( ID.p, ID.p, a);
00242     ID.a *= a;
00243     ID.c *= a;
00244   }

void mmx::scale ( IntervalData< RT, Poly > &  ID,
const RT2 &  a 
) [inline]

Definition at line 229 of file contfrac_intervaldata.hpp.

References IntervalData< RT_, Poly_ >::a, IntervalData< RT_, Poly_ >::c, IntervalData< RT_, Poly_ >::p, and mmx::univariate::scale().

00230   {
00231       univariate::scale( ID.p, ID.p, a);
00232       ID.a *= a;
00233       ID.c *= a;
00234   }

void mmx::scale ( IntervalData< RT, Poly > &  ID,
const RT &  a 
) [inline]
void mmx::shift ( polynomial< C, with< Rep, Ord > > &  r,
const polynomial< C, with< Rep, Ord > > &  p,
int  d,
int  v = 0 
) [inline]

Inplace shift p by degree d in variable v

Definition at line 222 of file polynomial_fcts.hpp.

References shift().

00222                                                              { 
00223   shift( r.rep(), p.rep(), d, v ); 
00224 }

void mmx::shift ( polynomial< C, with< Rep, Ord > > &  f,
const C &  t,
const int &  v 
) [inline]

Inplace shift by t in variable v

Definition at line 216 of file polynomial_fcts.hpp.

References shift().

00216                                                     { 
00217   shift( f.rep(), t, v ); 
00218 }

void mmx::shift ( IntervalData< RT, Poly > &  ID,
const RT2 &  a 
) [inline]
void mmx::shift ( IntervalData< RT, Poly > &  ID,
const RT &  a 
) [inline]
void mmx::shift_by_1 ( Poly &  R  )  [inline]

Definition at line 207 of file contfrac_intervaldata.hpp.

References degree().

00209   {
00210     long deg = degree( R);
00211     for (int j = deg-1; j >= 0; j--) {
00212       for (int i = j; i < deg; i++) {
00213         R[i] +=  R[i+1]; 
00214       }
00215     }
00216     return; 
00217   }

void mmx::shift_by_1 ( IntervalData< RT, Poly > &  I1  )  [inline]
void mmx::shift_by_1 ( IntervalData< RT, Poly > &  I1,
const IntervalData< RT, Poly > &  I2 
) [inline]

Definition at line 184 of file contfrac_intervaldata.hpp.

References IntervalData< RT_, Poly_ >::a, IntervalData< RT_, Poly_ >::b, IntervalData< RT_, Poly_ >::c, IntervalData< RT_, Poly_ >::d, IntervalData< RT_, Poly_ >::p, IntervalData< RT_, Poly_ >::s, shift_by_1(), and sign_variation().

00185   {
00186     shift_by_1(I1.p,I2.p);
00187     I1.a = I2.a;
00188     I1.b = I2.a + I2.b;
00189     I1.c = I2.c;
00190     I1.d = I2.c + I2.d;
00191     I1.s = sign_variation(I1.p);
00192     return; 
00193   }

void mmx::shift_by_1 ( Poly &  R,
const Poly &  P 
) [inline]

Definition at line 168 of file contfrac_intervaldata.hpp.

References degree().

Referenced by CF_positive(), MCF_positive(), reverse_shift(), shift_by_1(), and continued_fraction_subdivision< K >::solve_homography().

00169   {
00170     R=P;
00171     int deg = degree(P);
00172     for (int j = deg-1; j >= 0; j--) {
00173       for (int i = j; i < deg; i++) {
00174         R[i] +=  R[i+1];
00175       }
00176 
00177     }
00178     
00179     return;
00180   }

int mmx::sign ( const scalar< MPZ > &  b  )  [inline]

Definition at line 629 of file scalar_integer.hpp.

References scalar< T >::rep().

00630 {
00631   if (b.rep()._mp_size == 0)
00632     return 0;
00633   else
00634     return b.rep()._mp_size > 0 ? 1 : -1;
00635 }

int mmx::sign ( const scalar< MPF > &  b  )  [inline]

Definition at line 511 of file scalar_floating.hpp.

References scalar< T >::rep().

00512 {
00513   return mpf_sgn(&b.rep());
00514 }

int sign ( const T &  x  )  [inline]

Definition at line 17 of file sign_variation.hpp.

00018 {
00019   return ( x < T(0) ? -1 : (T(0) < x ? 1 : 0) );
00020 }

int sign ( const QQ &  a  )  [inline]
int mmx::sign_of ( const Vector &  t  )  [inline]

Definition at line 97 of file sign_variation.hpp.

00097                               {
00098   int i;
00099   for (i=0; (i<t.size() && t[i]==0); i++) ;
00100   if(i==t.size()) return 0;
00101 
00102   bool ng;
00103   for (ng=(t[i]<=0); i<t.size(); i++) 
00104     if(ng !=(t[i]<=0)) return 0;
00105   
00106   return (ng?-1:1);
00107 }

unsigned mmx::sign_variation ( const C *  t,
unsigned  size,
unsigned  maxv 
) [inline]

Definition at line 134 of file sign_variation.hpp.

References sign_variation().

00135 { return sign_variation(t,t+size,maxv); };

unsigned mmx::sign_variation ( const C *  t,
unsigned  size 
) [inline]

Definition at line 130 of file sign_variation.hpp.

References sign_variation().

00131 { return sign_variation(t,t+size); };

unsigned mmx::sign_variation ( const C(&)  t[N],
unsigned  maxv 
) [inline]

Definition at line 126 of file sign_variation.hpp.

References sign_variation().

00127 { return sign_variation(t,t+N,maxv); };

unsigned mmx::sign_variation ( const C(&)  t[N]  )  [inline]

Definition at line 122 of file sign_variation.hpp.

References sign_variation().

00123 { return sign_variation(t,t+N); };

int mmx::sign_variation ( const T &  v,
unsigned  maxv 
) [inline]

Definition at line 118 of file sign_variation.hpp.

References sign_variation().

00119 { return sign_variation(v.begin(),v.end(),maxv); };

int mmx::sign_variation ( const T &  v  )  [inline]

Function that computes the number of sign changes in a linear array, using iterators, and counters for the number of sign changes. The parameters v is a linear array of coefficients. The output var is the number of sign changes of v.

Definition at line 115 of file sign_variation.hpp.

References sign_variation().

00116 { return sign_variation(v.begin(),v.end()); }

unsigned mmx::sign_variation ( Iterator  b,
Iterator  e,
unsigned  maxv 
) [inline]

Definition at line 45 of file sign_variation.hpp.

00046 {
00047   unsigned c = 0;
00048  
00049   while (  *b == 0 && b != e ) b++;
00050 
00051   if ( b != e )
00052     {
00053       //Iterator p = b;
00054       bool v = (*b<0);
00055       for( ++b; c < maxv && b != e;  ++b ) {
00056         if ( (*b != 0) && ( (*b<0) != v ) ) {
00057           c++; v = !v; };
00058       }
00059     };
00060   
00061   return c;
00062 }

unsigned mmx::sign_variation ( Iterator  b,
Iterator  e 
) [inline]

Function that computes the number of sign changes between b and e.

Definition at line 27 of file sign_variation.hpp.

Referenced by CF_positive(), has_sign_variation(), MCF_positive(), reverse_shift(), shift(), shift_by_1(), interval_rep< POL >::sign_var(), sign_variation(), continued_fraction_subdivision< K >::solve_homography(), continued_fraction_subdivision< K >::solve_positive(), and Var().

00028 {
00029   unsigned c = 0;
00030  
00031   while (  *b == 0 && b != e ) b++;
00032   
00033   if ( b != e )
00034     {
00035       //Iterator p = b;
00036       bool v = (*b<0);
00037       for( ++b; b != e;  ++b )
00038         if ( (*b != 0) && ( (*b<0) != v ) ) { c++; v = !v; };
00039     };
00040   
00041   return c;
00042 }

unsigned mmx::sign_variation_n ( const Vector &  t,
unsigned  l,
unsigned  maxv 
) [inline]

Definition at line 65 of file sign_variation.hpp.

Referenced by has_sign_variation().

00066 {
00067  
00068   unsigned c = 0, i=0;
00069  
00070   while (  t[i] == 0 && i< l ) i++;
00071   if ( i<l )
00072     {
00073       //unsigned p = i;
00074       bool v = (t[i]<0);
00075       for( ++i; c < maxv && i<l;  ++i ) {
00076         if ( (t[i] != 0) && ( (t[i]<0) != v ) ) {
00077           c++; v = !v; };
00078       }
00079     };
00080   return c;
00081 }

bool mmx::singleton ( const Interval< T, r > &  x  )  [inline]

Definition at line 95 of file Interval_fcts.hpp.

References Interval< T, r >::lower(), and Interval< T, r >::upper().

00095 { return x.lower() == x.upper(); };

scalar<MPQ> mmx::Size ( const scalar< MPQ > &  r  )  [inline]

Definition at line 545 of file scalar_rational.hpp.

References abs().

00545 { return abs(r); };

scalar<MPZ> mmx::Size ( const scalar< MPZ > &  z  )  [inline]

Definition at line 706 of file scalar_integer.hpp.

References abs().

00706 { return abs(z); };

scalar<T> mmx::Size ( const scalar< T > &  r  )  [inline]

Definition at line 529 of file scalar.hpp.

References abs().

00530 {
00531   return abs(r);
00532 }

unsigned mmx::size ( const polynomial< C, with< Rep, Ord > > &  p  )  [inline]

Definition at line 52 of file polynomial_fcts.hpp.

00052                           {
00053   return p.size();
00054 }

int mmx::size ( const monom< int > &  v  )  [inline]

Definition at line 61 of file monomial_glue.hpp.

References N().

00061 { return N(v); }

T mmx::size ( const Interval< T, r > &  i  )  [inline]

Definition at line 165 of file Interval_fcts.hpp.

References Interval< T, r >::size().

00165 { return i.size(); };

QQ size ( const ZZ &  z  )  [inline]

Definition at line 68 of file GMPXX.hpp.

References abs().

Referenced by arc_rep< C >::arc_rep(), GLUE_5(), median(), monomial_seq< C, O, MONOM, rep >::operator==(), and mmx::realroot::scan_monom_env().

00068 { return abs(r); };

ZZ Size ( const QQ &  r  )  [inline]

Definition at line 65 of file GMPXX.hpp.

References abs().

00065 { return abs(z); };

int mmx::soft_hash ( const set_of< C > &  R  )  [inline]

Definition at line 29 of file set_of.hpp.

00029 { return 1;}

unsigned mmx::soft_hash ( const Seq< C, R > &  m  )  [inline]

Definition at line 207 of file Seq.hpp.

References hash().

00207 {return hash(m);}

unsigned mmx::soft_hash ( const ring< C, Sparse, DegRevLex > &  p  )  [inline]

Definition at line 16 of file ring_sparse_glue.hpp.

00016 { return 1;}

unsigned mmx::soft_hash ( const ring< C, MonomialTensor > &  p  )  [inline]

Definition at line 19 of file ring_monomial_tensor_glue.hpp.

00019 { return 1;}

unsigned mmx::soft_hash ( const MonomialTensor &  p  )  [inline]

Definition at line 15 of file ring_monomial_tensor_glue.hpp.

00017 { return 1;}

unsigned mmx::soft_hash ( const ring< C, Bernstein > &  p  )  [inline]

Definition at line 19 of file ring_bernstein_tensor_glue.hpp.

00019 { return 1;}

unsigned mmx::soft_hash ( const Bernstein &  p  )  [inline]

Definition at line 15 of file ring_bernstein_tensor_glue.hpp.

00017 { return 1;}

unsigned mmx::soft_hash ( const polynomial< C, with< V, W > > &  p  )  [inline]

Definition at line 14 of file polynomial_glue.hpp.

00014 { return 1;}

unsigned mmx::soft_hash ( const ring< C, Dual, DegRevLex > &  p  )  [inline]

Definition at line 13 of file polynomial_dual_glue.hpp.

00013 { return 1;}

unsigned mmx::soft_hash ( const Monomial &  m  ) 

Definition at line 33 of file monomial_glue.hpp.

References hash().

00033 {return hash(m);}

solver<typename POL::Scalar, Sleeve<M> >::Solutions mmx::solve ( const POL &  p,
const Sleeve< M > &  slv 
) [inline]

Definition at line 666 of file solver_uv_sleeve.hpp.

References Scalar, and solve().

00666                                              {
00667     typedef typename POL::Scalar                             Scalar;
00668     typedef solver<Scalar, Sleeve<M> >                       Solver;
00669     typedef typename solver<Scalar, Sleeve<M> >::Solutions   Solutions;
00670     Solutions sol;
00671     Solver::solve(sol,p);
00672     return sol;
00673   }

solver<B, Sleeve<M> >::Solutions mmx::solve ( const POL &  p,
const Sleeve< M > &  slv,
const B &  u,
const B &  v 
) [inline]

Definition at line 656 of file solver_uv_sleeve.hpp.

References solve().

00656                                                                      {
00657     typedef solver<B, Sleeve<M> >                       Solver;
00658     typedef typename Solver::Solutions                  Solutions;
00659     Solutions sol;
00660     Solver::solve(sol,p, u,v);
00661     return sol;
00662   }

IntervalNewton<IT,typename POL::coeff_t>::solutions_t mmx::solve ( const POL &  f,
IntervalNewton< IT, typename POL::coeff_t > &  s 
) [inline]

Definition at line 257 of file solver_uv_interval_newton.hpp.

References IntervalNewton< INT, C >::delta, diff(), IntervalNewton< INT, C >::initial_approx, POL, and IntervalNewton< INT, C >::status.

00258   {
00259       typedef typename POL::coeff_t coeff_t;
00260       typedef typename IntervalNewton<IT,coeff_t>::solver_t solver_t;
00261       typename IntervalNewton<IT,coeff_t>::solutions_t sol;
00262           
00263       POL df = diff(f); 
00264       sol << solver_t::newton_iteration(f, df, s.initial_approx, s.delta, s.status);
00265           
00266       return sol;
00267   }

solver<typename POL::Scalar, ContFrac<M> >::Solutions mmx::solve ( const POL &  p,
const ContFrac< M > &  slv,
const B &  b1,
const B &  b2 
) [inline]

Definition at line 560 of file solver_uv_continued_fraction.hpp.

References solve().

00560                                                                          {
00561     typedef solver<B, ContFrac<M> >                     Solver;
00562     typedef typename solver<B, ContFrac<M> >::Solutions Solutions;
00563     Solutions sol;
00564     Solver::solve(sol,p,b1,b2);
00565     return sol;
00566   }

solver<typename POL::Scalar, ContFrac<M> >::Solutions mmx::solve ( const POL &  p,
const ContFrac< M > &  slv 
) [inline]

Definition at line 548 of file solver_uv_continued_fraction.hpp.

References Scalar, and solve().

00548                                                {
00549     typedef typename POL::Scalar                             Scalar;
00550     typedef solver<Scalar, ContFrac<M> >                     Solver;
00551     typedef typename solver<Scalar, ContFrac<M> >::Solutions Solutions;
00552     Solutions sol;
00553     Solver::solve(sol,p);
00554     return sol;
00555   }

Seq<std::vector<C> > mmx::solve ( const MPC &  l,
const ProjRd< MTH > &  ,
const Domain &  D,
bool  verbose = false 
) [inline]

Solve function.

Interface function for the solvers of the family ProjRd.

Parameters:
l is a sequence of polynomials (with begin() and end() member functions) expressed in the Monomial basis.
D is the domain for the resolution.
verbose set to true output complete information on the resolution.

Definition at line 532 of file solver_mv_bernstein.hpp.

References mmx::let::assign().

00533                               {
00534   typedef typename MPC::value_type  POL;
00535   typedef typename POL::value_type coeff;
00536   typedef QQ Rational;
00537   Seq<Rational> box(D.size());
00538   for(unsigned i=0;i<D.size();i++) let::assign(box[i],D[i]);
00539   std::cout<<"Box: "<<box<<std::endl;
00540   
00541   Seq<std::vector<C> > sol; 
00542   solver<C, ProjRd<MTH> >::solve_monomial(sol,l,D,verbose);
00543   return sol;
00544 }

solver<typename POL::Scalar,SLV>::Solutions mmx::solve ( const POL &  p,
const SLV &  s,
const Domain1 &  D1,
const Domain2 &  D2 
) [inline]

Definition at line 133 of file solver.hpp.

References solve().

00133                                                                           {
00134     typedef solver<typename POL::Scalar,SLV> solver_t;
00135     typename solver<typename POL::Scalar,SLV>::Solutions sol;
00136     solver_t::solve(sol,p,D1,D2);
00137     return sol;
00138   }

solver<typename POL::Scalar,SLV>::Solutions mmx::solve ( const POL &  p,
const SLV &  s,
const Domain &  D 
) [inline]

Definition at line 124 of file solver.hpp.

References solve().

00124                                                      {
00125     typedef solver<typename POL::Scalar,SLV> solver_t;
00126     typename solver<typename POL::Scalar,SLV>::Solutions sol;
00127     solver_t::solve(sol,p,D);
00128     return sol;
00129   }

solver<typename POL::Scalar,SLV>::Solutions mmx::solve ( const POL &  p,
SLV &  s 
) [inline]

Definition at line 114 of file solver.hpp.

References solve().

00114                               {
00115     typedef  solver<typename POL::Scalar,SLV>  solver_t;
00116     typename solver<typename POL::Scalar,SLV>::Solutions sol;
00117     solver_t::solve(sol,p);
00118     return sol;
00119   }

solver<typename POL::Scalar,SLV>::Solutions mmx::solve ( const POL &  p,
const SLV &  s 
) [inline]

Definition at line 105 of file solver.hpp.

References solve().

00105                                     {
00106     typedef solver<typename POL::Scalar,SLV> solver_t;
00107     typename solver<typename POL::Scalar,SLV>::Solutions sol;
00108     solver_t::solve(sol,p);
00109     return sol;
00110   }

Seq< typename ContFrac<NT,LB>::root_t > mmx::solve ( const typename ContFrac< NT >::Poly &  f,
ContFrac< NT, LB >   
) [inline]

Definition at line 164 of file contfrac.hpp.

References Seq< C, R >::rep(), and solve_contfrac().

Referenced by run_solver(), solve(), solver_univariate_contfrac(), solver_univariate_contfrac_approx_prec(), solver_univariate_contfrac_prec(), solver_univariate_newton(), and solver_univariate_sleeve().

00165     {
00166         typedef ContFrac<NT,LB>        K;
00167         typedef typename K::root_t     root_t;
00168     
00169         Seq<root_t> sol;
00170         //    std::cout << "**In this" << std::endl; 
00171         solve_contfrac(f, std::back_inserter(sol.rep()), K());
00172         //  std::stable_sort( sol.begin(), sol.end(), ALGEBRAIC::Refine_compare());
00173     
00174         return sol;
00175     }

OutputIterator mmx::solve_contfrac ( const typename K::Poly &  h,
OutputIterator  sol,
 
) [inline]

Definition at line 609 of file contfrac.hpp.

References CF_solve().

Referenced by solve().

00610     {
00611         CF_solve( h, sol, 1, K()); 
00612         return sol;
00613     }

vector<generic> mmx::solver_univariate_contfrac ( const polynomial< C, with< MonomialTensor > > &  p,
const interval< rational > &  D 
) [inline]

Definition at line 65 of file solver_univariate_glue.hpp.

References lower(), mmx_bit_precision, N(), solve(), and upper().

00065                                                                                 {
00066     typedef Numerix                        kernel;
00067     typedef typename kernel::integer       Integer;
00068     typedef typename kernel::rational      Rational;
00069     typedef typename kernel::interval_rational interval_rational;
00070     typedef solver<Integer, ContFrac<Approximate> >       Solver;
00071 
00072     vector<interval_rational> sol;
00073     Solver::set_precision(mmx_bit_precision);
00074     Solver::solve(sol,p,lower(D),upper(D));
00075     sort(sol);
00076     vector<generic> r;
00077     for(unsigned i=0;i<N(sol);i++) 
00078       r <<as<generic>(interval< rational > (lower(sol[i]),upper(sol[i])));
00079     return r;
00080   }

vector<generic> mmx::solver_univariate_contfrac ( const polynomial< C, with< MonomialTensor > > &  p  )  [inline]

Definition at line 59 of file solver_univariate_glue.hpp.

References mmx_bit_precision, and solver_univariate_contfrac_prec().

00059                                                                         {
00060     return solver_univariate_contfrac_prec(p,mmx_bit_precision);
00061   }

vector<generic> mmx::solver_univariate_contfrac_approx ( const polynomial< C, with< MonomialTensor > > &  p  )  [inline]

Definition at line 109 of file solver_univariate_glue.hpp.

References mmx_bit_precision, and solver_univariate_contfrac_approx_prec().

00109                                                           {
00110     return solver_univariate_contfrac_approx_prec(p,mmx_bit_precision);
00111   }

vector<generic> mmx::solver_univariate_contfrac_approx_prec ( const polynomial< C, with< MonomialTensor > > &  p,
const int &  prec 
) [inline]

Definition at line 85 of file solver_univariate_glue.hpp.

References lower(), mmx_bit_precision, solve(), and upper().

Referenced by solver_univariate_contfrac_approx().

00085                                                                                 {
00086     typedef Numerix                            kernel;
00087     typedef typename kernel::integer           Integer;
00088     typedef typename kernel::rational          rational;
00089     typedef typename kernel::interval_rational interval_rational;
00090     typedef solver<Integer,ContFrac<Approximate> >  Solver;
00091 
00092 
00093     Solver::set_precision(prec);
00094 
00095     vector<interval_rational> sol;
00096     Solver::solve(sol,p);
00097     sort(sol);
00098     long int old_prec = mmx_bit_precision;
00099     vector<generic> r;
00100     mmx_bit_precision = prec;
00101     for(unsigned i=0;i<sol.size();i++) {
00102       r << as<generic>(as<floating<> >((lower(sol[i])+upper(sol[i]))/2));
00103     }
00104     mmx_bit_precision = old_prec;
00105     return r;
00106   }

vector<generic> mmx::solver_univariate_contfrac_prec ( const polynomial< C, with< MonomialTensor > > &  p,
const int &  prec 
) [inline]

Definition at line 39 of file solver_univariate_glue.hpp.

References lower(), solve(), and upper().

Referenced by solver_univariate_contfrac().

00039                                                                          {
00040     typedef Numerix                             kernel;
00041     typedef typename kernel::integer            Integer;
00042     typedef typename kernel::rational           Rational;
00043     typedef typename kernel::interval_rational  interval_rational;
00044     typedef solver< Integer, ContFrac<Approximate> > Solver;
00045 
00046     vector<interval_rational> sol;
00047     Solver::set_precision(prec);
00048     Solver::solve(sol,p);
00049     sort(sol);
00050 
00051     vector<generic> r;
00052     for(unsigned i=0;i<sol.size();i++) 
00053       r <<as<generic>(interval< Rational > (lower(sol[i]),upper(sol[i])));
00054     //r <<as<generic>(sol[i]);
00055     return r;
00056   }

interval<floating<> > mmx::solver_univariate_newton ( const polynomial< C, with< MonomialTensor > > &  p,
const interval< floating<> > &  I 
) [inline]

Definition at line 128 of file solver_univariate_glue.hpp.

References solve().

00128                                                                                  {
00129     typedef interval<floating<> > interval_t;
00130     IntervalNewton<interval_t,C> Nwt(I);
00131     Seq<interval_t> sol =solve(p,Nwt);
00132     
00133     return sol[0];
00134   }

vector<generic> mmx::solver_univariate_sleeve ( const polynomial< C, with< MonomialTensor > > &  p  )  [inline]

Definition at line 114 of file solver_univariate_glue.hpp.

References solve().

00114                                                  {
00115     typedef Numerix                   kernel;
00116     typedef typename kernel::integer  Integer;
00117     typedef typename kernel::rational rational;
00118     typedef typename kernel::interval_rational interval_rational;
00119     typedef kernel::interval_rational interval_rational;
00120     Seq<interval_rational> sol;
00121     solver<RING,Sleeve<Isolate> >::solve(sol,p);
00122     vector<generic> r;
00123     for(unsigned i=0;i<sol.size();i++) r << as<generic>(sol[i]);
00124     return r;
00125   }

void mmx::split ( Interval< C, R > &  l,
Interval< C, R > &  r 
) [inline]

Definition at line 632 of file Interval_fcts.hpp.

References C, Interval< T, r >::m, and Interval< T, r >::M.

Referenced by uv_binary_approx::subdivide().

00632                                             {
00633   r.M = l.M;
00634   r.m = (l.M+l.m)/C(2);
00635   l.M = r.m;
00636 };

scalar< T > sqrt ( const scalar< T > &  b  )  [inline]

Definition at line 501 of file scalar.hpp.

References NONRCODE, and NRCODE.

Referenced by solver_mv_fatarcs< C >::box_gen(), domain< coeff_t >::diam(), mmx::linear::householder(), isqrt(), arc_rep< C >::midc(), mmx::array::norm(), arc_rep< C >::offset(), mmx::linear::pythag(), solve2(), and v_length().

00502 {
00503   NRCODE(r.sqrt();)
00504   NONRCODE(scalar<T> r(b); r.sqrt(); return r;)
00505 }

void mmx::SqrtRem ( scalar< MPZ > &  sqrt,
scalar< MPZ > &  rem,
const scalar< MPZ > &  b 
) [inline]

Definition at line 565 of file scalar_integer.hpp.

References scalar< T >::rep().

00566 {
00567   mpz_sqrtrem(&sqrt.rep(), &rem.rep(), &b.rep());
00568 }

polynomial<C,V> mmx::sr_gcd ( const polynomial< C, V > &  p,
const polynomial< C, V > &  q 
) [inline]

Definition at line 227 of file subresultant.hpp.

References sub_resultant< PREM >::subres_gcd().

00227                                                                 {
00228     return sub_resultant<euclidean>::subres_gcd(p,q);
00229   }

void mmx::sub ( polynomial< C, with< Rep, Ord > > &  r,
const polynomial< C, with< Rep, Ord > > &  a,
const C &  b 
) [inline]

Definition at line 45 of file polynomial_operators.hpp.

References sub().

00045                                                       {
00046   sub (r.rep (), a.rep (), b); 
00047 }

void mmx::sub ( polynomial< C, with< Rep, Ord > > &  r,
const C &  a,
const polynomial< C, with< Rep, Ord > > &  b 
) [inline]

Definition at line 41 of file polynomial_operators.hpp.

References sub().

00041                                                       {
00042   sub (r.rep (), a, b.rep ()); 
00043 }

void mmx::sub ( polynomial< C, with< Rep, Ord > > &  r,
const polynomial< C, with< Rep, Ord > > &  a,
const polynomial< C, with< Rep, Ord > > &  b 
) [inline]

Definition at line 37 of file polynomial_operators.hpp.

References sub().

00037                                                               {
00038   sub (r.rep (), a.rep (), b.rep ()); 
00039 }

void mmx::sub ( polynomial< C, with< Rep, Ord > > &  r,
const polynomial< C, with< Rep, Ord > > &  a 
) [inline]

Definition at line 33 of file polynomial_operators.hpp.

References sub().

00033                                           {
00034   sub (r.rep (), a.rep () ); 
00035 }

void mmx::sub ( Interval< C, r > &  a,
const Interval< C, r > &  b,
const Interval< C, r > &  x 
) [inline]

Definition at line 245 of file Interval_fcts.hpp.

References interval_base< T,((unsigned) r)%4 >::dwsub(), Interval< T, r >::M, Interval< T, r >::m, and interval_base< T,((unsigned) r)%4 >::upsub().

00245                                                                         { 
00246   a.m = a.dwsub(b.m,x.M); a.M = a.upsub(b.M,x.m); };

void mmx::sub ( Interval< C, r > &  a,
const Interval< C, r > &  x 
) [inline]

Definition at line 241 of file Interval_fcts.hpp.

References interval_base< T,((unsigned) r)%4 >::dwsub(), Interval< T, r >::M, Interval< T, r >::m, and interval_base< T,((unsigned) r)%4 >::upsub().

00241                                                 { 
00242 a.m = a.dwsub(a.m,x.M); a.M = a.upsub(a.M,x.m); };

void mmx::sub ( Interval< C, r > &  a,
const C &  x,
const Interval< C, r > &  b 
) [inline]

Definition at line 229 of file Interval_fcts.hpp.

References interval_base< T,((unsigned) r)%4 >::dwsub(), Interval< T, r >::M, Interval< T, r >::m, and interval_base< T,((unsigned) r)%4 >::upsub().

00229                                                               { 
00230   a.m = a.dwsub(x,b.M); a.M = a.upsub(x,b.m); };

void mmx::sub ( Interval< C, r > &  a,
const Interval< C, r > &  b,
const C &  x 
) [inline]

Definition at line 225 of file Interval_fcts.hpp.

References interval_base< T,((unsigned) r)%4 >::dwsub(), Interval< T, r >::M, Interval< T, r >::m, and interval_base< T,((unsigned) r)%4 >::upsub().

00225                                                             { 
00226   a.m = a.dwsub(b.m,x); a.M = a.upsub(b.M,x); };

void mmx::sub ( Interval< C, r > &  a,
const C &  x 
) [inline]
double mmx::to_double ( const scalar< MPQ > &  a  )  [inline]

Definition at line 558 of file scalar_rational.hpp.

References scalar< T >::rep().

00558 { return mpq_get_d(&a.rep()); }

double mmx::to_double ( const scalar< MPZ > &  z  )  [inline]

Definition at line 742 of file scalar_integer.hpp.

References scalar< T >::rep().

00742 { return mpz_get_d(&z.rep()); }

double to_double ( const RR &  a  )  [inline]

Definition at line 81 of file GMPXX.hpp.

Referenced by to_XT().

00081 { return a.get_d(); }

K::FIT mmx::to_FIT ( const typename K::RT &  a,
const typename K::RT &  b,
const typename K::RT &  c,
const typename K::RT &  d,
const typename K::FT &  B 
) [inline]

Definition at line 113 of file contfrac_intervaldata.hpp.

References sign(), to_FIT(), and to_FT().

00116   {
00117     typedef typename K::RT    RT;
00118     typedef typename K::FT    FT;
00119     typedef typename K::FIT   FIT;
00120     
00121     
00122     FT left;
00123     FT right;
00124     
00125     if ( c == RT(0)) left = sign(a) * B;
00126     //  else left = as<FT>(a, c);
00127     else left = to_FT(a,c);
00128   
00129     if ( d == RT(0)) right = sign(b) * B;
00130         //  else right = as<FT>(b, d);
00131     else right = to_FT(b,d);
00132   
00133     return to_FIT( left, right);
00134   }

Interval< FT > mmx::to_FIT ( const FT &  a,
const FT &  b 
) [inline]

Definition at line 103 of file contfrac_intervaldata.hpp.

Referenced by CF_positive(), MCF_positive(), and to_FIT().

00104   {
00105     if ( a <= b ) 
00106       return Interval<FT>( a, b);
00107     return Interval<FT>( b, a);
00108   }

QQ to_FT ( const ZZ &  a,
const ZZ &  b = 1 
) [inline]

Definition at line 89 of file GMPXX.hpp.

00089 { return a; }

texp::rationalof<C>::T mmx::to_FT ( const C &  a,
const C &  b 
) [inline]

Definition at line 93 of file contfrac_intervaldata.hpp.

Referenced by continued_fraction_subdivision< K >::solve_homography(), and to_FIT().

00094   {
00095     typedef typename texp::rationalof<C>::T rational;
00096     return  (rational(a)/b);
00097   }

meta::rationalof<C>::T mmx::to_rational ( const C &  a,
const C &  b 
) [inline]

Definition at line 142 of file contfrac.hpp.

Referenced by CF_positive().

00143     {
00144         typedef typename meta::rationalof<C>::T rational;
00145         return  (rational(a)/b);
00146     }

double to_XT ( const ZZ &  a  )  [inline]

Definition at line 93 of file GMPXX.hpp.

References to_double().

00093 { return to_double(a); }

T mmx::upper ( const Interval< T, r > &  x  )  [inline]
int mmx::Var ( const T &  v  )  [inline]

Var is computing the number of sign variations from -1 to 1 or 1 to -1.

Definition at line 142 of file sign_variation.hpp.

References sign_variation().

Referenced by Count(), mmx::tensor::print(), and mmx::tensor::print_flatten().

00142 { return sign_variation(v); }

vector<int> mmx::vector_from_monomial ( const monom< int > &  m  ) 

Definition at line 54 of file monomial_glue.hpp.

00054                                          {
00055   vector<int> res;
00056   for(nat i=0;i<m.size();i++) res<<m[i];
00057   return res;
00058 }

T mmx::width ( const Interval< T, r > &  x  )  [inline]

Definition at line 93 of file Interval_fcts.hpp.

References Interval< T, r >::width().

00093 { return x.width(); };

bool mmx::with_plus_sign ( const tensor::monomials< C > &  x  )  [inline]

Definition at line 14 of file tensor_monomials_fcts.hpp.

00014                                                                             {
00015     return true;
00016   }

bool with_plus_sign ( const X &  x  )  [inline]

Definition at line 25 of file vector_monomials.hpp.

00025 {return x>0;}

bool mmx::with_plus_sign ( const Interval< C, r > &  I  )  [inline]

Definition at line 16 of file Interval_fcts.hpp.

00016 { return true;}

bool with_plus_sign ( const ZZ &  c  )  [inline]

Definition at line 76 of file GMPXX.hpp.

00076 { return (c>0);}


Variable Documentation

class O class Q struct mul_helper

Definition at line 77 of file ring_dual.hpp.


Generated on 6 Dec 2012 for realroot by  doxygen 1.6.1