vspline 1.1.0
Generic C++11 Code for Uniform B-Splines
Public Member Functions | List of all members
vspline::detail::build_ev< spline_type, rc_type, _vsize, math_ele_type, result_type > Struct Template Reference

helper object to create a type-erased vspline::evaluator for a given bspline object. The evaluator is specialized to the spline's degree, so that degree-0 splines are evaluated with nearest neighbour interpolation, degree-1 splines with linear interpolation, and all other splines with general b-spline evaluation. The resulting vspline::evaluator is 'grokked' to erase it's type to make it easier to handle on the receiving side: build_ev will always return a vspline::grok_type, not one of the several possible evaluators which it produces initially. Why the type erasure? Because a function can only return one distinct type. With specialization for degree-0, degre-1 and arbitrary spline degrees, there are three distinct types of evaluator to take care of. If they are to be returned as a common type, type erasure is the only way. More...

#include <eval.h>

Public Member Functions

vspline::grok_type< bspl_coordinate_type< spline_type, rc_type >, result_type, _vsize > operator() (const spline_type &bspl, vigra::TinyVector< int, spline_type::dimension > dspec=vigra::TinyVector< int, spline_type::dimension >(0), int shift=0)
 

Detailed Description

template<typename spline_type, typename rc_type, size_t _vsize, typename math_ele_type, typename result_type>
struct vspline::detail::build_ev< spline_type, rc_type, _vsize, math_ele_type, result_type >

helper object to create a type-erased vspline::evaluator for a given bspline object. The evaluator is specialized to the spline's degree, so that degree-0 splines are evaluated with nearest neighbour interpolation, degree-1 splines with linear interpolation, and all other splines with general b-spline evaluation. The resulting vspline::evaluator is 'grokked' to erase it's type to make it easier to handle on the receiving side: build_ev will always return a vspline::grok_type, not one of the several possible evaluators which it produces initially. Why the type erasure? Because a function can only return one distinct type. With specialization for degree-0, degre-1 and arbitrary spline degrees, there are three distinct types of evaluator to take care of. If they are to be returned as a common type, type erasure is the only way.

Definition at line 2006 of file eval.h.

Member Function Documentation

◆ operator()()

template<typename spline_type , typename rc_type , size_t _vsize, typename math_ele_type , typename result_type >
vspline::grok_type< bspl_coordinate_type< spline_type, rc_type >, result_type, _vsize > vspline::detail::build_ev< spline_type, rc_type, _vsize, math_ele_type, result_type >::operator() ( const spline_type bspl,
vigra::TinyVector< int, spline_type::dimension dspec = vigra::TinyVector<int,spline_type::dimension> ( 0 ),
int  shift = 0 
)
inline

Definition at line 2011 of file eval.h.


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