Developer documentation

solver_mv_monomial_box_rep.hpp
Go to the documentation of this file.
1 /********************************************************************
2  * Author(s): A. Mantzaflaris, GALAAD, INRIA
3  ********************************************************************/
4 
5 #ifndef _realroot_SOLVE_MV_CONFRAC_BOXREP_H
6 #define _realroot_SOLVE_MV_CONFRAC_BOXREP_H
7 /********************************************************************/
8 
10 # include <realroot/ring.hpp>
13 
14 
15 
16 # include <realroot/polynomial.hpp>
17 # include <realroot/homography.hpp>
19 # include <realroot/Interval.hpp>
20 # include <stack>
21 
22 # include <realroot/solver_ucf.hpp>
24 
25 // # include <realroot/solver_mv_monomial_tests.hpp>
26 
27 # define DPOL polynomial<double,with<MonomialTensor> >
28 
29 # define INFO 1
30 //# define DIVISION
31 # define TODOUBLE as<double>
32 
33 
34 //====================================================================
35 namespace mmx {
36 //====================================================================
37 namespace realroot {
38 
40 template<class POL>
41 class box_rep
42 {
43  typedef typename POL::scalar_t C;
44  typedef Seq<POL *> system_t;
45  typedef std::stack<box_rep<POL> *> STACK;
46 /*----------------------------------------------*/
47 
48  unsigned dim;
49  homography_mv<C> hg; // Homography
50  //homography_mv<int> hg; // Homography
51 
52 
53 public:
54 
55  //int td;
56  Seq<POL> S; // System
57 
58  void inline update_data()
59  {
60 
61  //C t;
62 
63  // scale coefficients
64 #ifdef DIVISION
65  for( unsigned i=0; i<S.size(); i++ ){
66  t= *std::max_element( (S[i]).begin(), (S[i]).end() );
67  S[i]= S[i]/t;
68  }
69 #endif
70 
71  // Precondition
72  Seq<double> c= this->point( this->middle() ) ;
73  //double *fc, *jc, *ijc;
74  Seq<POL> S1= S;
75 
76  // DPOL * J= jacobian(S1);
77 
78  // jc= eval_poly_matrix( c, J, dim); // Jacobian evaluated on c
79  // ijc= new double[dim*dim];
80  // linear::LUinverse(ijc, jc, dim);
81 
82  // for( unsigned i=0; i<dim; i++ ){
83  // S[i]=0;
84  // for( unsigned j=0; j<dim; j++ )
85  // S[i] += ijc[i*dim+j] * S1[j] ;
86  // }
87  }
88 
89  box_rep() {};
90 
92  {
93  hg = h ;
94  dim= h.size();
95  S= sys;
96 
97  update_data();
98  };
99 
100  //point of subdivision in i-direction
102  {
103  dim= b.nbvar();
104  hg = b.homography();
105 
106  hg.shift_hom(b.middle(i) ,i);
107  hg.colapse();
108 
109  S= b.system();
110  };
111 
112 
113  box_rep( Seq<POL>& sys, unsigned d)
114  {
115  dim=d;
116  hg = homography_mv<C>(dim) ;
117  //hg = homography_mv<int>(dim) ;
118  S= sys;
119  }
120 
121  //Destroy
122  ~box_rep() {};
123 
124  void restrict( Seq<Interval<C> > & dom0 )
125  {
126  //Seq<Interval<int> > dom;
127  //let::assign(dom,dom0);
128 
129  unsigned i,j;
130 
131  for (i=0; i!=dim; i++)
132  {
133  hg.shift_hom ( dom0[i].m , i );
134  hg.contract_hom ( dom0[i].width(), i );
135  hg.reciprocal_hom( 1 , i );
136  hg.shift_hom ( 1 , i );
137  hg.reciprocal_hom( 1 , i );//mirror again
138  for (j=0; j!=S.size(); j++)
139  {
140  shift ( S[j].rep(), dom0[i].m , i);
141  contraction( S[j].rep(), dom0[i].width(), i);
142  reciprocal ( S[j].rep(), i);
143  shift ( S[j].rep(), C(1), i);
144  reciprocal ( S[j].rep(), i);//mirror again
145  }
146  }
147  update_data();
148 }
149 
151  inline Seq<POL> system() { return S; }
152  inline homography_mv<C> homography() { return this->hg; }
153  inline POL system(unsigned i) { return S[i]; }
154  inline unsigned nbvar() { return dim; }
155  inline unsigned nbpol() { return S.size(); }
156 
157  template<class FT>
158  FT volume()
159  {
160  Seq<Interval<FT> > s;
161  FT v(1);
162 
163  s= domain<FT>();
164 
165  for (unsigned i=0; i!=s.size(); i++ )
166  v *= s[i].width();
167 
168  return v;
169  }
170 
171  //template<class C>
172  //inline int signof_det(DPOL **p)
173  // {
174  // return p[0];
175  // }
176 
177  template<class C>
178  int** submatrix(C **matrix, int order, int i, int j)
179  {
180 
181  C **subm;
182  int p, q; // Indexes for matrix
183  int a = 0, b; // Indexes for subm
184  subm = new int* [order - 1];
185 
186  for(p = 0; p < order; p++) {
187  if(p==i) continue; //Skip ith row
188  subm[a] = new C[order - 1];
189 
190  b = 0;
191 
192  for(q = 0; q< order; q++) {
193  if(q==j) continue; //Skip jth column
194  subm[a][b++] = matrix[p][q];
195  }
196  a++; //Increment row index
197  }
198  return subm;
199  }
200 
201  // Compute matrix determinant, recursively
202  template<class C>
203  C det(C **matrix, int order)
204  {
205  if(order == 1)
206  return **matrix; // Matrix is of order one
207 
208  int i;
209  C ev(0);
210  for(i = 0; i < order; i++)
211  ev += (i%2==0?1:-1)* matrix[i][0] * det(submatrix(matrix, order, i, 0), order - 1);
212  return ev;
213  }
214 
215 
216  inline int signof(DPOL * p)
217  {
218 
219  Interval<double> ev;
220  //int dim= p->nbvar();
221 
222  tensor::eval( ev , p->rep() ,
223  this->template domain<double>() , dim );
224 
225  if (ev< .1e-15) return (0);
226  return (ev>0?1:-1);
227  }
228 
229 
230  //inline int tdeg() { return td ; }
231  homography_mv<C> hom() { return hg; }
232  POL system(const int i) { return S[i]; }
233 
234  template<class FT>
236  {
237  FT l, r;
238  Seq<Interval<FT> > s ;
239 
240  for ( unsigned i=0; i!=dim; ++i )
241  {
242  //lim to 0
243  if ( hg[i].b!=0 && hg[i].d!=0 )
244  l= as<FT>(hg[i].b)/as<FT>(hg[i].d);
245  else if ( hg[i].d==0 )
246  l= 10000000;
247  else if ( hg[i].b==0 )
248  l= 0 ;
249  else
250  l= as<FT>(hg[i].a)/as<FT>(hg[i].c) ;
251 
252  //lim to inf
253  if ( hg[i].a!=0 && hg[i].c!=0 )
254  r= as<FT>(hg[i].a)/as<FT>(hg[i].c);
255  else if ( hg[i].c==0 )
256  r=10000000;
257  else if ( hg[i].a==0 )
258  r= 0 ;
259  else
260  r= as<FT>(hg[i].b)/as<FT>(hg[i].d);
261 
262  if ( l<=r ) s << Interval<FT>(l,r);
263  else s << Interval<FT>(r,l);
264  }
265  return s;
266  }
267 
269  {
270  Seq<C> m;
271  for ( unsigned i=0; i!=dim; ++i )
272  m << as<C>( floor( as<double>(hg[i].d/hg[i].c) )) ; //floor
273  return (m);
274  }
275 
276  C middle(int i)
277  {
278  C t;
279  t= as<C>( floor( as<double>(hg[i].d/hg[i].c) )); //floor
280  //if ( t==C(0) ) t=t+1;
281  return (t+1);
282  }
283 
284 
285  template<class FT>
287  {
288  assert( t.size()==dim );
289  Seq<FT> m;
290  for ( unsigned i=0; i!=dim; ++i )
291  m << ( as<FT>(hg[i].a)*(t[i]) + as<FT>(hg[i].b) ) /
292  ( as<FT>(hg[i].c)*(t[i]) + as<FT>(hg[i].d) ) ;
293  return m;
294  }
295 
296  Seq<C> subdiv_center(const unsigned& i)
297  {
298  Seq<C> tt;
299  // Seq<double> t;
300  tt.resize( dim );
301  tt[i]= this->middle(i);
302 
303  return tt;
304  }
305 
306  Seq<double> subdiv_point(const unsigned& i)
307  {
308  return this->template point<double>(this->subdiv_center(i));
309  }
310 
311  template<class FT> inline
313  {
314  assert( t.size()==dim );
315  Seq<FT> res;
316  FT ev;
317  for ( unsigned i=0; i!=S.size() ; ++i )
318  {
319  tensor::eval( ev , S[i].rep(), t, dim );
320  res<< ev;
321  }
322  return res;
323  }
324 
325  //template<class FT>
326  inline bool is_root(Seq<C> t)
327  {
328  assert( t.size()==dim );
329  C ev;
330  for ( unsigned i=0; i!=S.size() ; ++i )
331  {
332  tensor::eval( ev , S[i].rep() , t , dim );
333  if ( ev != 0 )
334  return false;
335  }
336  return true;
337  }
338 
339 
342  {
343  C lb;
344  unsigned i;
345  bool flag= false; // true iff reduction takes place
346 
347  Seq<C> track;
348 
349  //Compute lower bound and shift system
350  for ( i=0; i<dim ;++i) // for all vars
351  {
352  lb= l_bound(i);
353  track<< lb;
354  if ( lb!=0 )
355  {
356  this->shift_box(lb,i);
357  update_data();
358  flag= true;
359  }
360  }
361  return flag;
362  };
363 
365  C l_bound( const int v )
366  {
367  C l(0) ;
368  unsigned i;
369  POL m0, m1 ;
370 
371  for (i=0; i!=S.size(); ++i ) // for all polys
372  {
373  m1= maxs( & S[i] , v);
374  m0= mins( & S[i] , v);
375  //std::cout<< m1<< " , "<< m0 << std::endl;
376 
377  if ( m0( C(0) ) > 0 )
378  l= solver<ring<C,MonomialTensor>, CFfirstFloor>::template solve<C>(m0);
379 // l= as<C>( solver<ring<double,Bernstein>, Bspline>::first_root(m0) );
380  else if ( m1( C(0) ) < 0 )
381  l= solver<ring<C,MonomialTensor>, CFfirstFloor>::template solve<C>(m1);
382 // l= as<C>( solver<ring<double,Bernstein>, Bspline>::first_root(m1) );
383  }
384  return l;
385  };
386 
387 
388  POL mins( POL * f, int v)
389  {
390  POL h(0,f->rep().szs()[v]-1,0) ;//var is always x0
391  tensor::mins(h.rep(), f->rep(), v );
392  return h;
393  };
394 
395 
396  POL maxs( POL * f, int v)
397  {
398  POL h(0,f->rep().szs()[v]-1,0) ;//var is always x0
399  tensor::maxs(h.rep(), f->rep(), v );
400  return h;
401  };
402 
403 
405  void subdivide( STACK & stck )
406  {
407  int i;
408  Seq<int> ind(dim);
409  box_rep * b;
410 
411  for (;;)
412  {
413  // copy box
414  b = new box_rep( *this ) ;
415 
416  // transform box
417  for (i = 0; i < dim ; ++i) // for all vars
418  if ( ind[i] )
419  b->shift_box(1,i);
420  else
421  b->reverse_and_shift_box(i);
422  b->update_data();
423 
424  // push box in stack
425  stck.push ( b );
426 
427  // next
428  for (i = 0; i < dim ; ++i)
429  if (++ind[i] <2 ) break; else ind[i]=0 ;
430  if (i == dim ) break;
431  }
432  };
433 
434 
436  void safe_split(const int &v, C m=C(1) )
437  {
438  box_rep * b;
439 
440  b = new box_rep( *this ) ;
441 
442  // evaluate polys at x_v=m
443 
444  //check sign
445  };
446 
447 
448 
450  void subdivide( const int &v, STACK & stck, C m=C(1) )
451  {
452  box_rep * b;
453 
454  // right box
455  b = new box_rep( *this ) ;
456  b->shift_box( m ,v);
457  b->update_data();
458  stck.push ( b );
459 
460  // left box
461  b = new box_rep( *this ) ;
462  b->contract_box(m,v);
463  b->reverse_and_shift_box(v);
464  //b->reverse_box( v); // produces thin boxes
465  b->update_data();
466  stck.push ( b );
467  };
468 
470  void subdivide( const int &v, C & m, STACK & stck )
471  {
472  box_rep * b;
473  box_rep tmp(*this);
474 
475  // left box
476  b = new box_rep( tmp ) ;
477  b->contract_box( m ,v);
478  b->reverse_and_shift_box(v);
479  b->reverse_box( v); //mirror back
480  b->update_data();
481  stck.push ( b );
482 
483  // right box
484  b = new box_rep( tmp ) ;
485  b->shift_box( m, v);
486  b->update_data();
487  stck.push ( b );
488  };
489 
491  void shift_box(const C& t, const int & v = 0)
492  {
493  unsigned i;
494 
495  for (i = 0; i < S.size() ; ++i) //for all polys do x=x+1
496  shift( S[i].rep() , t, v);
497 
498  //update homography
499  hg.shift_hom(t,v);
500  };
501 
503  void contract_box(const C & t, const int & v )
504  {
505  unsigned i;
506 
507  for (i = 0; i < S.size() ; ++i)
508  contraction( S[i].rep() , t, v);
509 
510  //update homography
511  hg.contract_hom(t,v);
512  };
513 
514  // x_v = 1/x_v
515  void reverse_box(const int & v )
516  {
517  for (unsigned i = 0; i < S.size() ; ++i) //for all polys
518  reciprocal( S[i].rep() , v);
519 
520  //update homography
521  hg.reciprocal_hom(1,v);
522  };
523 
524  // x_v = 1/(x_v +1)
525  void reverse_and_shift_box(const int & v )
526  {
527  for (unsigned i = 0; i < S.size() ; ++i) //for all polys
528  {
529  reciprocal( S[i].rep() , v);
530  shift ( S[i].rep() ,C(1), v);
531  }
532 
533  //update homography
534  hg.reciprocal_hom(1,v);
535  hg.shift_hom (1,v);
536  };
537 
538 
539  bool inline miranda_test(const int i,const int j)
540  {
541  POL u,l;
542 
543  tensor::face(l, S[i], j, 0);
544  tensor::face(u, S[i], j, 1);
545 
546  return ( no_variation(l) &&
547  no_variation(u) &&
548  (l[0]>0)!=(u[0]>0) );
549  };
550 
552  // assumes a square system for now
553  template<class FT>
554  bool include1(DPOL * J)
555  {
556  Interval<double> ev;
557  unsigned i,j,c,r ;
558  POL u,l;
559 
560  bool t[dim][dim];
561 
562  tensor::eval( ev , J->rep() ,
563  this->template domain<double>() , dim );
564  if ( ev.m*ev.M < 0 )
565  return false;
566 
567  for (i=0; i!=dim;++i)
568  for (j=0; j!=dim;++j)
569  t[i][j]= miranda_test(i,j);
570 
571  c=0;
572  for (i=0; i!=dim;++i)
573  for (j=0; j!=dim;++j)
574  if (t[i][j]==true)
575  {
576  c++; break;
577  }
578  if (c<dim) return false;
579 
580  c=0;
581  for (i=0; i!=dim;++i)
582  for (j=0; j!=dim;++j)
583  if (t[j][i]==true)
584  {
585  c++; break;
586  }
587  if (c<dim) return false;
588 
589 // std::cout<<"INCLUDE. ev="<<ev<<", c="<<c <<std::endl;
590 
591  return true;
592  };
593 
595  bool include2(DPOL * J)
596  {
597  Interval<double> ev;
598 
599  tensor::eval( ev , J->rep() ,
600  this->domain<double>(), dim );
601 
602 // if ( this->width<double>() > 0.001 )
603  if ( ev.m*ev.M < 0 )
604  return false;
605 
606  //td= this->topological_degree_2d<double>();
607  //if ( (td==-1 || td==1) )
608  //{ std::cout<<"INCLUDE. ev="<<ev<<", td="<<td <<std::endl;
609  //this->print(); }
610 
611  return ( 0 );
612  }
613 
615  bool include3(DPOL * J)
616  {
617  //evaluate df_i(B) of the box = M_i
618  // check if -Ji(c)*f(c) + (I-Ji(c)*M)*B
619  // is contaied in B.
620 
621  Interval<double> ev;
622 
623  tensor::eval( ev , J->rep() ,
624  this->domain<double>(), dim );
625 
626 // if ( this->width<double>() > 0.001 )
627  if ( ev.m*ev.M < 0 )
628  return false;
629 
630  //td= this->topological_degree_2d<double>();
631  //if ( (td==-1 || td==1) )
632  //{ std::cout<<"INCLUDE. ev="<<ev<<", td="<<td <<std::endl;
633  //this->print(); }
634 
635  return ( 0 );
636  }
637 
638 
640  template<class FT>
641  bool exclude1( Seq<POL *>& S0)
642  {
643  Interval<FT> ev;
644  Seq<Interval<FT> > dom;
645  dom= domain<FT>();
646 
647  for (unsigned i=0; i!=nbpol(); ++i)
648  {
649  tensor::eval( ev , S0[i]->rep(),
650  dom , dim );
651  if ( ev.m*ev.M > 0 )
652  {
653  // std::cout<<i<<" ev"<<
654  // dom<<"\nf= "<< *(S0[1])<<
655  // "\n f([])= " <<ev<<std::endl;
656  // if (td!=0)
657  // std::cout<<"!!!!!!----td: "<<td <<std::endl;
658  return true;
659  }
660 
661  }
662  return false;
663  };
664 
666  template<class FT>
667  inline FT width()
668  {
669  unsigned i;
670  FT m=this->width<FT>(i);
671 
672  return m;
673  };
674 
676  template<class FT>
677  FT width(unsigned & t)
678  {
679  unsigned i;
680  FT w;
681  Seq<Interval<FT> > s ;
682 
683  s= domain<FT>();
684  w= s[0].width(); t= 0;
685 
686  for ( i=0; i!=s.size(); ++i )
687  if ( s[i].width() > w)
688  { w=s[i].width() ; t=i; }
689 
690  return w;
691  };
692 
693  POL lface(const int & i, const int & v)
694  {
695  POL t;
696 
697  tensor::face(t, S[i], v , 0 );
698  rename_var( t.rep() , 1-v, 0 ) ; //1-v works for 2D only
699 
700  return t;
701  };
702 
703  POL rface(const int & i, const int & v)
704  {
705  POL tmp;
706  tensor::face(tmp, S[i], v , 1 );
707  rename_var( tmp.rep() , 1-v, 0 ) ; //1-v works for 2D only
708 
709  return tmp;
710  };
711 
712  void print()
713  {
714  std::cout << "-------------Box---------------" << "\n" ;
715  std::cout << system() << "\n";
716  for (unsigned i=0; i!=dim;++i)
717  std::cout<< "("<<hg[i].a <<"x + " << hg[i].b<<")/("<<hg[i].c<<"x+ "<<hg[i].d << ")"<<std::endl; ;
718  //std::cout<<"td="<<tdeg()<<std::endl;
719 // std::cout << this->template domain<QQ>()<<"\n" ;
720  std::cout << this->template domain<double>()<<"\n" ;
721  std::cout << "-------------------------------" << "\n" ;
722  };
723 
724 
725 };// box_rep
726 
727 } //namespace realroot
728 } //namespace mmx
729 
730 # undef DPOL
731 #endif
int size()
Definition: homography.hpp:57
int ** submatrix(C **matrix, int order, int i, int j)
Definition: solver_mv_monomial_box_rep.hpp:178
TMPL void reciprocal(Polynomial &f, const int &v)
Definition: polynomial_fcts.hpp:234
Tensor ring of polynomials in the monomial basis.
Definition: polynomial_tensor.hpp:48
void resize(size_type i)
Definition: Seq.hpp:169
const C & b
Definition: Interval_glue.hpp:25
#define DPOL
Definition: solver_mv_monomial_box_rep.hpp:27
void shift(IntervalData< RT, Poly > &ID, const RT &a)
Definition: contfrac_intervaldata.hpp:257
Seq< C > middle()
Definition: solver_mv_monomial_box_rep.hpp:268
int signof(DPOL *p)
Definition: solver_mv_monomial_box_rep.hpp:216
box_rep()
Definition: solver_mv_monomial_box_rep.hpp:89
Seq< POL > S
Definition: solver_mv_monomial_box_rep.hpp:56
void shift_hom(const real &t, const int &v)
Definition: homography.hpp:49
box_rep(Seq< POL > &sys, unsigned d)
Definition: solver_mv_monomial_box_rep.hpp:113
Seq< POL > system()
Accessors.
Definition: solver_mv_monomial_box_rep.hpp:151
void reverse_and_shift_box(const int &v)
Definition: solver_mv_monomial_box_rep.hpp:525
homography_mv< C > homography()
Definition: solver_mv_monomial_box_rep.hpp:152
R & rep(R &r)
Definition: shared_object.hpp:180
FT width(unsigned &t)
The width, corresponding max projection returned in t.
Definition: solver_mv_monomial_box_rep.hpp:677
bool include1(DPOL *J)
Inclusion criteria (Miranda Test)
Definition: solver_mv_monomial_box_rep.hpp:554
~box_rep()
Definition: solver_mv_monomial_box_rep.hpp:122
void contract_box(const C &t, const int &v)
x_v = t*x_v
Definition: solver_mv_monomial_box_rep.hpp:503
Definition: fatarcs.hpp:23
POL mins(POL *f, int v)
Definition: solver_mv_monomial_box_rep.hpp:388
POL maxs(POL *f, int v)
Definition: solver_mv_monomial_box_rep.hpp:396
void restrict(Seq< Interval< C > > &dom0)
Definition: solver_mv_monomial_box_rep.hpp:124
C det(C **matrix, int order)
Definition: solver_mv_monomial_box_rep.hpp:203
box_rep(box_rep< POL > b, int i)
Definition: solver_mv_monomial_box_rep.hpp:101
void subdivide(const int &v, C &m, STACK &stck)
Subdivide in direction v and at point x_v=m.
Definition: solver_mv_monomial_box_rep.hpp:470
void subdivide(const int &v, STACK &stck, C m=C(1))
Subdivide in direction v only.
Definition: solver_mv_monomial_box_rep.hpp:450
void eval(Result &result, const bernstein< Coeff > &controls, const Parameters &parameters)
Definition: tensor_bernstein_fcts.hpp:195
Seq< C > subdiv_center(const unsigned &i)
Definition: solver_mv_monomial_box_rep.hpp:296
void contraction(monomials< C > &f, const C &t, const int &v)
Compute f (a*var[v])
Definition: tensor_monomials_fcts.hpp:613
size_type size() const
Definition: Seq.hpp:166
void subdivide(STACK &stck)
Subdivide in all directions.
Definition: solver_mv_monomial_box_rep.hpp:405
unsigned nbpol()
Definition: solver_mv_monomial_box_rep.hpp:155
homography_mv< C > hom()
Definition: solver_mv_monomial_box_rep.hpp:231
Seq< double > subdiv_point(const unsigned &i)
Definition: solver_mv_monomial_box_rep.hpp:306
Definition: solver_ucf.hpp:25
void reciprocal_hom(const real &t, const int &v)
Definition: homography.hpp:50
Seq< FT > point(Seq< FT > t)
Definition: solver_mv_monomial_box_rep.hpp:286
POL lface(const int &i, const int &v)
Definition: solver_mv_monomial_box_rep.hpp:693
void contract_hom(const real &t, const int &v)
Definition: homography.hpp:51
FT volume()
Definition: solver_mv_monomial_box_rep.hpp:158
bool exclude1(Seq< POL * > &S0)
Exclusion criteria (inteval arithmetic)
Definition: solver_mv_monomial_box_rep.hpp:641
Definition: solver.hpp:68
void rename_var(monomials< C > &f, const int &v, const int &n)
Definition: tensor_monomials_fcts.hpp:681
void safe_split(const int &v, C m=C(1))
Subdivide in direction v only.
Definition: solver_mv_monomial_box_rep.hpp:436
TMPL void face(Polynomial &r, const Polynomial &p, int v, int f)
Definition: polynomial_fcts.hpp:188
void colapse()
Definition: homography.hpp:52
bool is_root(Seq< C > t)
Definition: solver_mv_monomial_box_rep.hpp:326
void print()
Definition: solver_mv_monomial_box_rep.hpp:712
TMPL POL
Definition: polynomial_dual.hpp:74
bool reduce_domain()
Reduce the domain from below using integer lower bound.
Definition: solver_mv_monomial_box_rep.hpp:341
void update_data()
Definition: solver_mv_monomial_box_rep.hpp:58
void maxs(OutputIterator _maxs_, const C *data, const eenv &env, int v)
Definition: tensor_eenv_loops.hpp:106
POL rface(const int &i, const int &v)
Definition: solver_mv_monomial_box_rep.hpp:703
Generic class for intervals.
Definition: Interval.hpp:44
Box representation.
Definition: solver_mv_monomial_box_rep.hpp:41
POL system(unsigned i)
Definition: solver_mv_monomial_box_rep.hpp:153
T m
Definition: Interval.hpp:52
unsigned nbvar()
Definition: solver_mv_monomial_box_rep.hpp:154
const C & c
Definition: Interval_glue.hpp:45
C middle(int i)
Definition: solver_mv_monomial_box_rep.hpp:276
void reverse_box(const int &v)
Definition: solver_mv_monomial_box_rep.hpp:515
POL system(const int i)
Definition: solver_mv_monomial_box_rep.hpp:232
void shift_box(const C &t, const int &v=0)
Shift the system by t in direction v.
Definition: solver_mv_monomial_box_rep.hpp:491
C l_bound(const int v)
Lower integer bound for v-th coords of the positive roots.
Definition: solver_mv_monomial_box_rep.hpp:365
FT width()
The width of the box (max of projection widths)
Definition: solver_mv_monomial_box_rep.hpp:667
Seq< Interval< FT > > domain()
Definition: solver_mv_monomial_box_rep.hpp:235
bool miranda_test(const int i, const int j)
Definition: solver_mv_monomial_box_rep.hpp:539
Definition: array.hpp:12
bool include3(DPOL *J)
Inclusion criteria based on Rump's test.
Definition: solver_mv_monomial_box_rep.hpp:615
box_rep(Seq< POL > &sys, homography_mv< C > &h)
Definition: solver_mv_monomial_box_rep.hpp:91
bool include2(DPOL *J)
Inclusion criteria (Jacobian+Topological Degree)
Definition: solver_mv_monomial_box_rep.hpp:595
TMPL bool no_variation(POL &p)
True iff all coefficients of p have the same sign.
Definition: solver_mv_monomial_tests.hpp:40
void mins(OutputIterator _mins_, const C *data, const eenv &env, int v)
Definition: tensor_eenv_loops.hpp:123
Seq< FT > eval(Seq< FT > t)
Definition: solver_mv_monomial_box_rep.hpp:312
T M
Definition: Interval.hpp:52
#define assert(expr, msg)
Definition: shared_object.hpp:57
Home