MAGiC  V5.0
Mailleurs Automatiques de Géometries intégrés à la Cao
fct_generateur_fichier.cpp
Aller à la documentation de ce fichier.
1 //####//------------------------------------------------------------
2 //####//------------------------------------------------------------
3 //####// MAGiC
4 //####// Jean Christophe Cuilliere et Vincent FRANCOIS
5 //####// Departement de Genie Mecanique - UQTR
6 //####//------------------------------------------------------------
7 //####// MAGIC est un projet de recherche de l equipe ERICCA
8 //####// du departement de genie mecanique de l Universite du Quebec a Trois Rivieres
9 //####// http://www.uqtr.ca/ericca
10 //####// http://www.uqtr.ca/
11 //####//------------------------------------------------------------
12 //####//------------------------------------------------------------
13 //####//
14 //####// fct_generateur_fichier.cpp
15 //####//
16 //####//------------------------------------------------------------
17 //####//------------------------------------------------------------
18 //####// COPYRIGHT 2000-2024
19 //####// jeu 13 jun 2024 11:58:52 EDT
20 //####//------------------------------------------------------------
21 //####//------------------------------------------------------------
22 
23 
24 #include "gestionversion.h"
25 
26 #pragma hdrstop
27 
28 
29 #include <math.h>
30 #include "fct_generateur_fichier.h"
31 #include "mg_gestionnaire.h"
32 #include "ct_face.h"
33 #include "ct_point.h"
34 #include "stdlib.h"
35 #include <fstream>
36 
37 
38 FCT_GENERATEUR_FICHIER::FCT_GENERATEUR_FICHIER(std::string nomfich,double dn,double ind1,double ind2):FCT_GENERATEUR_ECHANTILLONAGE_ESTIMATION(dn,ind1,ind2),nomfichier(nomfich)
39 {
40 }
41 
42 
44 {
45 }
46 
47 
48 
50 {
51  FILE *in =fopen(nomfichier,"rt");
52  if (in==NULL)
53  return;
54 
55  std::string f2;
56  char c;
57  while (1)
58  {
59  c = fgetc(in);
60  if (c != EOF)
61  {
62  if (c == ',') c='.';
63  f2 += c;
64  }
65  else
66  break;
67  }
68  fclose(in);
69 
70  std::ofstream file;
71  file.open(nomfichier);
72  file << f2;
73  file.close();
74 }
75 
76 
78 {
80  FILE *in =fopen(nomfichier.c_str(),"rt");
81  if (in!=NULL)
82  {
83  char message[500];
84  char* res=fgets(message,255,in);
85  sscanf(message,"%lf %lf %lf %lf %lf %lf ",&xmin,&ymin,&zmin,&xmax,&ymax,&zmax);
86  res=fgets(message,255,in);
87  sscanf(message,"%lf ",&dng);
88  while (!feof(in))
89  {
90  res=fgets(message,255,in);
91  double x,y,z,coef;
92  double lambda=zonezoom;
93  double courbure=0;
94  int nb=sscanf(message,"%lf %lf %lf %lf %lf %lf ",&x,&y,&z,&coef,&lambda,&courbure);
95  if (nb<=3) continue;
96  double dist=dng*(1-coef)*lambda;
97  BOITE_3D boite(x-dist,y-dist,z-dist,x+dist,y+dist,z+dist);
98  double dn=coef*dng;
99  DOUBLEN<1> ecart(&dn);
100  CT_POINT<1>* pt=new CT_POINT<1>(x,y,z,ecart,boite,courbure);
101  lstpoint.ajouter(pt);
102 
103  }
104  fclose(in);
105  }
106 }
107 
108 
109 
110 
111 void FCT_GENERATEUR_FICHIER::construit(int pas_echan,int pas_estima,MG_GROUPE_TOPOLOGIQUE* mggt)
112 {
113  pas_echantillon=pas_echan;
114  pas_estimation=pas_estima;
115  echantillonner();
116  estimation();
117 }
118 
119 
120 bool FCT_GENERATEUR_FICHIER::calibrage_fonction_newton(double eni, double *fonction, double &cr, double &er, double err, int type)
121 {
122  double x, dx, y, z, fx, dc1, dc2, ds, emoins, eplus, er_crt, rm, Eprimmoins, Eprimplus, cmin, cmax = 0;
123  int i, div, div1, div2, n_min =0;
124  double minim[2][2]; //tableau contenu les deux minimums trouv�s, d�finins par leur c et E
125 
126  er_crt=err;
127 
128 
129 
130 
131  double c[4]; //tableau compos� de {ci,ci-1,cimin,cimin2,}
132  double E[5]; //tableau compos� de {Ei,Ei-1,Ei min,Ei min2,E associ� � Eprim min}
133  double Eprim[4]; //tableau compos� de {Eprimi,Eprimi-1, Eprim min, Eprim min2}
134  double Esec[2]; //tableau compos� de {Eseci,Eseci-1}
135 
136  double clarge[100];
137  for (i=0;i<100;i++) clarge[i]=0;
138  double elarge[100];
139  for (i=0;i<100;i++) elarge[i]=0;
140 
141  dx=0.02;
142 
143 
144 
145 
146 
147 
148  i = 0;
149 
150  dc1 = 5; //pr�cision de recherche des minimums
151 
152 
153 
154  for (c[0]=-50-2*dc1;c[0]<50;c[0]+=dc1) //--------Boucle de recherche de c
155  {
156 
157  eval_erreur(fonction, eni, c[0],er_crt, type, elarge[i], emoins, eplus,dx);
158  if (i)
159  {
160  Eprim[0]=(elarge[i]-elarge[i-1])/dc1;
161 
162  if (Eprim[0]*Eprim[1]<0 && i>1)
163  {
164  clarge[n_min]=c[0]-dc1;
165  clarge[n_min+1]=c[0];
166  n_min+=2;
167  }
168  Eprim[1]=Eprim[0];
169  }
170  i++;
171  }
172 
173  if (!n_min)
174  {
175  return false;
176  }
177 
178  dc2 = 0.001; //pr�cision d'aproximation de la d�riv�e en une fonction du premier ordre
179  for (i=0;i<4;i++)
180  {
181  c[i] = 0;
182  E[i] = 0;
183  if (i<2) Eprim[i] = 1;
184  if (i<2) Esec[i] = 0;
185  }
186 
187 
188 
189  c[0]=0;
190  Eprim[2]=1;
191  Eprim[3]=1;
192  div=0;
193  div1=0;
194  div2=0;
195  i=0;
196 
197  for (int nm=0; nm<n_min; nm++)
198  {
199  cmin=clarge[nm]-dc1;
200  cmax=clarge[nm]+dc1;
201  c[0]=clarge[nm];
202 
203  while (div < 2)
204  {
205 
206 
207  if (i)
208  {
209  c[1]=c[0];
210  E[1]=E[0];
211  Eprim[1]=Eprim[0];
212  E[0]=0;
213  Eprim[0]=0;
214  Esec[1]=Esec[0];
215 
216  //------calcul de ci
217  if (!div)
218  {
219  if (div2>10)
220  {
221  c[0]=(E[3]*c[2]+E[2]*c[3])/(E[3]+E[2]);
222  div2++;
223  }
224  else c[0] = -E[1]/Eprim[1] + c[1];
225  }
226  else
227  {
228  if (div2>5)
229  {
230  c[0]=(Eprim[3]*c[2]+Eprim[2]*c[3])/(Eprim[3]+Eprim[2]);
231  div2=0;
232  }
233  else c[0] = -Eprim[1]/Esec[1] + c[1];
234  }
235 
236  if (div1)
237  {
238  c[0]=minim[0][0];
239  div1=0;
240  }
241  }
242 
243  if (c[0] > cmax) c[0]=cmax;
244  if (c[0] < cmin) c[0]=cmin;
245 
246  eval_erreur(fonction, eni, c[0],er_crt, type, E[0], emoins, eplus,dx);
247 
248 
249 
250  Eprim[0] = (eplus - emoins) / (2 * dc2);
251 
252 
253  Eprimmoins=(E[0]-emoins)/dc2;
254  Eprimplus=(eplus-E[0])/dc2;
255 
256  Esec[0]=(Eprimplus-Eprimmoins)/dc2;
257 
258  if (!i)
259  {
260  c[2]=c[0];
261  c[3]=c[0];
262  E[2]=E[0];
263  E[3]=E[0];
264  Eprim[2]=Eprim[0];
265  Eprim[3]=Eprim[0];
266  E[4]=E[0];
267  }
268  else
269  {
270  if (!div)
271  {
272  if (E[0] < E[2])
273  {
274  c[3]=c[2];
275  E[3]=E[2];
276  c[2]=c[0];
277  E[2]=E[0];
278  }
279  else if (E[0] < E[3] || i==1)
280  {
281  c[3]=c[0];
282  E[3]=E[0];
283  }
284  else div2++;
285  }
286  else
287  {
288  if (fabs(Eprim[0]) < fabs(Eprim[2]))
289  {
290  c[3]=c[2];
291  Eprim[3]=Eprim[2];
292  c[2]=c[0];
293  Eprim[2]=Eprim[0];
294  E[4]=E[0];
295  }
296 
297  else if (fabs(Eprim[0]) < fabs(Eprim[3]))
298  {
299  c[3]=c[0];
300  Eprim[3]=Eprim[0];
301  }
302  else div2++;
303  }
304  }
305 
306 
307 
308  if (div2>15)
309  {
310  minim[0][0]=c[2];
311  minim[0][1]=E[2];
312  div++;
313  div1=1;
314  div2=0;
315  }
316  if (div && (fabs(Eprim[0])<0.000000001 || E[2]<0.000000001 || i>150))
317  {
318  minim[1][0]=c[2];
319  minim[1][1]=E[4];
320  div++;
321  }
322 
323  i++;
324  }
325 
326  if (minim[0][1]<minim[1][1]) {
327  clarge[nm]=minim[0][0];
328  elarge[nm]=minim[0][1];
329  }
330  else {
331  clarge[nm]=minim[1][0];
332  elarge[nm]=minim[1][1];
333  }
334 
335  if (!nm) {
336  er=elarge[nm];
337  cr=clarge[nm];
338  }
339  else if (elarge[nm]<er) {
340  er=elarge[nm];
341  cr=clarge[nm];
342  }
343 
344  }
345 
346 
347  if (type)
348  {
349  er=er*dx/(dng*dng);
350  }
351  else
352  {
353  er=er*dx/(2*dng*dng);
354  }
355 
356 
357  eval_erreur(fonction, eni, cr, er_crt, type, E[0],emoins, eplus,dx,1); // stockage pog
358  return true;
359 
360 }
361 
362 
363 
364 
365 bool FCT_GENERATEUR_FICHIER::calibrage_fonction_rech(double eni, double *fonction, double &cr, double &er, double err, int type)
366 {
367  double x, dx, y, z, dc, er_crt, rm, emoins, eplus = 0;
368  int i= 0;
369  double minim[2][2]; //tableau contenu les deux minimums trouv�s, d�finins par leur c et E
370 
371  er_crt=err;
372 
373 
374  double c[4]; //tableau compos� de {ci,ci-1,cimin,cimin2,}
375  double E[4]; //tableau compos� de {Ei,Ei-1,Ei min,Ei min2,E associ� � Eprim min}
376 
377 
378  dx=0.02;
379 
380 
381  dc = 0.01; //pr�cision de recherche
382 
383  for (i=0;i<4;i++)
384  {
385  c[i] = 0;
386  E[i] = 0;
387  }
388 
389 
390 
391  c[0]=0;
392  i = 0;
393 
394  for (c[0]=-15;c[0]<15;c[0]+=dc) //--------Boucle de recherche de c
395  {
396 
397 
398  eval_erreur(fonction, eni, c[0],er_crt, type, E[0], emoins, eplus,dx);
399 
400  if (!i)
401  {
402  c[2]=c[0];
403  c[3]=c[0];
404  E[2]=E[0];
405  E[3]=E[0];
406  }
407  else
408  {
409  if (E[0] < E[2])
410  {
411  c[3]=c[2];
412  E[3]=E[2];
413  c[2]=c[0];
414  E[2]=E[0];
415  }
416  else if (E[0] < E[3])
417  {
418  c[3]=c[0];
419  E[3]=E[0];
420  }
421  }
422 
423  i++;
424  }
425 
426 
427 
428  cr=c[2];
429  er=E[2];
430  if (type)
431  {
432  er=er*dx/(dng*dng);
433  }
434  else
435  {
436  er=er*dx/(2*dng*dng);
437  }
438 
439  eval_erreur(fonction, eni, cr, er_crt, type, E[0],emoins, eplus,dx,1); // stockage pog
440  return true;
441 
442 }
443 
444 void FCT_GENERATEUR_FICHIER::eval_erreur(double *fct, double eni, double courb, double er_c, int type, double &er, double &erm, double &erp,double dx, int stockage_fichier)
445 {
446 
447  double x=0;
448  double y=0;
449  double z=0;
450  double e=0;
451  double emoins=0;
452  double eplus=0;
453  double fx=0;
454  double en=0;
455  double enm=0;
456  double enp=0;
457  double de=0;
458  double dem=0;
459  double dep=0;
460  double ds=0;
461  double n=0;
462  double a=0;
463  double b=0;
464  double dc;
465  double dist;
466  double cpd=0;
467 
468  int cp1=0;
469  int cp2=0;
470  int N=0;
471  int nb_point=0;
472 
473 
474 
475  double delta=zonezoom * (dng - eni);
476 
477  dc = 0.001; //--------pr�cision d'aproximation de la d�riv�e en une fonction du premier ordre
478 
479  CT_POINT<1>* pt;
480 
481 
482  xmin=-1.125*delta;
483  ymin=-1.125*delta;
484  zmin=-1.125*delta;
485  xmax=1.125*delta;
486  ymax=1.125*delta;
487  zmax=1.125*delta;
488 
490  grille.initialiser(boite.get_xmin(),boite.get_ymin(),boite.get_zmin(),boite.get_xmax(),boite.get_ymax(),boite.get_zmax(),20,20,20);
491  BOITE_3D boitep(xmin,ymin,zmin,xmax,ymax,zmax);
492 
493 
494 
495  switch (type)
496  {
497 
498  case 0:
499  {
500  //---- g�n�ration d'un seul point d'�chantillonnage si type=0
501  dist=(dng-eni)*zonezoom;
502  boitep.reinit(x-dist,y-dist,z-dist,x+dist,y+dist,z+dist);
503  DOUBLEN<1> ecart(&eni);
504  pt=new CT_POINT<1>(x,y,z,ecart,boitep);
505  lstpoint.ajouter(pt);
506  grille.inserer(pt);
507 
508  } break;
509 
510 
511  case 1:
512  {
513 
514 
515  ds = distance_max_entre_points(eni, courb, er_c);
516 
517  n = std::max(1., floor(2 * delta / ds - 0.0001) + 1);
518 
519 
520  N=floor(n/2);
521  a=-N+1;
522  b=N+1;
523  if (N!=n/2) b++;
524 
525  for (cp1 = a;cp1<b;cp1++)
526  {
527  y = cp1 * ds - ds/2;
528  dist=(dng-eni)*zonezoom;
529  boitep.reinit(x-dist,y-dist,z-dist,x+dist,y+dist,z+dist);
530  DOUBLEN<1> ecart(&eni);
531  pt=new CT_POINT<1>(x,y,z,ecart,boitep);
532  lstpoint.ajouter(pt);
533  grille.inserer(pt);
534  }
535 
536  }
537  break;
538 
539  case 2:
540  {
541 
542 
543  ds = distance_max_entre_points(eni, courb, er_c);
544 
545  n = std::max(1., floor(2 * delta / ds - 0.0001) + 1);
546 
547 
548  N=floor(n/2);
549  a=-N+1;
550  b=N+1;
551  if (N!=n/2) b++;
552 
553  for (cp1 = a;cp1<b;cp1++)
554  {
555  for (cp2 = a;cp2<b;cp2++)
556  {
557  y = cp1 * ds - ds/2;
558  z = cp2 * ds - ds/2;
559  dist=(dng-eni)*zonezoom;
560  boitep.reinit(x-dist,y-dist,z-dist,x+dist,y+dist,z+dist);
561  DOUBLEN<1> ecart(&eni);
562  pt=new CT_POINT<1>(x,y,z,ecart,boitep);
563  lstpoint.ajouter(pt);
564  grille.inserer(pt);
565  }
566  }
567 
568  }
569  break;
570 
571  }
572 
573  if (stockage_fichier)
574  {
575 
576  FILE* in =fopen(nomfichier.c_str(),"w");
577  if (in!=NULL)
578  {
579  double coord[3];
580 
581  fprintf(in,"%lf %lf %lf %lf %lf %lf\n",xmin,ymin,zmin,xmax,ymax,zmax);
582  fprintf(in,"%lf\n",dng);
583  double coef= eni/dng;
584 
585  nb_point=lstpoint.get_nb();
586 
587  for (cp1=0;cp1<nb_point;cp1++)
588  {
589  CT_POINT<1> *pt=lstpoint.get(cp1);
590  pt->evaluer(coord);
591  fprintf(in,"%lf %lf %lf %lf %lf %lf\n",coord[0],coord[1],coord[2],coef,zonezoom,courb);
592  }
593 
594  }
595  fclose(in);
596 
597  return;
598  }
599 
600  x=0;
601  y=0;
602  z=0;
603 
604 
605  switch (type)
606  {
607 
608  case 0:
609  {
610 
611 
612 
613  for (x = 0;x<delta;x+=dx * delta)
614  {
615  fx = fonction_calibrage_theorique(x, eni, fct);
616  en = estimer(x,0,0,courb);
617  enm = estimer(x,0,0,courb-dc);
618  enp = estimer(x,0,0,courb+dc);
619 
620  de = (fx - en);
621  dem = (fx - enm);
622  dep = (fx - enp);
623 
624  e+= de*de;
625  emoins += dem*dem;
626  eplus += dep*dep;
627  }
628 
629  } break;
630 
631 
632  case 1:
633  {
634 
635 
636  for (cpd=0;cpd<0.6;cpd+=0.5)
637  {
638  for (x = 0;x<delta;x+=dx * delta)
639  {
640  fx = fonction_calibrage_theorique(x, eni, fct);
641  en = estimer(x,cpd*ds,0,courb);
642  enm = estimer(x,cpd*ds,0,courb-dc);
643  enp = estimer(x,cpd*ds,0,courb+dc);
644 
645  de = (fx - en);
646  dem = (fx - enm);
647  dep = (fx - enp);
648 
649  e+= de * de;
650  emoins += dem * dem;
651  eplus += dep * dep;
652  }
653  }
654  }
655  break;
656 
657  case 2:
658  {
659 
660 
661  for (cpd=0;cpd<0.6;cpd+=0.5)
662  {
663  for (x = 0;x<delta;x+=dx * delta)
664  {
665  fx = fonction_calibrage_theorique(x, eni, fct);
666  en = estimer(x,cpd*ds,cpd*ds,courb);
667  enm = estimer(x,cpd*ds,cpd*ds,courb-dc);
668  enp = estimer(x,cpd*ds,cpd*ds,courb+dc);
669 
670  de = (fx - en);
671  dem = (fx - enm);
672  dep = (fx - enp);
673 
674  e+= de * de;
675  emoins += dem * dem;
676  eplus += dep * dep;
677  }
678  }
679  }
680  break;
681 
682 
683  }
684 
685 
686  while (lstpoint.get_nb())
687  {
688  CT_POINT<1> *pt=lstpoint.get(0);
689  lstpoint.supprimer(pt);
690  grille.supprimer(pt);
691  delete pt;
692  }
693 
694 
695 
696  er=e;
697  erm=emoins;
698  erp=eplus;
699 
700 
701 }
702 
703 double FCT_GENERATEUR_FICHIER::distance_max_entre_points(double eni, double c,double err)
704 {
705  double r=0;
706  double d=0;
707  double enmax=(1+err)*eni;
708 
709 
710  if (c > 0.0001) r = 0.05 * (sqrt((zonetrans*(dng-enmax)-eni+enmax)*(zonetrans*(dng-enmax)-eni+enmax)-40*c*zonetrans*(eni-enmax)*(dng-enmax))-zonetrans*(dng-enmax)+eni-enmax)/(c*zonetrans*(dng-enmax));
711  if (c<=0.0001) r = (enmax-eni)/(zonetrans*(dng-enmax)-eni+enmax);
712 
713 
714  d = 2 * r * zonezoom * (dng -eni);
715 
716  return d;
717 
718 }
719 
720 
721 double FCT_GENERATEUR_FICHIER::fonction_calibrage_theorique(double x, double eni, double *f)
722 {
723  double fx=0;
724  double ci=0;
725  int i=0;
726  int j=0;
727  double delta=zonezoom * (dng - eni);
728  if (f[0])
729  {
730  for (i=0;i<f[0]+1;i++)
731  {
732  ci=f[i+1];
733  j=0;
734  while (j<i)
735  {
736  ci*=x;
737  j++;
738  }
739  fx+=ci;
740  }
741  }
742  else fx = eni + (dng - eni) * (x/delta);
743 
744 
745  return fx;
746 
747 }
748 
749 
750 
751 
752 
753 
754 #pragma package(smart_init)
755 
756 
757 
758 
759 
760 
761 
762 
763 
764 
765 
766 
767 
768 
FCT_GENERATEUR_ECHANTILLONAGE_ESTIMATION::xmax
double xmax
Definition: fct_generateur_echantillonage_estimation.h:51
FCT_GENERATEUR_ECHANTILLONAGE_ESTIMATION::estimation
virtual void estimation(void)
Definition: fct_generateur_echantillonage_estimation.cpp:46
FCT_GENERATEUR_ECHANTILLONAGE_ESTIMATION::lstpoint
TPL_LISTE_ENTITE< CT_POINT< 1 > * > lstpoint
Definition: fct_generateur_echantillonage_estimation.h:52
FCT_GENERATEUR_FICHIER::nomfichier
std::string nomfichier
Definition: fct_generateur_fichier.h:42
gestionversion.h
FCT_GENERATEUR_FICHIER::remplace_virgule_avec_point
static void remplace_virgule_avec_point(const char *nomfichier)
Definition: fct_generateur_fichier.cpp:49
BOITE_3D::get_xmin
double get_xmin(void)
Definition: ot_boite_3d.cpp:104
mg_gestionnaire.h
FCT_GENERATEUR_ECHANTILLONAGE_ESTIMATION::xmin
double xmin
Definition: fct_generateur_echantillonage_estimation.h:50
a
#define a(i, j)
ct_face.h
CT_POINT::evaluer
virtual void evaluer(double *xyz)
Definition: ct_point.cpp:49
FCT_GENERATEUR_FICHIER::fonction_calibrage_theorique
double fonction_calibrage_theorique(double x, double eni, double *f)
Definition: fct_generateur_fichier.cpp:721
CT_POINT
Definition: ct_point.h:31
FCT_GENERATEUR_3D< 4 >::grille
TPL_GRILLE_INFO< CT_POINT< 1 > *, DOUBLEN< N > > grille
Definition: fct_generateur_3d.h:56
FCT_GENERATEUR_FICHIER::echantillonner
void echantillonner(class MG_GROUPE_TOPOLOGIQUE *mggt=NULL)
Definition: fct_generateur_fichier.cpp:77
FCT_GENERATEUR_FICHIER::distance_max_entre_points
double distance_max_entre_points(double eni, double c, double err)
Definition: fct_generateur_fichier.cpp:703
BOITE_3D::get_zmax
double get_zmax(void)
Definition: ot_boite_3d.cpp:129
BOITE_3D::get_ymin
double get_ymin(void)
Definition: ot_boite_3d.cpp:114
f
double f(double x, long nb, double *xfonc, double *fonc, double eng, double eni, double lambda, double nor, double *fonc2)
Definition: fct_generateur_calibrage.cpp:96
FCT_GENERATEUR_ECHANTILLONAGE_ESTIMATION::ymax
double ymax
Definition: fct_generateur_echantillonage_estimation.h:51
FCT_GENERATEUR_FICHIER::calibrage_fonction_rech
bool calibrage_fonction_rech(double eni, double *fonction, double &cr, double &er, double err=0.1, int type=0)
Definition: fct_generateur_fichier.cpp:365
BOITE_3D::get_xmax
double get_xmax(void)
Definition: ot_boite_3d.cpp:109
FCT_GENERATEUR_ECHANTILLONAGE_ESTIMATION::zonezoom
double zonezoom
Definition: fct_generateur_echantillonage_estimation.h:46
FCT_GENERATEUR_ECHANTILLONAGE_ESTIMATION::ymin
double ymin
Definition: fct_generateur_echantillonage_estimation.h:50
TPL_LISTE_ENTITE::ajouter
virtual void ajouter(X x)
Definition: tpl_liste_entite.h:38
TPL_GRILLE_INFO::supprimer
virtual void supprimer(A a)
Definition: tpl_grille.h:512
TPL_LISTE_ENTITE::get_nb
virtual int get_nb(void)
Definition: tpl_liste_entite.h:67
BOITE_3D::reinit
void reinit(double xmin, double ymin, double zmin, double xmax, double ymax, double zmax)
Definition: ot_boite_3d.cpp:55
FCT_GENERATEUR_FICHIER::calibrage_fonction_newton
bool calibrage_fonction_newton(double eni, double *fonction, double &cr, double &er, double err=0.1, int type=0)
Definition: fct_generateur_fichier.cpp:120
TPL_LISTE_ENTITE::get
virtual X get(int num)
Definition: tpl_liste_entite.h:72
BOITE_3D::get_ymax
double get_ymax(void)
Definition: ot_boite_3d.cpp:119
TPL_GRILLE_INFO::inserer
virtual void inserer(A a)
Definition: tpl_grille.h:480
FCT_GENERATEUR_ECHANTILLONAGE_ESTIMATION::zmin
double zmin
Definition: fct_generateur_echantillonage_estimation.h:50
BOITE_3D
Definition: ot_boite_3d.h:27
FCT_GENERATEUR_ECHANTILLONAGE_ESTIMATION::pas_echantillon
int pas_echantillon
Definition: fct_generateur_echantillonage_estimation.h:44
FCT_GENERATEUR_FICHIER::FCT_GENERATEUR_FICHIER
FCT_GENERATEUR_FICHIER(std::string nomfich, double dn, double ind1=4, double ind2=0.5)
Definition: fct_generateur_fichier.cpp:38
sqrt
double2 sqrt(double2 &val)
Definition: ot_doubleprecision.cpp:345
MG_GROUPE_TOPOLOGIQUE
Definition: mg_groupe_topologique.h:31
FCT_GENERATEUR_ECHANTILLONAGE_ESTIMATION::zonetrans
double zonetrans
Definition: fct_generateur_echantillonage_estimation.h:47
FCT_GENERATEUR_ECHANTILLONAGE_ESTIMATION::pas_estimation
int pas_estimation
Definition: fct_generateur_echantillonage_estimation.h:45
FCT_GENERATEUR_ECHANTILLONAGE_ESTIMATION::zmax
double zmax
Definition: fct_generateur_echantillonage_estimation.h:51
BOITE_3D::get_zmin
double get_zmin(void)
Definition: ot_boite_3d.cpp:124
FCT_GENERATEUR_FICHIER::construit
void construit(int pas_echan=20, int pas_estima=20, class MG_GROUPE_TOPOLOGIQUE *mggt=NULL)
Definition: fct_generateur_fichier.cpp:111
fct_generateur_fichier.h
TPL_GRILLE_INFO::initialiser
virtual void initialiser(double xmin, double ymin, double zmin, double xmax, double ymax, double zmax, int nb_pasx, int nb_pasy, int nb_pasz)
Definition: tpl_grille.h:388
FCT_GENERATEUR_ECHANTILLONAGE_ESTIMATION::estimer
virtual double estimer(double x, double y, double z)
Definition: fct_generateur_echantillonage_estimation.cpp:130
res
#define res(i, j)
ct_point.h
DOUBLEN< 1 >
FCT_GENERATEUR_ECHANTILLONAGE_ESTIMATION
Definition: fct_generateur_echantillonage_estimation.h:31
TPL_LISTE_ENTITE::supprimer
virtual void supprimer(X x)
Definition: tpl_liste_entite.h:42
FCT_GENERATEUR_ECHANTILLONAGE_ESTIMATION::dng
double dng
Definition: fct_generateur_echantillonage_estimation.h:48
FCT_GENERATEUR_FICHIER::~FCT_GENERATEUR_FICHIER
~FCT_GENERATEUR_FICHIER()
Definition: fct_generateur_fichier.cpp:43
FCT_GENERATEUR_FICHIER::eval_erreur
void eval_erreur(double *fct, double eni, double courb, double er_c, int type, double &er, double &erm, double &erp, double dx, int stockage_fichier=0)
Definition: fct_generateur_fichier.cpp:444