Home
last modified time | relevance | path

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

123

/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()
235 double d = Math.exp(10.0 * r.nextDouble() - 1.0); in testSlowBasic()
242 double d = Math.exp(600.0 * r.nextDouble()); in testSlowBasic()
DConversionTest.java80 double d = Math.exp(1000.0 * r.nextDouble()); in testConversions()
/external/cldr/tools/java/org/unicode/cldr/util/
DPick.java68 private double nextDouble() { in nextDouble() method in Pick.Target
69 return random.nextDouble(); in nextDouble()
235 items[weightedIndex.toIndex(target.nextDouble())].addTo(target); in addTo()
293 for (int i = weightedIndex.toIndex(target.nextDouble()); i > 0; --i) { in addTo()
390 int c = choice.toIndex(target.nextDouble()); in addTo()
733 return start + (int) (random.nextDouble() * (end + 1 - start)); in pick()
737 return start + (random.nextDouble() * (end + 1 - start)); in pick()
741 return random.nextDouble() <= percent; in pick()
/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()
/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/cldr/tools/java/org/unicode/cldr/draft/
DGapStringTest.java93 randomStarts[i] = random.nextDouble(); in checkTime()
94 randomInserts[i] = random.nextDouble(); in checkTime()
/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/grpc-grpc-java/core/src/test/java/io/grpc/internal/
DExponentialBackoffPolicyTest.java35 public double nextDouble() {
/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.java112 int random = (int) (ran.nextDouble() * 24); in _test()
275 double a = ran.nextDouble();
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/
DDateFormatRoundTripTest.java115 int random = (int) (ran.nextDouble() * 24); in _test()
278 double a = ran.nextDouble();
/external/guava/guava-tests/test/com/google/common/math/
DMathBenchmarking.java110 double result = RANDOM_SOURCE.nextDouble(); in randomDouble()
/external/grpc-grpc-java/core/src/main/java/io/grpc/internal/
DExponentialBackoffPolicy.java58 return (long) (random.nextDouble() * mag + low); in uniformRandom()
DJsonParser.java70 return jr.nextDouble(); in parseRecursive()
/external/kotlinc/lib/
Dkotlin-stdlib-jdk8.jarMETA-INF/ META-INF/MANIFEST.MF kotlin/ kotlin/random/ kotlin/ ...
/external/skia/tools/bookmaker/
Ddefinition.cpp325 size_t nextDouble = methodName.find("::"); in setCanonicalFiddle() local
326 if (string::npos == nextDouble) { in setCanonicalFiddle()
329 base = methodName.substr(0, nextDouble); in setCanonicalFiddle()
331 methodName = methodName.substr(nextDouble + 2); in setCanonicalFiddle()
332 doubleColons += nextDouble + 2; in setCanonicalFiddle()
/external/skqp/tools/bookmaker/
Ddefinition.cpp325 size_t nextDouble = methodName.find("::"); in setCanonicalFiddle() local
326 if (string::npos == nextDouble) { in setCanonicalFiddle()
329 base = methodName.substr(0, nextDouble); in setCanonicalFiddle()
331 methodName = methodName.substr(nextDouble + 2); in setCanonicalFiddle()
332 doubleColons += nextDouble + 2; in setCanonicalFiddle()

123