#include "sopnamsp.h" #include "machdefs.h" #include #include #include #include #include #include #include "srandgen.h" #include "timing.h" #include "tvector.h" #include "ntuple.h" #include "geneutils.h" // test vitesse d'interpolation int main(int narg,char *arg[]) { unsigned short typint=0; // 0=near 1=linear 2=parab int ntry=1000; int npt = 1000; double xmin=0., xmax=1.; if(narg>1) sscanf(arg[1],"%d",&ntry); if(narg>2) sscanf(arg[2],"%hu",&typint); cout<<"ntry="< X, Y; double dx = (xmax-xmin)/npt; double lamb = (xmax-xmin)/20.; for(int i=0;i<=npt;i++) { double x = xmin + dx*i + dx/3.*drandpm1(); X.push_back(x); double y = sin( 2.*M_PI * x / lamb ); Y.push_back(y); } const char *vname[2] = {"x","v"}; NTuple nt(2,vname); double xnt[2]; InitTim(); double sumtot = 0.; int lptry = ntry/5; if(lptry==0) lptry = 1; for(int itry=0;itry VX(X); TVector VY(Y); pos.PutObject(VX,"x"); pos.PutObject(VY,"y"); pos.PutObject(nt,"nt"); } return 0; } /* openppf cmvtinttab.ppf n/plot x.val%n ! ! "plusmarker3" n/plot y.val%n ! ! "plusmarker3" vecplot x y "plusmarker3" n/plot nt.v%x ! ! "plusmarker3" vecplot x y "circlemarker5 same red" */