CSplineKernel Class Referenceabstract

Base class for all spline based interpolation kernels. More...

#include <mia/core/splinekernel.hh>

Inheritance diagram for CSplineKernel:
[legend]
Collaboration diagram for CSplineKernel:
[legend]

Data Structures

struct  SCache
 

Public Types

typedef CSplineKernel plugin_data
 helper typedef for plugin handling More...
 
typedef CSplineKernel plugin_type
 helper typedef for plugin handling More...
 
typedef std::vector< int > VIndex
 type for the index vector More...
 
typedef std::vector< double > VWeight
 type for the weight vector More...
 
- Public Types inherited from CPropertyFlagHolder
typedef std::set< const char * > Set
 define the type of the set of flags More...
 

Public Member Functions

 CSplineKernel (int degree, double shift, EInterpolation type)
 
void derivative (double x, VWeight &weight, VIndex &index) const
 
void derivative (double x, VWeight &weight, VIndex &index, int order) const
 
int get_active_halfrange () const
 
void get_cached (double x, SCache &cache) const
 
virtual void get_derivative_weights (double x, VWeight &weight) const =0
 
virtual void get_derivative_weights (double x, VWeight &weight, int order) const =0
 
int get_indices (double x, VIndex &index) const
 
double get_nonzero_radius () const
 
const std::vector< double > & get_poles () const
 
int get_start_idx_and_derivative_weights (double x, VWeight &weights) const
 
int get_start_idx_and_value_weights (double x, VWeight &weights) const
 
EInterpolation get_type () const
 
void get_uncached (double x, SCache &cache) const
 
virtual double get_weight_at (double x, int order) const
 
virtual void get_weights (double x, VWeight &weight) const =0
 
void operator() (double x, VWeight &weight, VIndex &index) const
 
void operator() (double x, SCache &cache) const
 
size_t size () const
 
virtual ~CSplineKernel ()
 
- Public Member Functions inherited from CProductBase
const char * get_init_string () const
 
void set_init_string (const char *init)
 
void set_module (PPluginModule module)
 
- Public Member Functions inherited from CPropertyFlagHolder
void add (const char *property)
 
Set get_missing_properties (const CPropertyFlagHolder &testset) const
 
bool has (const char *property) const
 
bool has_all_in (const CPropertyFlagHolder &testset) const
 
virtual ~CPropertyFlagHolder ()
 

Static Public Attributes

static const char * data_descr
 plugin handling data description More...
 
static const char * type_descr
 plugin handling type description More...
 

Protected Member Functions

void add_pole (double x)
 

Detailed Description

Base class for all spline based interpolation kernels.

The kernel of spline based interpolations that provides the interface to evaluate weights and indices into the coefficient field.

Definition at line 45 of file splinekernel.hh.

Member Typedef Documentation

◆ plugin_data

helper typedef for plugin handling

Definition at line 49 of file splinekernel.hh.

◆ plugin_type

helper typedef for plugin handling

Definition at line 51 of file splinekernel.hh.

◆ VIndex

typedef std::vector<int> CSplineKernel::VIndex

type for the index vector

Definition at line 63 of file splinekernel.hh.

◆ VWeight

typedef std::vector<double> CSplineKernel::VWeight

type for the weight vector

Definition at line 60 of file splinekernel.hh.

Constructor & Destructor Documentation

◆ CSplineKernel()

CSplineKernel::CSplineKernel ( int  degree,
double  shift,
EInterpolation  type 
)
Parameters
degreeof the spline
shiftlocation shift of the input coordinate to obtain the proper support
typeinterpolation type
Remarks
why to I give the type, it should alwas be bspline

◆ ~CSplineKernel()

virtual CSplineKernel::~CSplineKernel ( )
virtual

The virtual destructor is just here to avoid some warning

Member Function Documentation

◆ add_pole()

void CSplineKernel::add_pole ( double  x)
protected

add a pole to the list of poles

Parameters
x

◆ derivative() [1/2]

void CSplineKernel::derivative ( double  x,
VWeight weight,
VIndex index 
) const

Evaluate the first order derivative weights of the B-Spline at the given position

Parameters
xlocation where to evaluate the derivative
[out]weightthe interpolation weights are stored here
[out]indexthe interpolation coefficient intices are stored here

◆ derivative() [2/2]

void CSplineKernel::derivative ( double  x,
VWeight weight,
VIndex index,
int  order 
) const

Evaluate the derivative weights of the B-Spline at the given position

Parameters
xlocation where to evaluate the derivative
[out]weightthe interpolation weights are stored here
[out]indexthe interpolation coefficient intices are stored here
orderorder of the derivative to be evaluated

◆ get_active_halfrange()

