#include "WireCellUtil/Interpolate.h"
#include <boost/math/interpolators/cubic_b_spline.hpp>
#include <iostream>
Go to the source code of this file.
Definition at line 10 of file test_interpolate.cxx.
12 std::vector<double>
f{0.01, -0.02, 0.3, 0.8, 1.9, -8.78, -22.6};
13 const double xstep = 0.01;
14 const double x0 = xstep;
15 boost::math::cubic_b_spline<double>
spline(
f.begin(),
f.end(), x0, xstep);
19 for (
double x = 0;
x < x0 + xstep*10;
x += 0.1*xstep) {
21 << std::fixed <<
"x=" <<
x 22 <<
"\tlin(x)=" << lin(
x)
Q_EXPORT QTSManip setprecision(int p)