vspline 1.1.0
Generic C++11 Code for Uniform B-Splines
Namespaces | Macros | Variables
poles.h File Reference

precalculated prefilter poles and basis function values More...

#include "common.h"

Go to the source code of this file.

Namespaces

namespace  vspline_constants
 

Macros

#define XLF(arg)   (arg##L)
 
#define VSPLINE_POLES_H
 

Variables

const xlf_type vspline_constants::K0 []
 
const xlf_type vspline_constants::K1 []
 
const xlf_type vspline_constants::K2 []
 
const xlf_type vspline_constants::K3 []
 
const xlf_type vspline_constants::K4 []
 
const xlf_type vspline_constants::K5 []
 
const xlf_type vspline_constants::K6 []
 
const xlf_type vspline_constants::K7 []
 
const xlf_type vspline_constants::K8 []
 
const xlf_type vspline_constants::K9 []
 
const xlf_type vspline_constants::K10 []
 
const xlf_type vspline_constants::K11 []
 
const xlf_type vspline_constants::K12 []
 
const xlf_type vspline_constants::K13 []
 
const xlf_type vspline_constants::K14 []
 
const xlf_type vspline_constants::K15 []
 
const xlf_type vspline_constants::K16 []
 
const xlf_type vspline_constants::K17 []
 
const xlf_type vspline_constants::K18 []
 
const xlf_type vspline_constants::K19 []
 
const xlf_type vspline_constants::K20 []
 
const xlf_type vspline_constants::K21 []
 
const xlf_type vspline_constants::K22 []
 
const xlf_type vspline_constants::K23 []
 
const xlf_type vspline_constants::K24 []
 
const xlf_type vspline_constants::K25 []
 
const xlf_type vspline_constants::K26 []
 
const xlf_type vspline_constants::K27 []
 
const xlf_type vspline_constants::K28 []
 
const xlf_type vspline_constants::K29 []
 
const xlf_type vspline_constants::K30 []
 
const xlf_type vspline_constants::K31 []
 
const xlf_type vspline_constants::K32 []
 
const xlf_type vspline_constants::K33 []
 
const xlf_type vspline_constants::K34 []
 
const xlf_type vspline_constants::K35 []
 
const xlf_type vspline_constants::K36 []
 
const xlf_type vspline_constants::K37 []
 
const xlf_type vspline_constants::K38 []
 
const xlf_type vspline_constants::K39 []
 
const xlf_type vspline_constants::K40 []
 
const xlf_type vspline_constants::K41 []
 
const xlf_type vspline_constants::K42 []
 
const xlf_type vspline_constants::K43 []
 
const xlf_type vspline_constants::K44 []
 
const xlf_type vspline_constants::K45 []
 
const xlf_type vspline_constants::Poles_2 []
 
const xlf_type vspline_constants::Poles_3 []
 
const xlf_type vspline_constants::Poles_4 []
 
const xlf_type vspline_constants::Poles_5 []
 
const xlf_type vspline_constants::Poles_6 []
 
const xlf_type vspline_constants::Poles_7 []
 
const xlf_type vspline_constants::Poles_8 []
 
const xlf_type vspline_constants::Poles_9 []
 
const xlf_type vspline_constants::Poles_10 []
 
const xlf_type vspline_constants::Poles_11 []
 
const xlf_type vspline_constants::Poles_12 []
 
const xlf_type vspline_constants::Poles_13 []
 
const xlf_type vspline_constants::Poles_14 []
 
const xlf_type vspline_constants::Poles_15 []
 
const xlf_type vspline_constants::Poles_16 []
 
const xlf_type vspline_constants::Poles_17 []
 
const xlf_type vspline_constants::Poles_18 []
 
const xlf_type vspline_constants::Poles_19 []
 
const xlf_type vspline_constants::Poles_20 []
 
const xlf_type vspline_constants::Poles_21 []
 
const xlf_type vspline_constants::Poles_22 []
 
const xlf_type vspline_constants::Poles_23 []
 
const xlf_type vspline_constants::Poles_24 []
 
const xlf_type vspline_constants::Poles_25 []
 
const xlf_type vspline_constants::Poles_26 []
 
const xlf_type vspline_constants::Poles_27 []
 
const xlf_type vspline_constants::Poles_28 []
 
const xlf_type vspline_constants::Poles_29 []
 
const xlf_type vspline_constants::Poles_30 []
 
const xlf_type vspline_constants::Poles_31 []
 
const xlf_type vspline_constants::Poles_32 []
 
const xlf_type vspline_constants::Poles_33 []
 
const xlf_type vspline_constants::Poles_34 []
 
const xlf_type vspline_constants::Poles_35 []
 
const xlf_type vspline_constants::Poles_36 []
 
const xlf_type vspline_constants::Poles_37 []
 
const xlf_type vspline_constants::Poles_38 []
 
const xlf_type vspline_constants::Poles_39 []
 
const xlf_type vspline_constants::Poles_40 []
 
const xlf_type vspline_constants::Poles_41 []
 
const xlf_type vspline_constants::Poles_42 []
 
const xlf_type vspline_constants::Poles_43 []
 
const xlf_type vspline_constants::Poles_44 []
 
const xlf_type vspline_constants::Poles_45 []
 
const xlf_type *const vspline_constants::precomputed_poles []
 
const xlf_type *const vspline_constants::precomputed_basis_function_values []
 

Detailed Description

precalculated prefilter poles and basis function values

The contents of this file below the comments can be generated using bootstrap.cc

both the precalculated basis function values and the prefilter poles can be generated in arbitrary precision, so the constants below are given as 'xlf_type' - concrete splines will downcast them to whatever precision they use for prefiltering (usually the same type as the data type's elementary type).

The values defined here are used in several places in vspline. They are precomputed because calculating them when needed can be (potentially very) expensive, and providing them by definitions evaluated at compile time slows compilation. Great care is taken to provide very exact values. The code in bootstrap.cc goes beyond simply calculating polynomial roots with gsl/blas, adding a polishing stage done in arbitrary precision arithmetic. The basis function values are done as GMP fractions, and only divided out before the result is printed out.

The set of values provided here is sufficient to calculate the b-spline basis function for all spline degrees for arbitrary arguments (including the spline's derivatives) - see basis.h. The poles are needed for prefiltering.

Note: I have calculated the basis function values and prefilter poles using arbitrary-precision library GNU GMP. The precision of these values is way beyond long double and well sufficient to initialize quad floats (__float128) up to their precision, which is only 80bit mantissa or so. So now I express the literals below with a macro which adds a suffix to them so they can be interpreted as literals of the precision wanted for the given compile.

Definition in file poles.h.

Macro Definition Documentation

◆ VSPLINE_POLES_H

#define VSPLINE_POLES_H

Definition at line 2002 of file poles.h.

◆ XLF

#define XLF (   arg)    (arg##L)

Definition at line 104 of file poles.h.