Ejemplo n.º 1
0
 public ODE(double u0, Function2 f, double x0, double X, double h, int Nmax, double eps)
 {
     this.u0         = u0;
     this.f          = f;
     this.x0         = x0;
     this.X          = X;
     this.Nmax       = Nmax;
     this.eps        = eps;
     v               = new double[Nmax];
     v2              = new double[Nmax];
     s               = new double[Nmax];
     x               = new double[Nmax];
     doubleCount     = new int[Nmax];
     halfCount       = new int[Nmax];
     halfCount[0]    = 0;
     doubleCount[0]  = 0;
     this.h          = new double[Nmax];
     this.h[0]       = h;
     iterationsCount = 0;
 }
Ejemplo n.º 2
0
 public RK4(double u0, Function2 f, double x0, double X, double h, int Nmax, double eps)
     : base(u0, f, x0, X, h, Nmax, eps)
 {
     p = 4;
 }