Project
Loading...
Searching...
No Matches
o2::gpu::RegularSpline1D Class Reference

#include <RegularSpline1D.h>

Public Member Functions

 RegularSpline1D ()=default
 _____________ Constructors / destructors __________________________
 
 ~RegularSpline1D ()=default
 Destructor.
 
void construct (int32_t numberOfKnots)
 Constructor. Number of knots will be set to at least 5.
 
template<typename T >
void correctEdges (T *data) const
 _______________ Main functionality ________________________
 
template<typename T >
getSpline (const int32_t iknot, T f0, T f1, T f2, T f3, float u) const
 Get interpolated value for f(u) using spline at knot "knot_1" and function values at knots {knot_0,knot_1,knot_2,knot_3}.
 
template<typename T >
getSpline (const T correctedData[], float u) const
 Get interpolated value for f(u) using data array correctedData[getNumberOfKnots()] with corrected edges.
 
int32_t getNumberOfKnots () const
 Get number of knots.
 
double knotIndexToU (int32_t index) const
 Get the U-Coordinate depending on the given knot-Index.
 
int32_t getKnotIndex (float u) const
 

Detailed Description

The RegularSpline1D class represents one-dimensional spline interpolation on a regular grid. It is a simplification of the IrregularSpline1D class which represents irregular splines. For the description please look at IrregularSpline1D.h .

The class consist of only one member: mNumberOfKnots. Basically, the class is a collection of methods.

Definition at line 34 of file RegularSpline1D.h.

Constructor & Destructor Documentation

◆ RegularSpline1D()

o2::gpu::RegularSpline1D::RegularSpline1D ( )
default

_____________ Constructors / destructors __________________________

Default constructor

◆ ~RegularSpline1D()

o2::gpu::RegularSpline1D::~RegularSpline1D ( )
default

Destructor.

Member Function Documentation

◆ construct()

void o2::gpu::RegularSpline1D::construct ( int32_t  numberOfKnots)
inline

Constructor. Number of knots will be set to at least 5.

====================================================

Inline implementations of some methods

Constructor

Definition at line 86 of file RegularSpline1D.h.

◆ correctEdges()

template<typename T >
void o2::gpu::RegularSpline1D::correctEdges ( T *  data) const
inline

_______________ Main functionality ________________________

Correction of data values at the both edge knots. It is needed for the fast spline mathematics to work correctly. See explanation at the class comment above.

Parameters
dataarray of function values. It has the size of getNumberOfKnots()

Definition at line 167 of file RegularSpline1D.h.

◆ getKnotIndex()

int32_t o2::gpu::RegularSpline1D::getKnotIndex ( float  u) const
inline

Get index of associated knot for a given U coordinate.

Note: U values from the first interval are mapped to the second inrerval. Values from the last interval are mapped to the previous interval.

Definition at line 154 of file RegularSpline1D.h.

◆ getNumberOfKnots()

int32_t o2::gpu::RegularSpline1D::getNumberOfKnots ( ) const
inline

Get number of knots.

Definition at line 66 of file RegularSpline1D.h.

◆ getSpline() [1/2]

template<typename T >
T o2::gpu::RegularSpline1D::getSpline ( const int32_t  iknot,
f0,
f1,
f2,
f3,
float  u 
) const
inline

Get interpolated value for f(u) using spline at knot "knot_1" and function values at knots {knot_0,knot_1,knot_2,knot_3}.

static method Get interpolated value for f(u) using a spline polynom for [iknot1,iknot2] interval. The polynom is constructed with function values f0,f1,f2,f3 at knots {iknot0,iknot1,iknot2,iknot3} The u value supposed to be inside the [knot1,knot2] region, but also may be any.

f0 = f value at iknot1-1 f1 = f value at iknot1 f2 = f value at iknot1+1 f3 = f value at iknot1+2 u = u value where f(u) is searched for.

Definition at line 93 of file RegularSpline1D.h.

◆ getSpline() [2/2]

template<typename T >
T o2::gpu::RegularSpline1D::getSpline ( const T  correctedData[],
float  u 
) const
inline

Get interpolated value for f(u) using data array correctedData[getNumberOfKnots()] with corrected edges.

Get interpolated value for f(u) using data array correctedData[getNumberOfKnots()] with corrected edges

Definition at line 135 of file RegularSpline1D.h.

◆ knotIndexToU()

double o2::gpu::RegularSpline1D::knotIndexToU ( int32_t  index) const
inline

Get the U-Coordinate depending on the given knot-Index.

Definition at line 143 of file RegularSpline1D.h.


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