All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GSLAdaptersTest.cpp
Go to the documentation of this file.
1 // $Id: GSLAdaptersTest.cpp,v 1.2 2005/11/25 10:27:03 mato Exp $
2 // ============================================================================
3 // Include file
4 // ============================================================================
5 // STD & STL
6 // ============================================================================
7 #include <stdio.h>
8 #include <iostream>
9 // ============================================================================
10 // GaudiGSL/GaudiMath
11 // ============================================================================
12 #include "GaudiMath/GaudiMath.h"
13 // ============================================================================
14 // GSL
15 // ============================================================================
16 #include "gsl/gsl_sf_bessel.h"
17 // ============================================================================
18 
25 int main()
26 {
27 
29  const GaudiMath::Function& I0 = GaudiMath::adapter( gsl_sf_bessel_I0 ) ;
31  const GaudiMath::Function& I1 = GaudiMath::adapter( gsl_sf_bessel_I1_e ) ;
32 
33  for( int i = 0 ; i < 20 ; ++i )
34  {
35  const double x = double(i) * 1 / 20.0 ;
36  const double x0 = I0( x ) ;
37  const double x1 = I1( x ) ;
38  printf( " x = %+8.4f I0=%15.8f I1=%15.8f \n" , x , x0 , x1 );
39  };
40 
41 
42  exit(0);
43 }
44 
Genfun::AbsFunction Function
Definition: GaudiMath.h:26
int main()
GAUDI_API AIDAFunction adapter(const AIDA::IFunction &function)
Definition: Adapters.cpp:28
list i
Definition: ana.py:128