21 #ifndef mia_core_splinekernel_hh 22 #define mia_core_splinekernel_hh 129 void operator () (
double x, VWeight& weight, VIndex& index)
const;
139 void operator () (
double x,
SCache& cache)
const;
151 void get_cached(
double x,
SCache& cache)
const;
162 void get_uncached(
double x,
SCache& cache)
const;
171 void derivative(
double x, VWeight& weight, VIndex& index)
const;
181 void derivative(
double x, VWeight& weight, VIndex& index,
int order)
const;
189 int get_indices(
double x, VIndex& index)
const;
196 virtual void get_weights(
double x, VWeight& weight)
const = 0;
203 virtual void get_derivative_weights(
double x, VWeight& weight)
const = 0;
211 virtual void get_derivative_weights(
double x, VWeight& weight,
int order)
const = 0;
220 virtual double get_weight_at(
double x,
int order)
const;
228 const std::vector<double>& get_poles()
const;
237 double get_nonzero_radius()
const;
240 int get_active_halfrange()
const;
248 int get_start_idx_and_value_weights(
double x, VWeight& weights)
const;
256 int get_start_idx_and_derivative_weights(
double x, VWeight& weights)
const;
262 void add_pole(
double x);
265 int get_start_idx(
double x)
const;
270 void fill_index(
short i, VIndex& index)
const;
273 size_t m_half_degree;
277 std::vector<double> m_poles;
279 size_t m_support_size;
282 std::vector<short> m_indices;
296 template<>
const char *
const 325 static bool apply() {
330 template <
typename T>
331 struct max_hold_type {
341 typedef T value_type;
342 typedef double coeff_type;
349 struct coeff_map<float> {
350 typedef float value_type;
351 typedef float coeff_type;
358 return m_support_size;
the singleton that a plug-in handler really is
VIndex index
cached indices
TFactory< CSplineKernel > CSplineKernelPlugin
base plugin for spline kernels
static const char * type_descr
plugin handling type description
int index_limit
last possible start index
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
std::vector< double > VWeight
type for the weight vector
CSplineKernel plugin_type
helper typedef for plugin handling
static const char * data_descr
plugin handling data description
CSplineKernel plugin_data
helper typedef for plugin handling
bool never_flat
always use mirror
FACTORY_TRAIT(CSplineKernelPluginHandler)
std::shared_ptr< CSplineKernel > PSplineKernel
THandlerSingleton< TFactoryPluginHandler< CSplineKernelPlugin > > CSplineKernelPluginHandler
PSplineKernel produce_spline_kernel(const std::string &descr)
This is tha base of all plugins that create "things", like filters, cost functions time step operator...
const CSplineBoundaryCondition & boundary_condition
the boundary condition to be applied
std::vector< int > VIndex
type for the index vector
Abstract base class for B-spline interpolation boundary conditions.
double EXPORT_CORE integrate2(const CSplineKernel &spline, double s1, double s2, int d1, int d2, double n, double x0, double L)
Base class for all spline based interpolation kernels.
EInterpolation
some constants for interpoation types
#define EXPORT_CORE
Macro to manage Visual C++ style dllimport/dllexport.
The base class for all plug-in created object.
static const T & instance()
int start_idx
last start index the B-spline was evaluated for
VWeight weights
cached weights
bool is_flat
store whether indices were mirrored
The basic template of all plugin handlers.
#define NS_MIA_END
conveniance define to end the mia namespace