| # Gaudi Framework, version v21r7p1 |

Home |  | Generated: 15 Feb 2010

# Genfun::GaudiMathImplementation::GSLSpline Class Reference

`#include <Splines.h>`

Collaboration diagram for Genfun::GaudiMathImplementation::GSLSpline:

[legend]

List of all members.

## Public Types
typedef SplineBase::Data1D | Data1D
typedef SplineBase::Data2D | Data2D
## Public Member Functions
| FUNCTION_OBJECT_DEF (GSLSpline)
| mandatory macro from CLHEP/GenericFunctions
| GSLSpline (const Data1D &x, const Data1D &y, const GaudiMath::Interpolation::Type type)
| constructor from vectors and type
| GSLSpline (const Data2D &data, const GaudiMath::Interpolation::Type type)
| constructor from data vector
template<class DATAX, class DATAY>
| GSLSpline (const GaudiMath::Interpolation::Type type, DATAX begin_x, DATAX end_x, DATAY begin_y)
| templated constructor in the spirit of STL-algorithms
template<class DATA>
| GSLSpline (const GaudiMath::Interpolation::Type type, DATA begin, DATA end)
| templated constructor from the sequence of pairs as sequence of pairs the class TabulatedProperty can be used
| GSLSpline (const SplineBase &)
| constructor from base
| GSLSpline (const GSLSpline &)
| copy constructor
virtual | ~GSLSpline ()
| destructor
virtual double | operator() (double a) const
| main methgod: evaluate teh function
virtual double | operator() (const Argument &x) const
| main methgod: evaluate teh function
virtual unsigned int | dimensionality () const
virtual bool | hasAnalyticDerivative () const
| Does this function have an analytic derivative?
virtual Genfun::Derivative | partial (unsigned int i) const
| Derivatives.
const SplineBase & | spline () const
| acess to the spline function
| operator const SplineBase & () const
| cast operator to the spline function
## Private Member Functions
| GSLSpline ()
| default construtor is desabled ;
GSLSpline & | operator= (const GSLSpline &)
| assignement operator is desabled ;
## Private Attributes
SplineBase | m_spline

## Detailed Description

Definition at line 140 of file Splines.h.

## Member Typedef Documentation

typedef SplineBase::Data1D Genfun::GaudiMathImplementation::GSLSpline::Data1D

Definition at line 143 of file Splines.h.

typedef SplineBase::Data2D Genfun::GaudiMathImplementation::GSLSpline::Data2D

Definition at line 144 of file Splines.h.

## Constructor & Destructor Documentation

Genfun::GaudiMathImplementation::GSLSpline::GSLSpline | ( | const Data1D & | x,
|  | const Data1D & | y,
|  | const GaudiMath::Interpolation::Type | type |
| ) |  |  |

constructor from vectors and type

       Data1D x = .. ;
       Data1D y = .. ;

       const AbsFunction& func =
            GSLSpline( x , y , GaudiMath::Interpolation::Cspline ) ;

       const double value = 1 ;
       const double result = func( value ) ;

Parameters:

  | x | vector of x
  | y | vector of y
  | type | interpolation type

       Data1D x = .. ;
       Data1D y = .. ;

       const AbsFunction& func =
            GSLSpline( x , y , GaudiMath::Interpolation::Cspline ) ;

       const double value = 1 ;
       const double result = func( value ) ;

Parameters:

  | x | vector of x
  | y | vector of y
  | type | interpolation type

Definition at line 203 of file Splines.cpp.

    00206       : AbsFunction ()
    00207       , m_spline ( x , y , type )
    00208     {}

Genfun::GaudiMathImplementation::GSLSpline::GSLSpline | ( | const Data2D & | data,
|  | const GaudiMath::Interpolation::Type | type |
| ) |  |  |

constructor from data vector

       Data2D data = ... ;

       const AbsFunction& func =
            GSLSpline( data , GaudiMath::Interpolation::Cspline );

       const double value = 1 ;
       const double result = func( value ) ;

Parameters:

  | data | vector of (x,y) pairs
  | type | interpolation type

       Data2D data = ... ;

       const AbsFunction& func =
            GSLSpline( data , GaudiMath::Interpolation::Cspline );

       const double value = 1 ;
       const double result = func( value ) ;

Parameters:

  | data | vector of (x,y) pairs
  | type | interpolation type

Definition at line 232 of file Splines.cpp.

    00234       : AbsFunction ()
    00235       , m_spline    ( data , type )
    00236     {}

template<class DATAX, class DATAY>

Genfun::GaudiMathImplementation::GSLSpline::GSLSpline | ( | const GaudiMath::Interpolation::Type | type,
|  | DATAX | begin_x,
|  | DATAX | end_x,
|  | DATAY | begin_y |
| ) |  |  | `[inline]`

templated constructor in the spirit of STL-algorithms

