Go to the documentation of this file.
21 #ifndef mia_core_splinekernel_hh
22 #define mia_core_splinekernel_hh
140 void operator () (
double x,
SCache& cache)
const;
266 int get_start_idx(
double x)
const;
271 void fill_index(
short i,
VIndex& index)
const;
274 size_t m_half_degree;
278 std::vector<double> m_poles;
280 size_t m_support_size;
283 std::vector<short> m_indices;
297 template<>
const char *
const
332 template <
typename T>
333 struct max_hold_type {
343 typedef T value_type;
344 typedef double coeff_type;
351 struct coeff_map<float> {
352 typedef float value_type;
353 typedef float coeff_type;
360 return m_support_size;
CSplineKernel(int degree, double shift, EInterpolation type)
TFactory< CSplineKernel > CSplineKernelPlugin
base plugin for spline kernels
SCache(size_t s, const CSplineBoundaryCondition &bc, bool am)
static const T & instance()
int get_start_idx_and_derivative_weights(double x, VWeight &weights) const
int get_start_idx_and_value_weights(double x, VWeight &weights) const
int get_active_halfrange() const
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
static const char * data_descr
plugin handling data description
CSplineKernel plugin_data
helper typedef for plugin handling
void derivative(double x, VWeight &weight, VIndex &index, int order) const
std::vector< int > VIndex
type for the index vector
virtual void get_weights(double x, VWeight &weight) const =0
Abstract base class for B-spline interpolation boundary conditions.
#define NS_MIA_END
conveniance define to end the mia namespace
VWeight weights
cached weights
the singleton that a plug-in handler really is
std::vector< double > VWeight
type for the weight vector
bool is_flat
store whether indices were mirrored
int start_idx
last start index the B-spline was evaluated for
The basic template of all plugin handlers.
PSplineKernel produce_spline_kernel(const std::string &descr)
std::shared_ptr< CSplineKernel > PSplineKernel
THandlerSingleton< TFactoryPluginHandler< CSplineKernelPlugin > > CSplineKernelPluginHandler
int get_indices(double x, VIndex &index) const
VIndex index
cached indices
The base class for all plug-in created object.
static const char * type_descr
plugin handling type description
void get_uncached(double x, SCache &cache) const
Base class for all spline based interpolation kernels.
virtual void get_derivative_weights(double x, VWeight &weight, int order) const =0
#define EXPORT_CORE
Macro to manage Visual C++ style dllimport/dllexport.
EInterpolation
some constants for interpoation types
double get_nonzero_radius() const
CSplineKernel plugin_type
helper typedef for plugin handling
void get_cached(double x, SCache &cache) const
bool never_flat
always use mirror
FACTORY_TRAIT(CSplineKernelPluginHandler)
const std::vector< double > & get_poles() const
void derivative(double x, VWeight &weight, VIndex &index) const
EInterpolation get_type() const
double EXPORT_CORE integrate2(const CSplineKernel &spline, double s1, double s2, int d1, int d2, double n, double x0, double L)
int index_limit
last possible start index
virtual void get_derivative_weights(double x, VWeight &weight) const =0
virtual double get_weight_at(double x, int order) const
const CSplineBoundaryCondition & boundary_condition
the boundary condition to be applied
This is tha base of all plugins that create "things", like filters, cost functions time step operator...