Project
Loading...
Searching...
No Matches
o2::gpu::Spline2D< DataT, YdimT > Class Template Reference

#include <Spline2D.h>

Inherits o2::gpu::Spline2DSpec< DataT, YdimT, SpecT >.

Public Types

typedef TVeryBase::SafetyLevel SafetyLevel
 
typedef TVeryBase::Knot Knot
 

Public Member Functions

Spline2Doperator= (const Spline2D &v)
 Assignment operator.
 
 ClassDefNV (Spline2D, 0)
 

Static Public Member Functions

static Spline2DreadFromFile (TFile &inpf, const char *name)
 read a class object from the file
 

Detailed Description

template<typename DataT, int32_t YdimT = 0>
class o2::gpu::Spline2D< DataT, YdimT >

The Spline2D class performs a cubic spline interpolation on an two-dimensional nonunifom grid. The class is an extension of the Spline1D class. See Spline1D.h for more details.

The spline S(x1,x2) approximates a function F(x1,x2):R^2->R^m, with 2-dimensional domain and multi-dimensional codomain. x1,x2 belong to [x1min,x1max] x [x2min,x2max].

— Example of creating a spline —

auto F = [&](double x1, double x2, double f[] ) { f[0] = 1.f + x1 + x2*x2; // F(x1,x2) }; const int32_t nKnotsU=2; const int32_t nKnotsV=3; int32_t knotsU[nKnotsU] = {0, 1}; int32_t knotsV[nKnotsV] = {0, 2, 5}; Spline2D<float,1> spline(nKnotsU, knotsU, nKnotsV, knotsV ); // spline with 1-dimensional codomain spline.approximateFunction(0., 1., 0.,1., F); //initialize spline to approximate F on [0., 1.]x[0., 1.] area float S = spline.interpolate(.1, .3 ); // interpolated value at (.1,.3)

— See also Spline2DHelper::test(); ==================================================================================================

Declare the Spline1D class as a template with one optional parameters.

Class specializations depend on the XdimT, YdimT values. They can be found in SplineSpecs.h

Parameters
DataTdata type: float or double
YdimTYdimT > 0 : the number of Y dimensions is known at the compile time and is equal to XdimT YdimT = 0 : the number of Y dimensions will be set in the runtime YdimT < 0 : the number of Y dimensions will be set in the runtime, and it will not exceed abs(YdimT)

Definition at line 74 of file Spline2D.h.

Member Typedef Documentation

◆ Knot

template<typename DataT , int32_t YdimT = 0>
typedef TVeryBase::Knot o2::gpu::Spline2D< DataT, YdimT >::Knot

Definition at line 82 of file Spline2D.h.

◆ SafetyLevel

template<typename DataT , int32_t YdimT = 0>
typedef TVeryBase::SafetyLevel o2::gpu::Spline2D< DataT, YdimT >::SafetyLevel

Definition at line 81 of file Spline2D.h.

Member Function Documentation

◆ ClassDefNV()

template<typename DataT , int32_t YdimT = 0>
o2::gpu::Spline2D< DataT, YdimT >::ClassDefNV ( Spline2D< DataT, YdimT >  ,
 
)

◆ operator=()

template<typename DataT , int32_t YdimT = 0>
Spline2D & o2::gpu::Spline2D< DataT, YdimT >::operator= ( const Spline2D< DataT, YdimT > &  v)
inline

Assignment operator.

Definition at line 88 of file Spline2D.h.

◆ readFromFile()

template<typename DataT , int32_t YdimT = 0>
static Spline2D * o2::gpu::Spline2D< DataT, YdimT >::readFromFile ( TFile &  inpf,
const char name 
)
inlinestatic

read a class object from the file

Definition at line 101 of file Spline2D.h.


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