Examples of nextDouble()


Examples of java.util.Random.nextDouble()

        long miss = 0L;

        final int limit = round - 1;
        for(int nth = 0, i = 0; !_stop; nth = (nth >= limit) ? 0 : nth + 1, i++) {
            final long key;
            if(scanning || scanLength != 0 && (i == scanLength && rand.nextDouble() < percent)) {
                if(++scanCount <= scanLength) {
                    if(!scanning) {
                        base = dist[nth];
                    }
                    key = base + scanCount;
View Full Code Here

Examples of java.util.Random.nextDouble()

        final int start = thrdnum * round;
        final int limit = start + round - 1;
        for(int nth = start, i = 0; !_stop; nth = (nth < limit) ? nth + 1 : start, i++) {
            final long key;
            if(scanning || scanLength != 0 && (i == scanLength && rand.nextDouble() < percent)) {
                if(++scanCount <= scanLength) {
                    if(!scanning) {
                        base = dist[nth];
                    }
                    key = base + scanCount;
View Full Code Here

Examples of java.util.Random.nextDouble()

        final int start = thrdnum * round;
        final int limit = start + round - 1;
        for(int nth = start, i = 0; !_stop; nth = (nth < limit) ? nth + 1 : start, i++) {
            final long key;
            if(scanning || scanLength != 0 && (i == scanLength && rand.nextDouble() < percent)) {
                if(++scanCount <= scanLength) {
                    if(!scanning) {
                        base = dist[nth];
                    }
                    key = base + scanCount;
View Full Code Here

Examples of java.util.Random.nextDouble()

        final int limit = round - 1;
        for(int nth = 0, i = 0; !_stop; nth = (nth >= limit) ? 0 : nth + 1, i++) {
            final long key;
            final int distnth = nth * thrdnum;
            if(scanning || scanLength != 0 && (i == scanLength && rand.nextDouble() < percent)) {
                if(++scanCount <= scanLength) {
                    if(!scanning) {
                        base = dist[distnth];
                    }
                    key = base + scanCount;
View Full Code Here

Examples of java.util.Random.nextDouble()

        final int start = thrdnum * round;
        final int limit = start + round - 1;
        for(int nth = start, i = 0; !_stop; nth = (nth < limit) ? nth + 1 : start, i++) {
            final long key;
            if(scanning || scanLength != 0 && (i == scanLength && rand.nextDouble() < percent)) {
                if(++scanCount <= scanLength) {
                    if(!scanning) {
                        base = dist[nth];
                    }
                    key = base + scanCount;
View Full Code Here

Examples of java.util.Random.nextDouble()

        final int start = thrdnum * round;
        final int limit = start + round - 1;
        for(int nth = start, i = 0; !_stop; nth = (nth < limit) ? nth + 1 : start, i++) {
            final long key;
            if(scanning || scanLength != 0 && (i == scanLength && rand.nextDouble() < percent)) {
                if(++scanCount <= scanLength) {
                    if(!scanning) {
                        base = dist[nth];
                    }
                    key = base + scanCount;
View Full Code Here

Examples of java.util.Random.nextDouble()

        s.myByte = new Byte((byte) rand.nextInt(Byte.MAX_VALUE));
        s.myShort = new Short((short) rand.nextInt(Short.MAX_VALUE));
        s.myInteger = new Integer(rand.nextInt());
        s.myLong = new Long(rand.nextLong());
        s.myFloat = new Float(rand.nextFloat());
        s.myDouble = new Double(rand.nextDouble());
        s.myBigDecimal = new BigDecimal(rand.nextDouble());
        s.myString = Long.toHexString(rand.nextLong());
        s.myUtilDate = new java.util.Date(rand.nextLong());
        s.mySqlDate = new java.sql.Date(rand.nextLong());
        s.mySqlTime = new java.sql.Time(rand.nextLong());
View Full Code Here

Examples of java.util.Random.nextDouble()

        s.myShort = new Short((short) rand.nextInt(Short.MAX_VALUE));
        s.myInteger = new Integer(rand.nextInt());
        s.myLong = new Long(rand.nextLong());
        s.myFloat = new Float(rand.nextFloat());
        s.myDouble = new Double(rand.nextDouble());
        s.myBigDecimal = new BigDecimal(rand.nextDouble());
        s.myString = Long.toHexString(rand.nextLong());
        s.myUtilDate = new java.util.Date(rand.nextLong());
        s.mySqlDate = new java.sql.Date(rand.nextLong());
        s.mySqlTime = new java.sql.Time(rand.nextLong());
        s.mySqlTimestamp = new java.sql.Timestamp(rand.nextLong());
View Full Code Here

Examples of java.util.Random.nextDouble()

         if (nmax < 1)
            nmax = 1;
         else if (nmax > 10)
            nmax = 10;
         for (int j=0; j < nmax; j++) {
            Double newKey = new Double(random.nextDouble());
            newHosts.put(newKey, keys[i]);
         }
      }
      return (String[])newHosts.values().toArray(new String[newHosts.size()]);
   }
View Full Code Here

Examples of java.util.Random.nextDouble()

        float val = rand.nextFloat();
        orig[idx] = val;
        fromEmpty.set(idx, val);
        count++;
        idx += 1;
        while (rand.nextDouble() > density) {
          idx++;
        }
      }
      float[] copy =new float[orig.length];
      System.arraycopy(orig, 0, copy, 0, orig.length);
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.