int CSplineKernel::get_active_halfrange ( ) const
Returns
the number of the neighboring grind points used on each side of the center

◆ get_cached()

void CSplineKernel::get_cached ( double  x,
SCache cache 
) const

This operator evaluates the weights and indices of the interpolation at a given position. The boundary conditions given in the value cache are applied. The result is stored in the return value cache and this cache is only updated if neccesary. The index set is always fully set.

Parameters
xlocation for which to evaluate weights and indices
[in,out]cachestorage for returned value

◆ get_derivative_weights() [1/2]

virtual void CSplineKernel::get_derivative_weights ( double  x,
VWeight weight 
) const
pure virtual

evaluate the first order derivative weights, this needs to be implemented for a specific spline

Parameters
xcoordinate
[out]weightthe weights
Remarks
why is this not a private function?

◆ get_derivative_weights() [2/2]

virtual void CSplineKernel::get_derivative_weights ( double  x,
VWeight weight,
int  order 
) const
pure virtual

evaluate the first order derivative weights, this needs to be implemented for a specific spline

Parameters
xcoordinate
[out]weightthe weights
orderderivative order
Remarks
why is this not a private function?

◆ get_indices()

int CSplineKernel::get_indices ( double  x,
VIndex index 
) const

Evaluate the indices of the coefficients that would be used for interpolation

Parameters
xlocation where to evaluate
[out]indexthe interpolation coefficient indices are stored here
Returns
start index

◆ get_nonzero_radius()

double CSplineKernel::get_nonzero_radius ( ) const
Returns
the radius around zero where the B-spline does not evaluate to zero

◆ get_poles()

const std::vector<double>& CSplineKernel::get_poles ( ) const
Returns
the poles of the spline used for pre-filtering

◆ get_start_idx_and_derivative_weights()

int CSplineKernel::get_start_idx_and_derivative_weights ( double  x,
VWeight weights 
) const

Evaluate the first coefficient index and the derivative weights vor B-spline interpolation

Parameters
xlocation to evaluate the spline at
[out]weightsweights of the B-spline
Returns
first index into the coefficient field to be used - note this may be a negiative value

◆ get_start_idx_and_value_weights()

int CSplineKernel::get_start_idx_and_value_weights ( double  x,
VWeight weights 
) const

Evaluate the first coefficient index and the weights vor B-spline interpolation

Parameters
xlocation to evaluate the spline at
[out]weightsweights of the B-spline
Returns
first index into the coefficient field to be used - note this may be a negiative value

◆ get_type()

EInterpolation CSplineKernel::get_type ( ) const
Returns
the type of this interpolator

◆ get_uncached()

void CSplineKernel::get_uncached ( double  x,
SCache cache 
) const

This operator evaluates the weights and indices of the interpolation at a given position. The boundary conditions given in the value cache are applied. The result is stored in the return value cache and this cache is always updated. The index set will only be set correctly if the boundary conditions had to be applied.

Parameters
xlocation for which to evaluate weights and indices
[in,out]cachestorage for returned value

◆ get_weight_at()

virtual double CSplineKernel::get_weight_at ( double  x,
int  order 
) const
virtual

Evaluate the weight at a single position

Parameters
xlocation to evaluate B-spline at
orderorder of derivative to be evaluated (0 = value)
Returns
B-spline weight

◆ get_weights()

virtual void CSplineKernel::get_weights ( double  x,
VWeight weight 
) const
pure virtual

evaluate the weights, this needs to be implemented for a specific spline

Parameters
xcoordinate
[out]weightthe weights
Remarks
why is this not a private function?

◆ operator()() [1/2]

void CSplineKernel::operator() ( double  x,
VWeight weight,
VIndex index 
) const

This operator evaluates the weights and indices of the interpolation

Parameters
xinput coordinate
[out]weightweights of the interpolation
[out]indexindices corresponding to the weights, No boundary conditions are applied.

◆ operator()() [2/2]

void CSplineKernel::operator() ( double  x,
SCache cache 
) const

This operator evaluates the weights and indices of the interpolation at a given position. The boundary conditions given in the value cache are applied. The result is stored in the return value cache and this cache is only updated if neccesary

Parameters
xlocation for which to evaluate weights and indices
[in,out]cachestorage for returned value

◆ size()

size_t CSplineKernel::size ( ) const
inline
Returns
the size of the support of this kernel

Definition at line 356 of file splinekernel.hh.

References EXPORT_CORE, integrate2(), and NS_MIA_END.

Field Documentation

◆ data_descr

const char* CSplineKernel::data_descr
static

plugin handling data description

Definition at line 57 of file splinekernel.hh.

◆ type_descr

const char* CSplineKernel::type_descr
static

plugin handling type description

Definition at line 54 of file splinekernel.hh.


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