Developer documentation

fatarcs_fcts.hpp
Go to the documentation of this file.
1 #include <vector>
2 #include <realroot/Interval.hpp>
3 #include <realroot/Seq.hpp>
4 #define SMALL C(10e-20)
5 #define REP poly.rep()
6 #define SIZE poly.size()
7 
8 #pragma once
9 
10 //#include <realroot/fatarcs.hpp>
11 
12 template<class C>
13 struct arc_rep;
14 template<class C>
15 struct domain;
16 template<class C>
17 struct box_rep;
18 
19 using namespace mmx;
20 
22 //vec_t fcts
23 
24 template<class C>
25 std::vector<C> vec (const C c1, const C c2) {
26  std::vector<C> a(2, C(0));
27  a[0]= c1; a[1]= c2;
28  return a;
29 }
30 
31 template<class C>
32 std::vector<C> rotl(std::vector<C> p){
33  std::vector<C> v; v=vec(C(-1)*p[1],p[0]); return(v);
34 }; /*rotate left*/
35 
36 template<class C>
37 C dot(std::vector<C> p ,std::vector<C> q){
38  C v=C(0);
39  for(unsigned i=0; i<p.size(); i++){
40  v +=p[i]*q[i];
41  }
42 return(v);
43 };
44 
45 template<class C>
46 std::vector<C> v_plus(std::vector<C> p ,std::vector<C> q){
47  std::vector<C> v(p.size(),C(0));
48  assert( p.size()==q.size() );
49  for(unsigned i=0; i<p.size(); i++){
50  v[i]=p[i]+q[i];
51  }
52 return(v);
53 };
54 
55 template<class C>
56 std::vector<C> v_minus(std::vector<C> p ,std::vector<C> q){
57  std::vector<C> v(p.size(),C(0));
58  assert( p.size()==q.size() );
59  for(unsigned i=0; i<p.size(); i++){
60  v[i]=p[i]-q[i];
61  }
62 return(v);
63 };
64 
65 template<class C>
66 std::vector<C> v_div(std::vector<C> p ,C q){
67  if (q!=C(0)){
68  std::vector<C> v(p.size(),C(0));
69  for(unsigned i=0; i<p.size(); i++){
70  v[i]=p[i]/q;};
71  return(v);}else{return std::vector<C>();}
72 };
73 
74 template<class C>
75 std::vector<C> v_mul(C q, std::vector<C> p){
76  std::vector<C> v(p.size(),C(0));
77  for(unsigned i=0; i<p.size(); i++){
78  v[i]=p[i]*q;
79  }
80 return(v);
81 };
82 
83 template<class C>
84 C v_length(std::vector<C> p){
85  return(sqrt(dot(p,p)));
86 }; /*length of vector*/
87 
88 template<class C>
89 std::vector<C> matrat(std::vector<C> v1,std::vector<C> v2){
90  std::vector<C> mm; mm=vec(v1[0]*v2[0]+v1[1]*v2[1],v1[0]*v2[1]-v2[0]*v1[1]);
91  return(mm);
92 };
93 
94 template<class C>
95 std::vector<C> crossrat(std::vector<C> v1,std::vector<C> v2,std::vector<C> v3,std::vector<C> v4){
96  std::vector<C> mm=matrat(matrat(v_minus(v1,v2),v_minus(v3,v2)),matrat(v_minus(v1,v4),v_minus(v3,v4)));
97 return(mm);
98 };
99 
100 
102 //solver and test fcts
103 template<class C>
104 bool is_zero(C p){
105  if(p==C(0)){return true;}
106  else{return false;}
107  };
108 
109 template<class C>
110 bool is_small(C p){
111  if(p==C(0)){return true;}
112  else{return false;}
113  };
114 
115 /*
116 template<class C>
117 bool is_small(C p){
118  if(p<SMALL && p>C(-1)*SMALL){return true;}
119  else{return false;}
120  };
121 */
122 
123 template<class C>
124 Seq<C> solve2(C a, C b, C c){
125  Seq<C> r; r<<C(-1)<<C(-1);
126  C root1,root2;
127  if(is_small(a)){if(!is_small(b)){r[0]=C(-1)*c/b;r[1]=C(-1)*c/b;}}
128  else{if(sign(b*b-C(4)*a*c) >= 0){
129  root1=(C(-1)*b+sqrt(b*b-C(4)*a*c))/(C(2)*a);
130  root2=(C(-1)*b-sqrt(b*b-C(4)*a*c))/(C(2)*a);
131  r[0]=root1;r[1]=root2;}
132  }
133 
134  return(r);
135 };/*solve(a*x^2+b*x+c=0)*/
136 
137 template<class C>
138 bool is_unit1(C p){
139  if(p<C(0) || p>C(1) ){return false;}
140  else{return true;}
141 };/*1dim unit test*/
142 
143 
144 template<class C>
145 bool is_unit2( std::vector<C> p){
146  if( is_unit1( p[0] ) && is_unit1( p[1] ) ){return true;}
147  else{return false;}
148 };/*2dim unit test*/
149 
150 
152 //bezier poly comp. fcts
153 
154 int binomial(int n, int p) {
155  int n1=1;
156  if(p!=0) {
157 
158  if((n-p)<p){ p=n-p;};
159  int n2=n;
160  for(int i=1;i<=p;i++){ n1=n1*n2/i; n2--;};
161  }
162 
163  return(n1);
164 }/*binomials*/
165 
166 
167 template<class C>
169  {
170  polynomial< C ,with<Bernstein> > ti(co*C(binomial(n,deg)),deg,0), t("1-x0"), tj(C(1),0,0);
171 
172  for(int i=0; i<n-deg; i++){ mul(tj,t); };
173 
174  mul(ti, tj);
175  return(ti);
176  }/*BB basis polynomials*/
177 
178 
179 template<class C>
180 void pow( polynomial< C ,with<Bernstein> > & poly, int n)
181  {
183 
184  for(int i=1; i<n; i++){ mul(poly, t); };
185  }/*nth power of a bbpoly*/
186 
187 
188 
189 template<class C>
191  {
192  int n=coeffseq.size()-1;
194 
195  for(int i=0; i<=n; i++ ){
196  pi=bbasis(coeffseq[i],n,i);
197  add( pol , pi);}
198 
199  return(pol);
200  };/*coeff vector -> bbpoly*/
201 
202 
203 template<class C>
205  {
206  int n=SIZE;
207  C res=C(0);
208 
209  for(int i=0; i<n; i++ ){
210  res += REP[i]/C(i+1) ;}
211 
212  return(res);
213  };/*poly integration on (0,1)*/
214 
215 
216 template<class C>
218 
219  C min =REP[0];
220 
221  for ( unsigned i = 1; i < SIZE; i++ ){
222  if( min > REP[i] ){
223  min = REP[i];
224  }
225 
226  }
227  return min;
228 };/*minimal coeff*/
229 
230 
231 template<class C>
233 
234  C max =REP[0];
235 
236  for ( unsigned i = 1; i < SIZE; i++ ){
237  if( max < REP[i] ){
238  max = REP[i];
239  }
240 
241  }
242  return max;
243 };/*max coeff*/
244 
245 
246 
247 template<class C>
249  C min =min_coeff(poly);
250  C max =max_coeff(poly);
251 
252  if( max*max < min*min){ max =C(-1)*min; };
253 
254  return max;
255 };/* max abs coeff*/
256 
257 
258 
259 template<class C>
261  C c00,c10,c01,c11;
262 
263  eval( c00, p.rep(), vec(C(0),C(0)) );
264  eval( c10, p.rep(), vec(C(1),C(0)) );
265  eval( c01, p.rep(), vec(C(0),C(1)) );
266  eval( c11, p.rep(), vec(C(1),C(1)) );
267  Seq<C> cval; cval<<c00<<c10<<c01<<c11;
268  return(cval);
269 
270 };
271 
273 //arc fcts
274 
275 template<class C>
276 std::vector<C> approx(polynomial< C ,with<Bernstein> > poly , std::vector<C> ep1, std::vector<C> ep2, int MTH){
277  polynomial< C ,with<MonomialTensor> > xt, yt, res, monp, mp("x0-x0^2");
278  polynomial< C ,with<Bernstein> > bxt, byt;
279  C t, I;
280  Seq<C> sols;
281  std::vector<C> movec;
282 
283  if (ep2.size()==0 ){movec=ep1;}
284  else{
285  tensor::assign(monp.rep(),poly.rep());
286 
287  Seq<C> endptsx,endptsy;
288 
289  endptsx<<ep2[0]<<ep1[0];
290  endptsy<<ep2[1]<<ep1[1];
291  bxt=seq2b(endptsx); tensor::assign(xt.rep(),bxt.rep());
292  byt=seq2b(endptsy); tensor::assign(yt.rep(),byt.rep());
293 
294  Seq<polynomial< C ,with<MonomialTensor> > > param; param<<xt<<yt;
295 
296  tensor::eval(res, monp.rep(), param, 1);
297 
298 
299 
300  C c0,c1;
301  tensor::eval(c0,res.rep(),C(0));
302  tensor::eval(c1,res.rep(),C(1));
303  mul(res,mp);
304 
305  I=pint(res);
306  C u=C(15)*I-C(0.75)*(c0+c1);
307  sols=solve2(c0+c1-C(2)*u,C(2)*(u-c0),c0);
308 
309 
310  if(is_unit1(sols[0]))
311  {t=sols[0]; movec=vec(ep1[0]*t+ep2[0]*(C(1)-t),ep1[1]*t+ep2[1]*(C(1)-t));}
312  else if(is_unit1(sols[1]))
313  {t=sols[1]; movec=vec(ep1[0]*t+ep2[0]*(C(1)-t),ep1[1]*t+ep2[1]*(C(1)-t));}
314  else{movec=std::vector<C>();}
315 
316  }
317 
318  return movec;
319  }; /*approx bivar bbpoly along line*/
320 
321 
322 template<class C>
323 arc_rep< C > median( box_rep< C > box, Seq<std::vector<C> > list, int MTH ){
324  std::vector<C> endp[2], mpts[3];
325  int s=0;
326  arc_rep<C> medc;
327  for(int i=0; i<3; i++){mpts[i]=std::vector<C>();};
328 
329 
330  mpts[0]=approx(box.poly, list[0], list[1], MTH);
331  mpts[1]=approx(box.poly, list[2], list[3], MTH);
332 
333  if( mpts[0].size()!=0 && mpts[1].size()!=0 ){
334 
335  std::vector<C> mid, rvec, v;
336  mid=v_div(v_plus(mpts[0],mpts[1]),C(2));
337  rvec=rotl(v_minus(mpts[0],mpts[1]));
338  C bval[4];
339 
340  if(!is_small(rvec[0])){
341  bval[0]=rvec[1]*C(-1)*mid[0]/rvec[0]+mid[1];
342  bval[1]=rvec[1]*(C(1)-mid[0])/rvec[0]+mid[1];}else{ bval[0]=C(-1); bval[1]=C(-1);}
343 
344  if(!is_small(rvec[1])){
345  bval[2]=rvec[0]*C(-1)*mid[1]/rvec[1]+mid[0];
346  bval[3]=rvec[0]*(C(1)-mid[1])/rvec[1]+mid[0];}else{ bval[2]=C(-1); bval[3]=C(-1);}
347 
348  if(is_unit1(bval[0]) && s<2){endp[s]= vec(C(0),bval[0]); s++;};
349  if(is_unit1(bval[1]) && s<2){endp[s]= vec(C(1),bval[1]); s++;};
350  if(is_unit1(bval[2]) && s<2){endp[s]= vec(bval[2],C(0)); s++;};
351  if(is_unit1(bval[3]) && s<2){endp[s]= vec(bval[3],C(1)); s++;};
352  mpts[2]=mpts[1];
353 
354  if(s==2){ mpts[1]=approx(box.poly, endp[0], endp[1], MTH);}
355 
356  if(mpts[1].size()!=0){ medc=arc_rep<C>(mpts);}else{medc=arc_rep<C>();}
357  //else{ for(int i=0; i<3; i++){mpts[i]= vec(C(-1),C(-1));};}
358 
359  }else{ medc=arc_rep<C>(); };
360 
361 
362  //std::cout <<"med: "<<mpts[0]<<" "<<mpts[1]<<" "<<mpts[2]<<std::endl;
363 
364  return(medc);
365  }; /*median arc computation*/
366 
367 
368  template<class C>
369  void circ_is( std::vector<C> * ispts, arc_rep<C> c1, arc_rep<C> c2){
370 
371  Seq<C> eh1= c1.arc_eq(), eh2= c2.arc_eq(), sx, a;
372  C Aeh,Ceh;
373  if(!is_small(eh1[1]) && !is_small(eh1[2]) && !is_small(eh2[1]) && !is_small(eh2[2])){
374 
375  if(is_small(eh1[0]) && is_small(eh2[0])){
376 
377  Aeh=(C(-1)*eh2[1])/(eh2[2]);
378  Ceh=(C(-1)*eh2[3])/(eh2[2]);
379  sx[0]=(C(-1)*eh1[2]*Ceh-eh1[3])/(eh1[2]*Aeh+eh1[1]);
380 
381  ispts[0]=vec(sx[0],Aeh*sx[0]+Ceh);
382  ispts[1]=vec(sx[0],Aeh*sx[0]+Ceh);
383  }
384  else{
385  if(!is_small(eh1[0]) && !is_small(eh2[0])){
386  eh1=eh1/eh1[0];
387  eh2=eh2/eh2[0];
388 
389  Aeh=(eh2[1]-eh1[1])/(eh1[2]-eh2[2]);
390  Ceh=(eh2[3]-eh1[3])/(eh1[2]-eh2[2]);}
391  else{
392  if(is_small(eh1[0]) && !is_small(eh2[0])){a=eh1; eh1=eh2; eh2=a;};
393 
394  eh1=eh1/eh1[0];
395 
396  Aeh=(C(-1)*eh2[1])/(eh2[2]);
397  Ceh=(C(-1)*eh2[3])/(eh2[2]);};
398 
399 
400 
401  sx=solve2(C(1)+Aeh*Aeh, C(2)*Aeh*Ceh+eh1[1]+eh1[2]*Aeh, Ceh*Ceh+eh1[2]*Ceh+eh1[3]);
402 
403  ispts[0]=vec(sx[0],Aeh*sx[0]+Ceh);
404  ispts[1]=vec(sx[1],Aeh*sx[1]+Ceh);
405 
406  }
407  }
408  else{ ispts[0]=vec(C(-1),C(-1));
409  ispts[1]=vec(C(-1),C(-1));
410  };
411 };/*cicrcle intersections (numerical behaviour!)*/
412 
413 
414  template<class C>
416  if( c.pts[0].size()!=0 && c.pts[1].size()!=0 && c.pts[2].size()!=0 ){return true;}
417  else{return false;}
418 };
419 
420 
421 template<class C>
422  bool is_infatarc(std::vector<C> p, arc_rep<C> c1, arc_rep<C> c2){
423  if(is_arc(c1)&&is_arc(c2)){
424  if( crossrat(c1.pts[2],c1.pts[1],c1.pts[0],p)[1]*crossrat(c2.pts[2],c2.pts[1],c2.pts[0],p)[1]<C(0))
425  {return true;}else{return false;}
426  }
427  else{return false;}
428 };
429 
430 
431 template<class C>
433 
434  arc_rep<C>
435  c1p=mc1.offset(r1),c1m=mc1.offset(C(-1)*r1),
436  c2p=mc2.offset(r2),c2m=mc2.offset(C(-1)*r2);
437  std::vector<C> p[2];
438  Seq< std::vector<C> > ispts;
439 
440  if(is_arc(c1p) && is_arc(c2p)){ circ_is(p,c1p,c2p); if(is_unit2(p[0])){ispts<<p[0];}; if(is_unit2(p[1])){ispts<<p[1];};};
441  if(is_arc(c1p) && is_arc(c2m)){ circ_is(p,c1p,c2m); if(is_unit2(p[0])){ispts<<p[0];}; if(is_unit2(p[1])){ispts<<p[1];};};
442  if(is_arc(c1m) && is_arc(c2m)){ circ_is(p,c1m,c2m); if(is_unit2(p[0])){ispts<<p[0];}; if(is_unit2(p[1])){ispts<<p[1];};};
443  if(is_arc(c1m) && is_arc(c2p)){ circ_is(p,c1m,c2p); if(is_unit2(p[0])){ispts<<p[0];}; if(is_unit2(p[1])){ispts<<p[1];};};
444 
445  if(is_arc(c1p) && is_infatarc(c1p.pts[0],c2m,c2p)){ispts<<c1p.pts[0];};
446  if(is_arc(c1p) && is_infatarc(c1p.pts[2],c2m,c2p)){ispts<<c1p.pts[2];};
447  if(is_arc(c1m) && is_infatarc(c1m.pts[0],c2m,c2p)){ispts<<c1m.pts[0];};
448  if(is_arc(c1m) && is_infatarc(c1m.pts[2],c2m,c2p)){ispts<<c1m.pts[2];};
449 
450  if(is_arc(c2p) && is_infatarc(c2p.pts[0],c1m,c1p)){ispts<<c2p.pts[0];};
451  if(is_arc(c2p) && is_infatarc(c2p.pts[2],c1m,c1p)){ispts<<c2p.pts[2];};
452  if(is_arc(c2m) && is_infatarc(c2m.pts[0],c1m,c1p)){ispts<<c2m.pts[0];};
453  if(is_arc(c2m) && is_infatarc(c2m.pts[2],c1m,c1p)){ispts<<c2m.pts[2];};
454 
455  if(is_arc(c1p) && is_infatarc(c1p.critpt(0),c2m,c2p)){ispts<<c1p.critpt(0);};
456  if(is_arc(c1p) && is_infatarc(c1p.critpt(1),c2m,c2p)){ispts<<c1p.critpt(1);};
457  if(is_arc(c1m) && is_infatarc(c1m.critpt(0),c2m,c2p)){ispts<<c1m.critpt(0);};
458  if(is_arc(c1m) && is_infatarc(c1m.critpt(1),c2m,c2p)){ispts<<c1m.critpt(1);};
459 
460  if(is_arc(c2p) && is_infatarc(c2p.critpt(0),c1m,c1p)){ispts<<c2p.critpt(0);};
461  if(is_arc(c2p) && is_infatarc(c2p.critpt(1),c1m,c1p)){ispts<<c2p.critpt(1);};
462  if(is_arc(c2m) && is_infatarc(c2m.critpt(0),c1m,c1p)){ispts<<c2m.critpt(0);};
463  if(is_arc(c2m) && is_infatarc(c2m.critpt(1),c1m,c1p)){ispts<<c2m.critpt(1);};
464 
465 
466  Seq< std::vector<C> > cpts; cpts<<vec(C(0),C(0));cpts<<vec(C(0),C(1));cpts<<vec(C(1),C(0));cpts<<vec(C(1),C(1));
467 
468  for(unsigned i=0; i<cpts.size(); i++){ if( is_infatarc(cpts[i],c1m,c1p) &&
469  is_infatarc(cpts[i],c2m,c2p) ){ ispts<<cpts[i]; };
470  };
471 
472  return ispts;
473 };
474 
475 template<class C>
476 domain<C> minmax_box(Seq<std::vector<C> > ispts, domain<C> box){
477  domain<C> newbox=box;
478  // C minx, maxx, miny, maxy;
479  if(ispts.size()==0) {
480  newbox=domain<C>(int(0));
481  } else {
482  int k=0;
483  C minx=ispts[0][0], maxx=ispts[0][0], miny=ispts[0][1], maxy=ispts[0][1];
484  for(unsigned i=0; i<ispts.size(); i++){
485  if(k==0){ minx=ispts[i][0]; maxx=ispts[i][0]; miny=ispts[i][1]; maxy=ispts[i][1]; k++;};
486  if(ispts[i][0]>maxx){maxx=ispts[i][0];};
487  if(ispts[i][0]<minx){minx=ispts[i][0];};
488  if(ispts[i][1]>maxy){maxy=ispts[i][1];};
489  if(ispts[i][1]<miny){miny=ispts[i][1];};
490  };
491 
492  Interval<C> Jx( minx, maxx), Jy( miny, maxy) ;
493  if((maxx-minx)>C(0) && (maxy-miny)>C(0))
494  { newbox= domain<C>( box.I[0].m + box.delta()[0]*Jx , box.I[1].m + box.delta()[1]*Jy ); };
495  }
496  return(newbox);
497 };/*minmax box for the arc intersection points and arc end points*/
498 
499 
500 //end of arc_rep fcts
501 
Seq< std::vector< C > > extpts(arc_rep< C > mc1, C r1, arc_rep< C > mc2, C r2)
Definition: fatarcs_fcts.hpp:432
std::vector< C > v_mul(C q, std::vector< C > p)
Definition: fatarcs_fcts.hpp:75
Sequence of terms with reference counter.
Definition: Seq.hpp:28
arc_rep< coeff_t > offset(coeff_t r)
Definition: fatarcs.hpp:221
bool is_unit2(std::vector< C > p)
Definition: fatarcs_fcts.hpp:145
T pow(const T &a, int i)
Definition: binomials.hpp:12
C pint(polynomial< C, with< MonomialTensor > > poly)
Definition: fatarcs_fcts.hpp:204
vec_t pts[3]
Definition: fatarcs.hpp:131
const C & b
Definition: Interval_glue.hpp:25
std::vector< C > approx(polynomial< C, with< Bernstein > > poly, std::vector< C > ep1, std::vector< C > ep2, int MTH)
Definition: fatarcs_fcts.hpp:276
C abs_max_coeff(polynomial< C, with< Bernstein > > poly)
Definition: fatarcs_fcts.hpp:248
const Interval & I
Definition: Interval_glue.hpp:49
polynomial< C,with< Bernstein > > bbasis(C co, int n, int deg)
Definition: fatarcs_fcts.hpp:168
bool is_zero(C p)
Definition: fatarcs_fcts.hpp:104
Result eval(const Polynomial &polynomial, const Parameters &parameters)
Multivariate Polynomial Evaluation.
Definition: polynomial_fcts.hpp:135
bool is_infatarc(std::vector< C > p, arc_rep< C > c1, arc_rep< C > c2)
Definition: fatarcs_fcts.hpp:422
std::vector< C > rotl(std::vector< C > p)
Definition: fatarcs_fcts.hpp:32
#define REP
Definition: fatarcs_fcts.hpp:5
Definition: fatarcs.hpp:307
Definition: fatarcs.hpp:23
bool is_arc(arc_rep< C > c)
Definition: fatarcs_fcts.hpp:415
void mul(Interval< C, r > &a, const C &x)
Definition: Interval_fcts.hpp:259
void assign(monomials< C > &monoms, const bernstein< C > &controls)
Definition: tensor_bernstein_fcts.hpp:267
Seq< C > corner_values(polynomial< C, with< Bernstein > > p)
Definition: fatarcs_fcts.hpp:260
C min_coeff(polynomial< C, with< Bernstein > > poly)
Definition: fatarcs_fcts.hpp:217
void eval(Result &result, const bernstein< Coeff > &controls, const Parameters &parameters)
Definition: tensor_bernstein_fcts.hpp:195
std::vector< C > v_div(std::vector< C > p, C q)
Definition: fatarcs_fcts.hpp:66
size_type size() const
Definition: Seq.hpp:166
box_t box
Definition: fatarcs.hpp:318
Interval< T, r > min(const Interval< T, r > &a, const Interval< T, r > &b)
Definition: Interval_fcts.hpp:130
seqint_t I
Definition: fatarcs.hpp:31
seq_t arc_eq()
Definition: fatarcs.hpp:173
bool is_small(C p)
Definition: fatarcs_fcts.hpp:110
Seq< C > delta()
Definition: fatarcs.hpp:76
vec_t critpt(int var)
Definition: fatarcs.hpp:191
Seq< C > solve2(C a, C b, C c)
Definition: fatarcs_fcts.hpp:124
Definition: polynomial.hpp:37
#define SIZE
Definition: fatarcs_fcts.hpp:6
ZZ size(const ZZ &z)
Definition: GMPXX.hpp:67
std::vector< C > crossrat(std::vector< C > v1, std::vector< C > v2, std::vector< C > v3, std::vector< C > v4)
Definition: fatarcs_fcts.hpp:95
T median(const Interval< T, r > &x)
Definition: Interval_fcts.hpp:91
scalar< T > sqrt(const scalar< T > &b)
Definition: scalar.hpp:501
domain< C > minmax_box(Seq< std::vector< C > > ispts, domain< C > box)
Definition: fatarcs_fcts.hpp:476
bool is_unit1(C p)
Definition: fatarcs_fcts.hpp:138
std::vector< C > vec(const C c1, const C c2)
Definition: fatarcs_fcts.hpp:25
C dot(std::vector< C > p, std::vector< C > q)
Definition: fatarcs_fcts.hpp:37
Generic class for intervals.
Definition: Interval.hpp:44
const C & c
Definition: Interval_glue.hpp:45
Definition: fatarcs.hpp:119
double C
Definition: solver_mv_fatarcs.cpp:16
std::vector< C > matrat(std::vector< C > v1, std::vector< C > v2)
Definition: fatarcs_fcts.hpp:89
int sign(const QQ &a)
Definition: GMP.hpp:60
bernstein_t poly
Definition: fatarcs.hpp:319
C max_coeff(polynomial< C, with< Bernstein > > poly)
Definition: fatarcs_fcts.hpp:232
std::vector< C > v_plus(std::vector< C > p, std::vector< C > q)
Definition: fatarcs_fcts.hpp:46
C v_length(std::vector< C > p)
Definition: fatarcs_fcts.hpp:84
void circ_is(std::vector< C > *ispts, arc_rep< C > c1, arc_rep< C > c2)
Definition: fatarcs_fcts.hpp:369
Interval< T, r > max(const Interval< T, r > &a, const Interval< T, r > &b)
Definition: Interval_fcts.hpp:135
Definition: array.hpp:12
void add(dynamic_exp< E > &r, const dynamic_exp< E > &A, const dynamic_exp< E > &B)
Definition: dynamicexp.hpp:295
Definition: polynomial.hpp:40
polynomial< C,with< Bernstein > > seq2b(Seq< C > coeffseq)
Definition: fatarcs_fcts.hpp:190
std::vector< C > v_minus(std::vector< C > p, std::vector< C > q)
Definition: fatarcs_fcts.hpp:56
T binomial(int n, int p)
Definition: binomials.hpp:52
#define assert(expr, msg)
Definition: shared_object.hpp:57
Home