Home
last modified time | relevance | path

Searched refs:nextDouble (Results 1 – 25 of 29) sorted by relevance

12

/external/apache-commons-math/src/main/java/org/apache/commons/math/random/
DAbstractRandomGenerator.java137 return (int) (nextDouble() * Integer.MAX_VALUE); in nextInt()
160 int result = (int) (nextDouble() * n); in nextInt()
179 return (long) (nextDouble() * Long.MAX_VALUE); in nextLong()
197 return nextDouble() <= 0.5; in nextBoolean()
215 return (float) nextDouble(); in nextFloat()
230 public abstract double nextDouble(); in nextDouble() method in AbstractRandomGenerator
262 v1 = 2 * nextDouble() - 1; in nextGaussian()
263 v2 = 2 * nextDouble() - 1; in nextGaussian()
DRandomDataImpl.java204 double r = getRan().nextDouble(); in nextInt()
224 double r = getRan().nextDouble(); in nextLong()
316 return lower + (int) (sec.nextDouble() * (upper - lower + 1)); in nextSecureInt()
337 return lower + (long) (sec.nextDouble() * (upper - lower + 1)); in nextSecureLong()
372 rnd = generator.nextDouble(); in nextPoisson()
487 double unif = generator.nextDouble();
489 unif = generator.nextDouble();
519 double u = generator.nextDouble();
521 u = generator.nextDouble();
DBitsStreamGenerator.java84 public double nextDouble() { in nextDouble() method in BitsStreamGenerator
101 final double x = nextDouble(); in nextGaussian()
102 final double y = nextDouble(); in nextGaussian()
DRandomAdaptor.java99 public double nextDouble() { in nextDouble() method in RandomAdaptor
100 return randomGenerator.nextDouble(); in nextDouble()
DRandomGenerator.java135 double nextDouble(); in nextDouble() method
DUniformRandomGenerator.java58 return SQRT3 * (2 * generator.nextDouble() - 1.0); in nextNormalizedDouble()
DUnitSphereRandomVectorGenerator.java69 final double comp = 2 * rand.nextDouble() - 1; in nextVector()
/external/crcalc/tests/src/com/hp/creals/
DSlowCRTest.java185 double d = Math.exp(2.0 * r.nextDouble() - 1.0); in testSlowTrig()
192 double d = Math.exp(200.0 * r.nextDouble()); in testSlowTrig()
213 double d = Math.exp(10.0 * r.nextDouble() - 1.0); in testSlowExpLn()
220 double d = Math.exp(200.0 * r.nextDouble()); in testSlowExpLn()
232 double d = Math.exp(10.0 * r.nextDouble() - 1.0); in testSlowBasic()
239 double d = Math.exp(600.0 * r.nextDouble()); in testSlowBasic()
/external/apache-commons-math/src/main/java/org/apache/commons/math/genetics/
DGeneticAlgorithm.java152 if (randGen.nextDouble() < getCrossoverRate()) { in nextGeneration()
158 if (randGen.nextDouble() < getMutationRate()) { in nextGeneration()
DRandomKeyMutation.java52 newRepr.set(rInd, GeneticAlgorithm.getRandomGenerator().nextDouble()); in mutate()
DRandomKey.java195 repr.add(GeneticAlgorithm.getRandomGenerator().nextDouble()); in randomPermutation()
/external/walt/android/WALT/app/src/test/java/org/chromium/latency/walt/
DUtilsTest.java145 touchTimes[i] = i + rand.nextDouble()*0.2 - 0.1; in testFindBestShift()
150 …touchY[i] = 1000*Math.cos((touchTimes[i] - latency) * Math.PI/500) + rand.nextDouble()*0.02 - 0.01; in testFindBestShift()
/external/apache-commons-math/src/main/java/org/apache/commons/math/optimization/
DMultiStartUnivariateRealOptimizer.java242 final double bound1 = (i == 0) ? min : min + generator.nextDouble() * (max - min); in optimize()
243 final double bound2 = (i == 0) ? max : min + generator.nextDouble() * (max - min); in optimize()
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/
DDateFormatRoundTripTest.java109 int random = (int) (ran.nextDouble() * 24); in _test()
272 double a = ran.nextDouble();
DIntlTestDateFormat.java232 return random.nextDouble(); in randDouble()
DNumberFormatRoundTripTest.java91 return random.nextDouble() * range; in randomDouble()
DIntlTestNumberFormat.java150 double d = random.nextDouble()*2e10 - 1e10; in _testFormat()
/external/guava/guava-tests/test/com/google/common/math/
DMathBenchmarking.java110 double result = RANDOM_SOURCE.nextDouble(); in randomDouble()
/external/guava/guava/src/com/google/common/hash/
DHashing.java344 next = (int) ((candidate + 1) / generator.nextDouble()); in consistentHash()
480 public double nextDouble() { in nextDouble() method in Hashing.LinearCongruentialGenerator
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/
DDateFormatRoundTripTest.java108 int random = (int) (ran.nextDouble() * 24); in _test()
271 double a = ran.nextDouble();
DNumberFormatRoundTripTest.java90 return random.nextDouble() * range; in randomDouble()
DIntlTestDateFormat.java231 return random.nextDouble(); in randDouble()
DIntlTestNumberFormat.java149 double d = random.nextDouble()*2e10 - 1e10; in _testFormat()
/external/guava/guava-tests/benchmark/com/google/common/math/
DStatsBenchmark.java160 values[i][j] = rng.nextDouble(); in setUp()
/external/apache-commons-math/src/main/java/org/apache/commons/math/stat/clustering/
DKMeansPlusPlusClusterer.java186 final double r = random.nextDouble() * sum; in chooseInitialCenters()

12