HomeSort by relevance Sort by last modified time
    Searched refs:nextDouble (Results 1 - 25 of 214) sorted by null

1 2 3 4 5 6 7 8 9

  /external/apache-commons-math/src/main/java/org/apache/commons/math/random/
AbstractRandomGenerator.java 24 * Default implementations for all methods other than {@link #nextDouble()} and
27 * All data generation methods are based on {@code code nextDouble()}.
130 * <code>(int) (nextDouble() * Integer.MAX_VALUE)</code>
137 return (int) (nextDouble() * Integer.MAX_VALUE);
147 * <code>(int) (nextDouble() * n</code>
160 int result = (int) (nextDouble() * n);
172 * <code>(long) (nextDouble() * Long.MAX_VALUE)</code>
179 return (long) (nextDouble() * Long.MAX_VALUE);
189 * <code>nextDouble() <= 0.5</code>
197 return nextDouble() <= 0.5
    [all...]
RandomGenerator.java 135 double nextDouble();
UniformRandomGenerator.java 58 return SQRT3 * (2 * generator.nextDouble() - 1.0);
BitsStreamGenerator.java 51 * #nextBoolean()}, {@link #nextBytes(byte[])}, {@link #nextDouble()},
84 public double nextDouble() {
101 final double x = nextDouble();
102 final double y = nextDouble();
RandomAdaptor.java 99 public double nextDouble() {
100 return randomGenerator.nextDouble();
UnitSphereRandomVectorGenerator.java 69 final double comp = 2 * rand.nextDouble() - 1;
RandomDataImpl.java 204 double r = getRan().nextDouble();
224 double r = getRan().nextDouble();
316 return lower + (int) (sec.nextDouble() * (upper - lower + 1));
337 return lower + (long) (sec.nextDouble() * (upper - lower + 1));
372 rnd = generator.nextDouble();
487 double unif = generator.nextDouble();
489 unif = generator.nextDouble();
498 * Random.nextDouble(), but rejects 0 values (i.e., will generate another
499 * random double if Random.nextDouble() returns 0). This is necessary to
518 // ensure nextDouble() isn't 0.
    [all...]
  /libcore/benchmarks/src/benchmarks/
XmlSerializeBenchmark.java 57 while(r.nextDouble() < contChance) {
58 while(level > 0 && r.nextDouble() < levelUpChance) {
62 while(r.nextDouble() < levelDownChance) {
68 while(r.nextDouble() < attributeChance) {
73 while(r.nextDouble() < writeChance1)
75 while(r.nextDouble() < writeChance2)
  /libcore/ojluni/src/main/java/java/util/
PrimitiveIterator.java 241 double nextDouble();
253 * action.accept(nextDouble());
262 action.accept(nextDouble());
269 * {@link #nextDouble()}, and returns that boxed result.
275 return nextDouble();
  /packages/services/Car/service/src/com/android/car/
CarLocationService.java 243 location.setLatitude(reader.nextDouble());
245 location.setLongitude(reader.nextDouble());
247 location.setAltitude(reader.nextDouble());
249 location.setSpeed((float) reader.nextDouble());
251 location.setBearing((float) reader.nextDouble());
253 location.setAccuracy((float) reader.nextDouble());
255 location.setVerticalAccuracyMeters((float) reader.nextDouble());
257 location.setSpeedAccuracyMetersPerSecond((float) reader.nextDouble());
259 location.setBearingAccuracyDegrees((float) reader.nextDouble());
  /libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
ChoiceFormatTest.java 31 double[] limits = new double[] { 0, 1, ChoiceFormat.nextDouble(1),
32 ChoiceFormat.nextDouble(2) };
151 double[] choiceLimits = { -1, 0, 1, ChoiceFormat.nextDouble(1) };
180 choiceLimits[0] = ChoiceFormat.nextDouble(-1);
217 double[] orangeLimits = { -2, 0, ChoiceFormat.nextDouble(0), 1, 2 };
307 * @tests java.text.ChoiceFormat#nextDouble(double)
310 // Test for method double java.text.ChoiceFormat.nextDouble(double)
311 assertTrue("Not greater 5", ChoiceFormat.nextDouble(5) > 5);
312 assertTrue("Not greater 0", ChoiceFormat.nextDouble(0) > 0);
313 assertTrue("Not greater -5", ChoiceFormat.nextDouble(-5) > -5)
    [all...]
  /cts/tests/tests/util/src/android/util/cts/
JsonReaderTest.java 215 assertEquals(1.0, reader.nextDouble(), 0.0f);
239 assertEquals(-0.0, reader.nextDouble(), 0.0f);
240 assertEquals(1.0, reader.nextDouble(), 0.0f);
241 assertEquals(1.7976931348623157E308, reader.nextDouble(), 0.0f);
242 assertEquals(4.9E-324, reader.nextDouble(), 0.0f);
243 assertEquals(0.0, reader.nextDouble(), 0.0f);
244 assertEquals(-0.5, reader.nextDouble(), 0.0f);
245 assertEquals(2.2250738585072014E-308, reader.nextDouble(), 0.0f);
246 assertEquals(3.141592653589793, reader.nextDouble(), 0.0f);
247 assertEquals(2.718281828459045, reader.nextDouble(), 0.0f)
    [all...]
  /external/apache-commons-math/src/main/java/org/apache/commons/math/genetics/
RandomKeyMutation.java 52 newRepr.set(rInd, GeneticAlgorithm.getRandomGenerator().nextDouble());
GeneticAlgorithm.java 152 if (randGen.nextDouble() < getCrossoverRate()) {
158 if (randGen.nextDouble() < getMutationRate()) {
  /packages/apps/Gallery2/src/com/android/gallery3d/filtershow/filters/
FilterCropRepresentation.java 168 mCrop.left = (float) reader.nextDouble();
170 mCrop.top = (float) reader.nextDouble();
172 mCrop.right = (float) reader.nextDouble();
174 mCrop.bottom = (float) reader.nextDouble();
FilterVignetteRepresentation.java 217 mCenterX = (float) sreader.nextDouble();
219 mCenterY = (float) sreader.nextDouble();
221 mRadiusX = (float) sreader.nextDouble();
223 mRadiusY = (float) sreader.nextDouble();
FilterCurvesRepresentation.java 156 float x = (float) sreader.nextDouble();
158 float y = (float) sreader.nextDouble();
  /libcore/jsr166-tests/src/test/java/jsr166/
ThreadLocalRandomTest.java 104 * Repeated calls to nextDouble produce at least two distinct results
107 double f = ThreadLocalRandom.current().nextDouble();
109 while (i < NCALLS && ThreadLocalRandom.current().nextDouble() == f)
269 * nextDouble(non-positive) throws IllegalArgumentException
282 rnd.nextDouble(bound);
289 * nextDouble(least, bound) returns least <= value < bound;
295 double f = ThreadLocalRandom.current().nextDouble(least, bound);
300 (j = ThreadLocalRandom.current().nextDouble(least, bound)) == f) {
  /libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DoublePrimitiveOpsTests.java 60 double[] content = DoubleStream.generate(() -> r.nextDouble()).limit(10).toArray();
78 double[] content = DoubleStream.generate(() -> r.nextDouble()).limit(10).toArray();
  /cts/tests/tests/keystore/src/android/keystore/cts/
CountingSecureRandom.java 77 public double nextDouble() {
  /external/guava/guava-tests/test/com/google/common/math/
MathBenchmarking.java 110 double result = RANDOM_SOURCE.nextDouble();
  /libcore/luni/src/test/java/libcore/dalvik/system/
EmulatedStackFrameTest.java 54 assertEquals(52.0, reader.nextDouble());
107 assertEquals(73.0, reader.nextDouble());
130 reader.nextDouble();
138 reader.nextDouble();
  /libcore/ojluni/src/main/java/java/text/
ChoiceFormat.java 79 * <em>limits</em> = {0, 1, ChoiceFormat.nextDouble(1)}<br>
81 * (<code>nextDouble</code> can be used to get the next higher double, to
219 startValue = nextDouble(startValue);
455 public static final double nextDouble (double d) {
456 return nextDouble(d,true);
465 * @see #nextDouble
468 return nextDouble(d,false);
545 private static double nextDouble (double d, boolean positive) {
588 public static double nextDouble (double d, boolean positive) {
  /external/crcalc/tests/src/com/hp/creals/
SlowCRTest.java 185 double d = Math.exp(2.0 * r.nextDouble() - 1.0);
192 double d = Math.exp(200.0 * r.nextDouble());
213 double d = Math.exp(10.0 * r.nextDouble() - 1.0);
220 double d = Math.exp(200.0 * r.nextDouble());
235 double d = Math.exp(10.0 * r.nextDouble() - 1.0);
242 double d = Math.exp(600.0 * r.nextDouble());
  /external/walt/android/WALT/app/src/test/java/org/chromium/latency/walt/
UtilsTest.java 145 touchTimes[i] = i + rand.nextDouble()*0.2 - 0.1;
150 touchY[i] = 1000*Math.cos((touchTimes[i] - latency) * Math.PI/500) + rand.nextDouble()*0.02 - 0.01;

Completed in 1538 milliseconds

1 2 3 4 5 6 7 8 9