![]() |
Project
|
#include <Spline2D.h>
Inherits o2::gpu::Spline2DSpec< DataT, YdimT, SplineUtil::getSpec(YdimT), FlatBase >.
Public Member Functions | |
| Spline2DBase & | operator= (const Spline2DBase &v) |
Static Public Member Functions | |
| static Spline2DBase * | readFromFile (TFile &inpf, const char *name) |
Protected Types | |
| using | Container = Spline2DContainerBase< DataT, FlatBase > |
| using | ParentSpec = Spline2DSpec< DataT, YdimT, SplineUtil::getSpec(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
| 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) |
Common implementation (no ClassDefNV — ROOT dictionary is in the FlatObject specialization below)
Definition at line 73 of file Spline2D.h.
|
protected |
Definition at line 77 of file Spline2D.h.
|
protected |
Definition at line 78 of file Spline2D.h.
|
inline |
Definition at line 84 of file Spline2D.h.
|
inlinestatic |
Definition at line 95 of file Spline2D.h.