Package com.nr.fi

Examples of com.nr.fi.Trapzd


    Bessj0_trapzd bj0 = new Bessj0_trapzd();
    Bessj1_trapzd bj1 = new Bessj1_trapzd();
    for (i=0;i<N;i++) {
      x1=1.0*i;
      x2=x1+2.0;
      Trapzd trap = new Trapzd(bj1,x1,x2);
      for (j=0;j<M;j++) val=trap.next();
      y[i]=val;
      yy[i]=bj0.funk(x1)-bj0.funk(x2);
    }
    System.out.printf("trapzd: Maximum discrepancy = %f\n", maxel(vecsub(y,yy)));
    localflag = maxel(vecsub(y,yy)) > sbeps;
View Full Code Here


    etaa=eta;
    thetaa=theta;
    if (eta <= 15.0) {
      a=-4.5;
      b=5.0;
      Trapzd s = new Trapzd(this,a,b);
      for (int i=1;i<=NMAX;i++) {
        sum=s.next();
        if (i > 3)
          if (abs(sum-olds) <= EPS*abs(olds))
            return sum;
        olds=sum;
      }
    }
    else {
      a=0.0;
      b=eta;
      aa=eta;
      bb=eta+60.0;
      hmax=4.3;
      DErule s = new DErule(this,a,b,hmax);
      DErule ss = new DErule(this,aa,bb,hmax);
      for (int i=1;i<=NMAX;i++) {
        sum=s.next()+ss.next();
        if (i > 3)
          if (abs(sum-olds) <= EPS*abs(olds))
            return sum;
        olds=sum;
      }
View Full Code Here

TOP

Related Classes of com.nr.fi.Trapzd

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.