Package com.nr.ran

Examples of com.nr.ran.Ran.doub()


     
    }

    // Test symmetry with respect to p
    for (i=0;i<N;i++) {
      x=myran.doub();
      z=myran.doub();
      p=myran.doub();

      f1[i]=rj(x,x,z,p);
      f2[i]=rj(p,p,z,x);
View Full Code Here


    }

    // Test symmetry with respect to p
    for (i=0;i<N;i++) {
      x=myran.doub();
      z=myran.doub();
      p=myran.doub();

      f1[i]=rj(x,x,z,p);
      f2[i]=rj(p,p,z,x);
    }
View Full Code Here

    // Test symmetry with respect to p
    for (i=0;i<N;i++) {
      x=myran.doub();
      z=myran.doub();
      p=myran.doub();

      f1[i]=rj(x,x,z,p);
      f2[i]=rj(p,p,z,x);
    }
View Full Code Here

     
    }

    // Test symmetry with respect to p
    for (i=0;i<N;i++) {
      x=myran.doub();
      y=myran.doub();
      p=myran.doub();

      f1[i]=rj(x,y,y,p);
      f2[i]=rj(x,p,p,y);
View Full Code Here

    }

    // Test symmetry with respect to p
    for (i=0;i<N;i++) {
      x=myran.doub();
      y=myran.doub();
      p=myran.doub();

      f1[i]=rj(x,y,y,p);
      f2[i]=rj(x,p,p,y);
    }
View Full Code Here

    // Test symmetry with respect to p
    for (i=0;i<N;i++) {
      x=myran.doub();
      y=myran.doub();
      p=myran.doub();

      f1[i]=rj(x,y,y,p);
      f2[i]=rj(x,p,p,y);
    }
View Full Code Here

      y[i]=2.0*(double)(i);
    }
    Linear_interp z = new Linear_interp(x,y);
    Ran myran = new Ran(17);
    for (i=0;i<N;i++) {
      xx[i]=(N-1)*myran.doub();
      yy[i]=z.interp(xx[i]);    // interpolated values
      zz[i]=2.0*xx[i];      // Correct values
    }
    localflag = maxel(vecsub(zz,yy)) > sbeps;
    globalflag = globalflag || localflag;
View Full Code Here

    ymax=maxel(y);
    Ran myran = new Ran(17);
    for (j=0;j<M;j++) {
      BaryRat_interp z = new BaryRat_interp(x,y,j);
      for (i=0;i<N;i++) {
        xx[i]=2.0*myran.doub();
        yy[i]=z.interp(xx[i]);      // interpolated values
        zz[i]=func_BaryRat(xx[i]);    // Actual values
      }
      dy=maxel(vecsub(zz,yy));
      System.out.printf("     BaryRat_interp: Order: %d  Max. error:    %f\n", j, dy);
View Full Code Here

    yp1=1.0;
    ypn=-1.0;
    Spline_interp z = new Spline_interp(x,y,yp1,ypn);
    Ran myran = new Ran(17);
    for(i=0;i<N;i++) {
      xx[i]=pi*myran.doub();
      yy[i]=z.interp(xx[i]);
      zz[i]=sin(xx[i]);
    }
    System.out.printf("     Spline_interp: Max. actual error:    %f\n", maxel(vecsub(zz,yy)));
    sbeps=1.e-5*maxel(y);
 
View Full Code Here

    // Test values against those of rf(x,y,z);
    Ran myran = new Ran(17);
   
    for (i=0;i<N;i++) {
      x=10.0*myran.doub();
      y=10.0*myran.doub();

      f1[i]=rc(x,y);
      f2[i]=rf(x,y,y);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.