It is assumed that vector "y" has tehlength AT LEAST as long as "x"

       SEQURNCE1 x = .. ;
       SEQUENCE2 y = .. ;

       const AbsFunction& func =
            GSLSpline( GaudiMath::Interpoaltion::Cspline ,
                       x.begin ()  ,
                       x.end   ()  ,
                       y.begin ()  );

       const double value = 1 ;
       const double result = func( value ) ;

Parameters:

  | begin_x | begin of X-sequence
  | end_x | end of X-sequence
  | begin_Y | begin of Y-sequence
  | type | interpolation type

Definition at line 222 of file Splines.h.

    00226         : AbsFunction ( )
    00227         , m_spline( type , begin_x , end_x , begin_y )
    00228       {};

template<class DATA>

Genfun::GaudiMathImplementation::GSLSpline::GSLSpline | ( | const GaudiMath::Interpolation::Type | type,
|  | DATA | begin,
|  | DATA | end |
| ) |  |  | `[inline]`

templated constructor from the sequence of pairs as sequence of pairs the class TabulatedProperty can be used

Parameters:

  | begin | begin of sequence of pairs
  | end | end of sequence of pairs
  | type | interpolation type

Definition at line 242 of file Splines.h.

    00245         : AbsFunction ( )
    00246         , m_spline( type , begin , end )
    00247       {};

Genfun::GaudiMathImplementation::GSLSpline::GSLSpline | ( | const SplineBase & | right | ) |

constructor from base

constructor from SplineBase

Definition at line 243 of file Splines.cpp.

    00244       : AbsFunction ()
    00245       , m_spline    ( right )
    00246     {}

Genfun::GaudiMathImplementation::GSLSpline::GSLSpline | ( | const GSLSpline & | right | ) |

copy constructor

Definition at line 253 of file Splines.cpp.

    00254       : AbsFunction ()
    00255       , m_spline    ( right  )
    00256     {}

Genfun::GaudiMathImplementation::GSLSpline::~GSLSpline | ( |  | ) | `[virtual]`

destructor

Definition at line 262 of file Splines.cpp.

    00262 {}

Genfun::GaudiMathImplementation::GSLSpline::GSLSpline | ( |  | ) | `[private]`

default construtor is desabled ;

## Member Function Documentation

Genfun::GaudiMathImplementation::GSLSpline::FUNCTION_OBJECT_DEF | ( | GSLSpline |  | ) |

mandatory macro from CLHEP/GenericFunctions

double Genfun::GaudiMathImplementation::GSLSpline::operator() | ( | double | a | ) | const`[virtual]`

main methgod: evaluate teh function

Definition at line 266 of file Splines.cpp.

    00267     { return m_spline.eval( x    ) ; }

double Genfun::GaudiMathImplementation::GSLSpline::operator() | ( | const Argument & | x | ) | const`[virtual]`

main methgod: evaluate teh function

Definition at line 269 of file Splines.cpp.

    00270     { return m_spline.eval( x[0] ) ; }

virtual unsigned int Genfun::GaudiMathImplementation::GSLSpline::dimensionality | ( |  | ) | const`[inline, virtual]`

Definition at line 259 of file Splines.h.

    00259 { return 1   ; }

virtual bool Genfun::GaudiMathImplementation::GSLSpline::hasAnalyticDerivative | ( |  | ) | const`[inline, virtual]`

Does this function have an analytic derivative?

Definition at line 261 of file Splines.h.

    00261 { return true ; }

Genfun::Derivative Genfun::GaudiMathImplementation::GSLSpline::partial | ( | unsigned int | i | ) | const`[virtual]`

Derivatives.

Definition at line 276 of file Splines.cpp.

    00277     {
    00278       if ( i >= 1 )
    00279       {
    00280         const AbsFunction& aux = GaudiMath::Constant( 0.0 , 1 ) ;
    00281         return Genfun::FunctionNoop( &aux ) ;
    00282       }
    00283       const AbsFunction& aux = GSLSplineDeriv( *this ) ;
    00284       return Genfun::FunctionNoop( &aux ) ;
    00285     };

const SplineBase& Genfun::GaudiMathImplementation::GSLSpline::spline | ( |  | ) | const`[inline]`

acess to the spline function

Definition at line 266 of file Splines.h.

    00266 { return m_spline ; }

Genfun::GaudiMathImplementation::GSLSpline::operator const SplineBase & | ( |  | ) | const`[inline]`

cast operator to the spline function

Definition at line 268 of file Splines.h.

    00268 { return spline() ; }

GSLSpline& Genfun::GaudiMathImplementation::GSLSpline::operator= | ( | const GSLSpline & |  | ) | `[private]`

assignement operator is desabled ;

## Member Data Documentation

SplineBase Genfun::GaudiMathImplementation::GSLSpline::m_spline`[private]`

Definition at line 276 of file Splines.h.

The documentation for this class was generated from the following files:

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r7p1/GaudiGSL/GaudiMath/Splines.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r7p1/GaudiGSL/src/Lib/Splines.cpp