Examples of gray()


Examples of com.nr.lna.Gray.gray()

    Ran myran = new Ran(17);
    Gray g=new Gray();
    for (i=0;i<N;i++) {
      j=myran.int32();
      k=g.gray(j);
      m=g.gray(j+1);
      p = m ^ k;    // p should be a power of 2 (i.e. 1 bit set)
//      System.out.printf(k << " %f\n", m << " %f\n", p);
      localflag = localflag || (p & (p-1)) != 0// test for a power of 2
    }
View Full Code Here

Examples of com.nr.lna.Gray.gray()

    Ran myran = new Ran(17);
    Gray g=new Gray();
    for (i=0;i<N;i++) {
      j=myran.int32();
      k=g.gray(j);
      m=g.gray(j+1);
      p = m ^ k;    // p should be a power of 2 (i.e. 1 bit set)
//      System.out.printf(k << " %f\n", m << " %f\n", p);
      localflag = localflag || (p & (p-1)) != 0// test for a power of 2
    }
    globalflag = globalflag || localflag;
View Full Code Here

Examples of com.nr.lna.Gray.gray()

    // Test invgray
    System.out.println("Testing invgray");
    for (i=0;i<N;i++) {
      j=myran.int32();
      k=g.gray(j);
      m=g.invgray(k);
//      System.out.printf(j << " %f\n", m);
      localflag = localflag || (m != j);
    }
    globalflag = globalflag || localflag;
View Full Code Here

Examples of com.nr.lna.Gray.gray()

     
    }

    // See if all values are being used
    int[] map=new int[8192];
    for (i=0;i<8192;i++) map[g.gray(i)]=1;
    localflag=false;
    for (i=0;i<8192;i++)
      localflag = localflag || map[i] != 1;
    globalflag = globalflag || localflag;
    if (localflag) {
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.