![]() |
Project
|
#include <Spline2D.h>
Inherits o2::gpu::Spline2DSpec< DataT, YdimT, SpecT >.
Public Types | |
typedef TVeryBase::SafetyLevel | SafetyLevel |
typedef TVeryBase::Knot | Knot |
Public Member Functions | |
Spline2D & | operator= (const Spline2D &v) |
Assignment operator. | |
ClassDefNV (Spline2D, 0) | |
Static Public Member Functions | |
static Spline2D * | readFromFile (TFile &inpf, const char *name) |
read a class object from the file | |
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
DataT | data type: float or double |
YdimT | YdimT > 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.
typedef TVeryBase::Knot o2::gpu::Spline2D< DataT, YdimT >::Knot |
Definition at line 82 of file Spline2D.h.
typedef TVeryBase::SafetyLevel o2::gpu::Spline2D< DataT, YdimT >::SafetyLevel |
Definition at line 81 of file Spline2D.h.
o2::gpu::Spline2D< DataT, YdimT >::ClassDefNV | ( | Spline2D< DataT, YdimT > | , |
0 | |||
) |
|
inline |
Assignment operator.
Definition at line 88 of file Spline2D.h.
|
inlinestatic |
read a class object from the file
Definition at line 101 of file Spline2D.h.