#include #include #include #include #include #include #include "slininterp.h" using namespace std; #include "array.h" #include "tarrinit.h" #include "sopnamsp.h" //------------------------------------------- // --- Test program for class SLinInterp1D : //------------------------------------------- int main(int narg, char* arg[]) { cout << " +++++++ Programme test de la classe SLinInterp1D +++++++ " << endl; // To compile without SOPHYA : Comment the following line TArrayInitiator arrinit_; try { vector xs; vector ys; vector yreg; double lesx[6] = {2.,3.,5.,9.5,11.,14.}; for(int i=0;i<6; i++) { xs.push_back(lesx[i]); ys.push_back(lesx[i]*lesx[i]); } double xmin = 0.5; double xmax = 0.; for(int i=0; i<=12; i++) { xmax = xmin+i*0.05; yreg.push_back(sin(xmax)*cos(2.2*xmax)); } { cout << " --- Creating file finterpXY.dat from xs,ys vectors ..." << endl; ofstream ofxy("finterpXY.dat"); ofxy << "# Test file finterpXY.dat for SLinInterp1D class " << endl; for(size_t i=0; i