Examples of int32p()


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

    // Test multiple iset() on same keys. They should return same index.
    Ran myran = new Ran(17);
    int j;
    for (i=0;i<100;i++) {
      j=myran.int32p()%N;
      hash.iset(chart[j]);
    }

    // N keys should always use only the first N indices
    int[] expect =buildVector(N,1);
View Full Code Here

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

//      System.out.printf(j << " ";
    }
//    System.out.printf(endl;

    for (i=0;i<100;i++) {   // Now store N keys again
      j=myran.int32p()%N;
      hash.iset(chart[j]);
    }

    int[] expect2 = buildVector(2*N,1);
    for (i=0;i<N;i++) expect2[i]=0;
View Full Code Here

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

     
    }

    // Now run original test on fully relinquished table
    for (i=0;i<100;i++) {
      j=myran.int32p()%N;
      hash.iset(chart[j]);
    }

    for (i=0;i<2*N;i++) {
      check2[i]=0;
View Full Code Here

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

      fail("*** Ran: int32() does not match fingerprint");
     
    }

    // Check statistics
    for (i=0;i<N;i++) bins[myran1.int32p() % M] += 1;
    chsone(bins,ebins,df,chisq,prob);
    System.out.printf("     chisq,int32(): %f  prob: %f\n", chisq.val, prob.val);
    localflag = (prob.val < 0.05);
    globalflag = globalflag || localflag;
    if (localflag) {
View Full Code Here

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

    Ran myran = new Ran(17);
    nn[0]=N;
    nn[1]=M;
    for (i=0;i<NTRY;i++) {
      for (j=0;j<M*N;j++) a[j]=0.0;
      jj=myran.int32p() % (M*N);
      a[jj]=1.0;
      wtn(a,nn,-1,d4);
//      for (j=0;j<N;j++) System.out.printf(setw(8) << a[j] << " ";
//      System.out.printf(endl;
      sum=0;
View Full Code Here

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

    Triel tt;
    double dotprodi,dotprodj;

    for (mm=0;mm<M;mm++) {
      // Choose a random segment
      m=myran.int32p() % vor.nseg;
      edge=vor.segs[m];
      end1=edge.p[0];
      end2=edge.p[1];
      nsite=edge.nearpt;
View Full Code Here

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

    // Make every fifth circle identical
    for (i=5;i<N;i+=5)
      circ[i]=circ[0];
    Sphcirc ctest=new Sphcirc(circ[0].center,circ[0].radius);
    for (i=0;i<N;i++) {
      j=myran.int32p() % N;
      test = (circ[j].equals(ctest));
      localflag = (test != (j % 5 == 0));
      globalflag = globalflag || localflag;
      if (localflag) {
        fail("*** Sphcirc,operator==(),2D: Incorrect signal of whether two circles are identical");
View Full Code Here

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

    // Make every fifth circle identical
    for (i=5;i<N;i+=5)
      circ3[i]=circ3[0];
    Sphcirc ctest3=new Sphcirc(circ3[0].center,circ3[0].radius);
    for (i=0;i<N;i++) {
      j=myran.int32p() % N;
      test = (circ3[j].equals(ctest3));
      localflag = (test != (j % 5 == 0));
      globalflag = globalflag || localflag;
      if (localflag) {
        fail("*** Sphcirc,operator==(),3D: Incorrect signal of whether two circles are identical");
View Full Code Here

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

    // Test locate(int) method
    int n0;
    localflag=false;
    for (i=0;i<M;i++) {
      n0=myran.int32p() % N;
      nb=tree2.locate(n0);
//      System.out.printf(nb);
//      System.out.printf(tree2.boxes[nb].lo.x[0] << " %f\n", tree2.boxes[nb].lo.x[1]);
//      System.out.printf(tree2.boxes[nb].hi.x[0] << " %f\n", tree2.boxes[nb].hi.x[1]);
      localflag = localflag || (kd2[n0].x[0] < tree2.boxes[nb].lo.x[0]);
View Full Code Here

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

    // Test disti() method
    int n1,n2;
    sbeps=1.e-15;
    localflag=false;
    for (i=0;i<M;i++) {
      n1=myran.int32p() % N;
      n2=myran.int32p() % N;
      double dis=tree2.disti(n1,n2);
//      System.out.printf(dis << " %f\n", sqrt(SQR(kd2[n1].x[0]-kd2[n2].x[0])
//        + SQR(kd2[n1].x[1]-kd2[n2].x[1])));
      if (n1 == n2)
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.