vspline 1.1.0
Generic C++11 Code for Uniform B-Splines
Public Types | Public Member Functions | Public Attributes | List of all members
vspline::extrapolator< buffer_type > Struct Template Reference

struct extrapolator is a helper class providing extrapolated values for a 1D buffer indexed with possibly out-of-range indices. The extrapolated value is returned by value. boundary conditions PERIODIC , MIRROR , REFLECT, NATURAL and CONSTANT are currently supported. An extrapolator is set up by passing the boundary condition code (see common.h) and a const reference to the 1D data set, coded as a 1D vigra::MultiArrayView. The view has to refer to valid data for the time the extrapolator is in use. Now the extrapolator object can be indexed with arbitrary indices, and it will return extrapolated values. The indexing is done with operator() rather than operator[] to mark the semantic difference. Note how buffers with size 1 are treated specially for some boundary conditions: here we simply return the value at index 0. More...

#include <extrapolate.h>

Public Types

typedef buffer_type::value_type value_type
 
typedef value_type(extrapolator::* p_xtr) (int i) const
 

Public Member Functions

value_type extrapolate_mirror (int i) const
 
value_type extrapolate_natural (int i) const
 
value_type extrapolate_reflect (int i) const
 
value_type extrapolate_periodic (int i) const
 
value_type extrapolate_clamp (int i) const
 
value_type extrapolate_zeropad (int i) const
 
 extrapolator (vspline::bc_code bc, const buffer_type &_buffer)
 class extrapolator's constructor takes the boundary condition code and a const reference to the buffer. the specific extrapolation routine is picked in the case switch and assigned to the method pointer which will be invoked by operator(). More...
 
value_type operator() (const int &i) const
 operator() uses the specific extrapolation method to provide a value for position i. More...
 

Public Attributes

const buffer_type & buffer
 
p_xtr _p_xtr
 

Detailed Description

template<class buffer_type>
struct vspline::extrapolator< buffer_type >

struct extrapolator is a helper class providing extrapolated values for a 1D buffer indexed with possibly out-of-range indices. The extrapolated value is returned by value. boundary conditions PERIODIC , MIRROR , REFLECT, NATURAL and CONSTANT are currently supported. An extrapolator is set up by passing the boundary condition code (see common.h) and a const reference to the 1D data set, coded as a 1D vigra::MultiArrayView. The view has to refer to valid data for the time the extrapolator is in use. Now the extrapolator object can be indexed with arbitrary indices, and it will return extrapolated values. The indexing is done with operator() rather than operator[] to mark the semantic difference. Note how buffers with size 1 are treated specially for some boundary conditions: here we simply return the value at index 0.

Definition at line 69 of file extrapolate.h.

Member Typedef Documentation

◆ p_xtr

template<class buffer_type >
typedef value_type(extrapolator::* vspline::extrapolator< buffer_type >::p_xtr) (int i) const

Definition at line 79 of file extrapolate.h.

◆ value_type

template<class buffer_type >
typedef buffer_type::value_type vspline::extrapolator< buffer_type >::value_type

Definition at line 72 of file extrapolate.h.

Constructor & Destructor Documentation

◆ extrapolator()

template<class buffer_type >
vspline::extrapolator< buffer_type >::extrapolator ( vspline::bc_code  bc,
const buffer_type &  _buffer 
)
inline

class extrapolator's constructor takes the boundary condition code and a const reference to the buffer. the specific extrapolation routine is picked in the case switch and assigned to the method pointer which will be invoked by operator().

Definition at line 187 of file extrapolate.h.

Member Function Documentation

◆ extrapolate_clamp()

template<class buffer_type >
value_type vspline::extrapolator< buffer_type >::extrapolate_clamp ( int  i) const
inline

Definition at line 166 of file extrapolate.h.

◆ extrapolate_mirror()

template<class buffer_type >
value_type vspline::extrapolator< buffer_type >::extrapolate_mirror ( int  i) const
inline

Definition at line 82 of file extrapolate.h.

◆ extrapolate_natural()

template<class buffer_type >
value_type vspline::extrapolator< buffer_type >::extrapolate_natural ( int  i) const
inline

Definition at line 100 of file extrapolate.h.

◆ extrapolate_periodic()

template<class buffer_type >
value_type vspline::extrapolator< buffer_type >::extrapolate_periodic ( int  i) const
inline

Definition at line 150 of file extrapolate.h.

◆ extrapolate_reflect()

template<class buffer_type >
value_type vspline::extrapolator< buffer_type >::extrapolate_reflect ( int  i) const
inline

Definition at line 136 of file extrapolate.h.

◆ extrapolate_zeropad()

template<class buffer_type >
value_type vspline::extrapolator< buffer_type >::extrapolate_zeropad ( int  i) const
inline

Definition at line 176 of file extrapolate.h.

◆ operator()()

template<class buffer_type >
value_type vspline::extrapolator< buffer_type >::operator() ( const int &  i) const
inline

operator() uses the specific extrapolation method to provide a value for position i.

Definition at line 221 of file extrapolate.h.

Member Data Documentation

◆ _p_xtr

template<class buffer_type >
p_xtr vspline::extrapolator< buffer_type >::_p_xtr

Definition at line 80 of file extrapolate.h.

◆ buffer

template<class buffer_type >
const buffer_type& vspline::extrapolator< buffer_type >::buffer

Definition at line 71 of file extrapolate.h.


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