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

1 2 3 4

  /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/luni/src/main/java/java/util/concurrent/
ThreadLocalRandom.java 174 public double nextDouble(double n) {
177 return nextDouble() * n;
190 public double nextDouble(double least, double bound) {
193 return nextDouble() * (bound - least) + least;
  /libcore/luni/src/main/java/java/util/
Random.java 129 public double nextDouble() {
157 v1 = 2 * nextDouble() - 1;
158 v2 = 2 * nextDouble() - 1;
  /libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
ChoiceFormatTest.java 30 double[] limits = new double[] { 0, 1, ChoiceFormat.nextDouble(1),
31 ChoiceFormat.nextDouble(2) };
150 double[] choiceLimits = { -1, 0, 1, ChoiceFormat.nextDouble(1) };
179 choiceLimits[0] = ChoiceFormat.nextDouble(-1);
216 double[] orangeLimits = { -2, 0, ChoiceFormat.nextDouble(0), 1, 2 };
331 * @tests java.text.ChoiceFormat#nextDouble(double)
334 // Test for method double java.text.ChoiceFormat.nextDouble(double)
335 assertTrue("Not greater 5", ChoiceFormat.nextDouble(5) > 5);
336 assertTrue("Not greater 0", ChoiceFormat.nextDouble(0) > 0);
337 assertTrue("Not greater -5", ChoiceFormat.nextDouble(-5) > -5)
    [all...]
  /cts/tests/tests/util/src/android/util/cts/
JsonReaderTest.java 205 assertEquals(1.0, reader.nextDouble());
228 assertEquals(-0.0, reader.nextDouble());
229 assertEquals(1.0, reader.nextDouble());
230 assertEquals(1.7976931348623157E308, reader.nextDouble());
231 assertEquals(4.9E-324, reader.nextDouble());
232 assertEquals(0.0, reader.nextDouble());
233 assertEquals(-0.5, reader.nextDouble());
234 assertEquals(2.2250738585072014E-308, reader.nextDouble());
235 assertEquals(3.141592653589793, reader.nextDouble());
236 assertEquals(2.718281828459045, reader.nextDouble());
    [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();
FilterStraightenRepresentation.java 135 float s = (float) reader.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) {
  /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 64 return RANDOM_SOURCE.nextDouble();
  /libcore/luni/src/main/java/java/text/
ChoiceFormat.java 45 * double[] limits2 = {0, 1, ChoiceFormat.nextDouble(1)};
50 * ChoiceFormat.nextDouble(double) allows to get the double following the one
168 next = nextDouble(value.doubleValue());
308 public static final double nextDouble(double value) {
317 public static double nextDouble(double value, boolean increment) {
318 return increment ? nextDouble(value) : previousDouble(value);
444 // quantities and calling nextDouble will result in a "longer" number in most cases.
  /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());
232 double d = Math.exp(10.0 * r.nextDouble() - 1.0);
239 double d = Math.exp(600.0 * r.nextDouble());
  /external/icu/icu4j/main/tests/framework/src/com/ibm/icu/dev/util/
Pick.java 61 private double nextDouble() {
62 return random.nextDouble();
215 items[weightedIndex.toIndex(target.nextDouble())].addTo(target);
269 for (int i = weightedIndex.toIndex(target.nextDouble()); i > 0; --i) {
362 int c = choice.toIndex(target.nextDouble());
692 return start + (int)(random.nextDouble() * (end + 1 - start));
696 return start + (random.nextDouble() * (end + 1 - start));
700 return random.nextDouble() <= percent;
786 return start + (int)(spread.spread(random.nextDouble()) * (end + 1 - start));
  /libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
RandomTest.java 82 * java.util.Random#nextDouble()
85 // Test for method double java.util.Random.nextDouble()
86 double lastNum = r.nextDouble();
91 nextNum = r.nextDouble();
98 assertTrue("Calling nextDouble 100 times resulted in same number",
101 "Calling nextDouble resulted in a number out of range [0,1)",
272 mr.nextDouble();
ScannerTest.java     [all...]

Completed in 3092 milliseconds

1 2 3 4