Advertisement
anechka_ne_plach

Untitled

Oct 28th, 2021
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. #include <vector>
  2. #include <iostream>
  3.  
  4. class SplineImpl {
  5. public:
  6.     SplineImpl(const std::vector<double>& x, const std::vector<double>& y, double a, double b) {
  7.         x_[0] = x[0];
  8.         x_[1] = x[1];
  9.         y_[0] = y[0];
  10.         y_[1] = y[1];
  11.         a_ = a;
  12.         b_ = b;
  13.         if (mySplineSnd(x_, y_, a, b, y2_) != 0) {
  14.             std::cerr << "shit happens" << std::endl;
  15.         }
  16.     }
  17.     double Interpolate(double x) {
  18.  
  19.     }
  20. private:
  21.     double x_[2];
  22.     double y_[2];
  23.     double* y2_ = new double[2];
  24.     double a_, b_;
  25. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement