ENH: Allow `Splinterpolator` instances to be created from an existing set of spline coefficients, and extend extrapolation options
Compare changes
- Paul McCarthy authored
existing set of spline coefficients
+ 157
− 72
@@ -22,7 +22,14 @@
@@ -45,35 +52,82 @@ class Splinterpolator
Splinterpolator(const T *data, const std::vector<unsigned int>& dim, const std::vector<ExtrapolationType>& et, unsigned int order=3, bool copy_low_order=true, Utilities::NoOfThreads nthr=Utilities::NoOfThreads(1), double prec=1e-8) : _valid(false), _own_coef(false), _coef(0), _cptr(0), _ndim(0), _nthr(nthr._n)
@@ -204,12 +258,18 @@ private:
@@ -604,27 +664,35 @@ double Splinterpolator<T>::value_at(const double *coord) const
@@ -643,9 +711,9 @@ double Splinterpolator<T>::value_at(const double *coord) const
@@ -655,38 +723,47 @@ const
@@ -1147,7 +1224,7 @@ inline unsigned int Splinterpolator<T>::indx2indx(int indx, unsigned int d) cons
@@ -1270,42 +1347,30 @@ T Splinterpolator<T>::coef(int *indx) const
@@ -1334,14 +1399,21 @@ unsigned int Splinterpolator<T>::n_nonzero(const unsigned int *vec) const
@@ -1350,8 +1422,7 @@ void Splinterpolator<T>::common_construction(const T *data, const std::vector<un
@@ -1390,18 +1461,21 @@ void Splinterpolator<T>::assign(const Splinterpolator<T>& src)
@@ -1441,7 +1515,7 @@ void Splinterpolator<T>::deconv_along(unsigned int dim)
@@ -1469,8 +1543,8 @@ void Splinterpolator<T>::deconv_along(unsigned int dim)
@@ -1581,11 +1655,17 @@ double Splinterpolator<T>::SplineColumn::init_fwd_sweep(double z, ExtrapolationT
@@ -1612,9 +1692,14 @@ double Splinterpolator<T>::SplineColumn::init_bwd_sweep(double z, double lv, Ext