FTQuant  0.1
RectBivariateSpline.hpp
Go to the documentation of this file.
1 #ifndef FTQUANT_RECTBIVARIATESPLINE_HPP
2 #define FTQUANT_RECTBIVARIATESPLINE_HPP
3 
4 #include <array>
5 #include <vector>
6 
12  private:
13  std::vector<double> x;
14  std::vector<double> y;
15  std::vector<std::vector<std::array<double, 16>>> a;
16 
17  public:
19  std::array<std::vector<std::vector<double>>, 3> weighted_finite_derivative(
20  const std::vector<double>& x, const std::vector<double>& y,
21  const std::vector<std::vector<double>>& f);
22  void fit(const std::vector<double>& x, const std::vector<double>& y,
23  const std::vector<std::vector<double>>& f);
24  double eval(double x_, double y_) const;
25  double derivative_x(double x_, double y_) const;
26  double derivative_y(double x_, double y_) const;
27  double derivative_xx(double x_, double y_) const;
28  double derivative_yy(double x_, double y_) const;
29  double derivative_xy(double x_, double y_) const;
30  double partial_derivative(double x_, double y_, int dx, int dy) const;
31  std::vector<std::vector<std::array<double, 16>>> get_coefs() const;
32 };
33 
34 #endif //FTQUANT_RECTBIVARIATESPLINE_HPP
Implementation of 2d spline interpolation on a rectangular grid.
void fit(const std::vector< double > &x, const std::vector< double > &y, const std::vector< std::vector< double >> &f)
double derivative_yy(double x_, double y_) const
double derivative_xy(double x_, double y_) const
double derivative_x(double x_, double y_) const
double derivative_y(double x_, double y_) const
double partial_derivative(double x_, double y_, int dx, int dy) const
std::vector< std::vector< std::array< double, 16 > > > get_coefs() const
std::array< std::vector< std::vector< double > >, 3 > weighted_finite_derivative(const std::vector< double > &x, const std::vector< double > &y, const std::vector< std::vector< double >> &f)
double eval(double x_, double y_) const
double derivative_xx(double x_, double y_) const