draganrakita

TPBVPShooting.h

Dec 24th, 2012
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.83 KB | None | 0 0
  1. #pragma once
  2. #include <vector>
  3. #include "parser.h"
  4.  
  5. #define N 2
  6.  
  7. class TPBVPShooting
  8. {
  9. private:
  10.     std::vector<double*> shootingPosition;
  11.     string firstEquation;
  12.     string secondEquation;
  13.     double c0,c1;
  14.     double initialValue;
  15.     double a,b;
  16.     double targetY;
  17.     double stepSize; //for runge-kutta
  18.     double epsilon;
  19.     int maxShooting;
  20.     int pointNum;
  21.     Parser prs;
  22. public:
  23.     TPBVPShooting(string firstEquation_,string secondEquation_,double c0_,double c1_, double initialValue_,double a, double b,double targetY,double stepSize,double epsilon,int maxShooting  );
  24.     ~TPBVPShooting(void);
  25.     std::string stringify(double x);
  26.     void replaceAll(std::string& str, const std::string& from, const std::string& to);
  27.     double solve();
  28.     void drawGraph();
  29.     double* shooting(double y0[]);
  30.     double f(double x, double y0[], int i);
  31.     void runge4(double x,double y0[],double step);
  32.  
  33. };
Advertisement
Add Comment
Please, Sign In to add comment