Examples of doub()


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

   

    // Test piksrt
    System.out.println("Testing piksrt");
    Ran myran = new Ran(17);
    for (i=0;i<N;i++) x[i]=myran.doub();
    Sorter.piksrt(x);
    for (i=0;i<N-1;i++) localflag = localflag || (x[i] > x[i+1]);
    globalflag = globalflag || localflag;
    if (localflag) {
      fail("*** piksrt: Sorted values are not correctly ordered");
View Full Code Here

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

   

    // Test hpsort
    System.out.println("Testing hpsort");
    Ran myran = new Ran(17);
    for (i=0;i<N;i++) x[i]=myran.doub();
    Sorter.hpsort(x);
    for (i=0;i<N-1;i++) localflag = localflag || (x[i] > x[i+1]);
    globalflag = globalflag || localflag;
    if (localflag) {
      fail("*** hpsort: Sorted values are not correctly ordered");
View Full Code Here

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

    // Test Jacobi
    System.out.println("Testing Jacobi");

    Ran myran = new Ran(17);
    for (i=0;i<N;i++) {
      a[i][i]=myran.doub();
      for (j=0;j<i;j++) {
        a[i][j]=myran.doub();
        a[j][i]=a[i][j];
      }
    }
View Full Code Here

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

    Ran myran = new Ran(17);
    for (i=0;i<N;i++) {
      a[i][i]=myran.doub();
      for (j=0;j<i;j++) {
        a[i][j]=myran.doub();
        a[j][i]=a[i][j];
      }
    }
    Jacobi jac = new Jacobi(a);
   
View Full Code Here

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

    // Test Unsymmeig, symmetric, interface1
    System.out.println("Testing Unsymmeig, symmetric, interface1");

    Ran myran=new Ran(17);
    for (i=0;i<N;i++) {
      a[i][i]=myran.doub();
      for (j=0;j<i;j++) {
        a[i][j]=myran.doub();
        a[j][i]=a[i][j];
      }
    }
View Full Code Here

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

    Ran myran=new Ran(17);
    for (i=0;i<N;i++) {
      a[i][i]=myran.doub();
      for (j=0;j<i;j++) {
        a[i][j]=myran.doub();
        a[j][i]=a[i][j];
      }
    }
    Unsymmeig usym = new Unsymmeig(a,true,false);
View Full Code Here

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

    //------------------------------------------------------------------------
    // Test Unsymmeig, non-symmetric, interface2
    System.out.println("Testing Unsymmeig, non-symmetric, interface2");
    for (i=0;i<N;i++)
      for (j=0;j<N;j++)
        a[i][j]= (i > j+1 ? 0.0 : myran.doub());
    Unsymmeig usym3 = new Unsymmeig(a,true,true);

//    for (i=0;i<N;i++) System.out.printf(usym3.wri[i]);

    // Test eigenvector/eigenvalue pairs
View Full Code Here

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

    // Test Symmeig
    System.out.println("Testing Symmeig, interface1");
    Ran myran = new Ran(17);
    for (i=0;i<N;i++) {
      a[i][i]=myran.doub();
      for (j=0;j<i;j++) {
        a[i][j]=myran.doub();
        a[j][i]=a[i][j];
      }
    }
View Full Code Here

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

    System.out.println("Testing Symmeig, interface1");
    Ran myran = new Ran(17);
    for (i=0;i<N;i++) {
      a[i][i]=myran.doub();
      for (j=0;j<i;j++) {
        a[i][j]=myran.doub();
        a[j][i]=a[i][j];
      }
    }
    Symmeig sym = new Symmeig(a);
   
View Full Code Here

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

      y[i]=(1.0-x[i]*(0.5-0.1*x[i]))/(1.0+(x[i]-2.0)*(x[i]-2.0));
    }
    Ran myran = new Ran(17);
    Rational_interp z = new Rational_interp(x,y,3);
    for (i=0;i<N;i++) {
      xx[i]=myran.doub();
      yy[i]=z.interp(xx[i]);      // interpolated values
      dyy[i]=z.dy;          // Estimated error
      zz[i]=(1.0-xx[i]*(0.5-0.1*xx[i]))/(1.0+(xx[i]-2.0)*(xx[i]-2.0)); // Actual values
    }
    System.out.printf("     Rat_interp: Max. estimated error: %f\n", maxel(dyy));
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.