7 #include "gsl/gsl_interp.h"
8 #include "gsl/gsl_spline.h"
26 namespace GaudiMathImplementation
39 , m_x (
new double[ x.
size() ] )
40 , m_y (
new double[ y.
size() ] )
50 #pragma warning(disable:4996)
71 , m_dim ( data.
size() )
72 , m_x (
new double[ data.
size() ] )
73 , m_y (
new double[ data.
size() ] )
80 for( Data2D::const_iterator it =
81 data.
begin() ; data.
end() != it ; ++it )
83 *_x = it -> first ; ++_x ;
84 *_y = it ->
second ; ++_y ;
94 , m_dim ( right.m_dim )
95 , m_x ( new double[ right.m_dim ] )
96 , m_y ( new double[ right.m_dim ] )
99 , m_type ( right.m_type )
114 if ( 0 !=
m_x ) {
delete[]
m_x ; }
115 if ( 0 !=
m_y ) {
delete[]
m_y ; }
122 if (
m_init ) { return ; }
124 const gsl_interp_type* T = 0 ;
129 T = gsl_interp_linear ; break ;
131 T = gsl_interp_polynomial ; break ;
133 T = gsl_interp_cspline ; break ;
135 T = gsl_interp_cspline_periodic ; break ;
137 T = gsl_interp_akima ; break ;
139 T = gsl_interp_akima_periodic ; break ;
141 T = gsl_interp_cspline ; break ;
148 m_accel = gsl_interp_accel_alloc() ;
181 const double b )
const
218 const GaudiMath::Interpolation::
Type type )
220 , m_spline ( x , y , type )
248 , m_spline ( data , type )
294 return Genfun::FunctionNoop( &aux ) ;
297 return Genfun::FunctionNoop( &aux ) ;
330 const GaudiMath::Interpolation::
Type type )
332 , m_spline ( x , y , type )
360 , m_spline ( data , type )
406 return Genfun::FunctionNoop( &aux ) ;
409 return Genfun::FunctionNoop( &aux ) ;
442 const GaudiMath::Interpolation::
Type type )
444 , m_spline ( x , y , type )
472 , m_spline ( data , type )
518 return Genfun::FunctionNoop( &aux ) ;
521 return Genfun::FunctionNoop( &aux ) ;
555 const GaudiMath::Interpolation::
Type type ,
558 , m_spline ( x , y , type )
588 , m_spline ( data , type )
612 , m_low ( right.
m_low )
638 return Genfun::FunctionNoop( &aux ) ;
640 const AbsFunction& aux =
GSLSpline( *
this ) ;
641 return Genfun::FunctionNoop( &aux ) ;