#include "machdefs.h" #include "toimanager.h" #include "pexceptions.h" #include "smoothtoi.h" //////////////////////////////////////////////////////////////////////// // Calcul d'une valeur lissee // |--lsm--||--lsm--| //////////////////////////////////////////////////////////////////////// DataSmooth::DataSmooth(uint_4 lsm,uint_4 deg) : LSmooth(lsm), DegSmooth(deg) { if(DegSmooth>2) DegSmooth=2; if(LSmoothsne) { cout<<"DataSmooth::run() - Bad sample interval"<<---lms---> // | | // ideb ifin int_4 ideb=sn-1, ifin=sn+LSmooth; if(ideb>=snb) { r_8 bol; uint_8 fgb=0; getData(0,ideb,bol,fgb); if(fgb&flgNotLookAt) slb0.Pop(); else slb0.Push((r_8)ideb,bol); } if(ifin<=sne) { r_8 bol; uint_8 fgb=0; getData(0,ifin,bol,fgb); if(fgb&flgNotLookAt) slb1.Pop(); else slb1.Push((r_8)ifin,bol); } else slb1.Pop(); slbm.Reset(); slbm.Add(slb0); slbm.Add(slb1); if(slbm.NPoints()>=LSmoothMin) { r_8 s=-1.,a0,a1=0.,a2=0.; if(DegSmooth==0) s = slbm.Compute(a0); else if(DegSmooth==1) s = slbm.Compute(a0,a1); else if(DegSmooth==2) s = slbm.Compute(a0,a1,a2); if(s>=0.) { bolo -= a0 + (a1 + a2*sn)*sn; } else { fgbolo |= flgNotSmoothed; notsmoothed++; } } else { fgbolo |= flgNotSmoothed; notsmoothed++; } putData(0,sn,bolo,fgbolo); }} cout<<"DataSmooth::run(): Fin de boucle: notsmoothed="<