Test file for the interpolations.
More...
#include <cmath>
#include <iostream>
#include <cstdio>
#include "GaudiKernel/SystemOfUnits.h"
#include "GaudiMath/GaudiMath.h"
Go to the source code of this file.
Test file for the interpolations.
- Date
- 2003-08-31
- Author
- Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@i.nosp@m.tep..nosp@m.ru
Definition in file InterpTest.cpp.
make interpolation of "sin", 10 points from 0 to pi
the first derivative
the second derivative. multiplied by -1
-1*integral(0.0)
Definition at line 23 of file InterpTest.cpp.
{
std::vector<double> vctx ;
std::vector<double> vcty ;
for (
int i = 0 ;
i < 20 ; ++
i )
{
double x =
i * 3.141592/20.0 ;
double y = mysin ( x ) ;
vctx.push_back ( x ) ;
vcty.push_back ( y ) ;
}
for (
int i = -10 ;
i < 30 ; ++
i ) {
double x =
i * 3.141592/30.0 ;
printf( "x=%+7.1f; Sin-i1=%+14.9f; Cos-i2=%+14.9f; Sin-i3=%+14.9f; Cos-i4=%+14.9f;\n",
x / Gaudi::Units::degree,
mysin ( x ) - i1( x ),
mycos ( x ) - i2( x ),
mysin ( x ) - i3( x ),
mycos ( x ) - i4( x ));
}
exit(0);
}