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

#include <Spline2D.h>

Inherits o2::gpu::Spline2DSpec< DataT, YdimT, SplineUtil::getSpec(YdimT), FlatBase >.

Public Member Functions

Spline2DBaseoperator= (const Spline2DBase &v)
 

Static Public Member Functions

static Spline2DBasereadFromFile (TFile &inpf, const char *name)
 

Protected Types

using Container = Spline2DContainerBase< DataT, FlatBase >
 
using ParentSpec = Spline2DSpec< DataT, YdimT, SplineUtil::getSpec(YdimT), FlatBase >
 

Detailed Description

template<typename DataT, int32_t YdimT, class FlatBase>
class o2::gpu::Spline2DBase< DataT, YdimT, FlatBase >

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)

Common implementation (no ClassDefNV — ROOT dictionary is in the FlatObject specialization below)

Definition at line 73 of file Spline2D.h.

Member Typedef Documentation

◆ Container

template<typename DataT , int32_t YdimT, class FlatBase >
using o2::gpu::Spline2DBase< DataT, YdimT, FlatBase >::Container = Spline2DContainerBase<DataT, FlatBase>
protected

Definition at line 77 of file Spline2D.h.

◆ ParentSpec

template<typename DataT , int32_t YdimT, class FlatBase >
using o2::gpu::Spline2DBase< DataT, YdimT, FlatBase >::ParentSpec = Spline2DSpec<DataT, YdimT, SplineUtil::getSpec(YdimT), FlatBase>
protected

Definition at line 78 of file Spline2D.h.

Member Function Documentation

◆ operator=()

template<typename DataT , int32_t YdimT, class FlatBase >
Spline2DBase & o2::gpu::Spline2DBase< DataT, YdimT, FlatBase >::operator= ( const Spline2DBase< DataT, YdimT, FlatBase > &  v)
inline

Definition at line 84 of file Spline2D.h.

◆ readFromFile()

template<typename DataT , int32_t YdimT, class FlatBase >
static Spline2DBase * o2::gpu::Spline2DBase< DataT, YdimT, FlatBase >::readFromFile ( TFile &  inpf,
const char name 
)
inlinestatic

Definition at line 95 of file Spline2D.h.


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