Home
last modified time | relevance | path

Searched refs:random (Results 1 - 25 of 696) sorted by relevance

12345678910>>...28

/third_party/node/benchmark/fixtures/
H A Dcoverage-many-branches.js10 this.opts = opts ?? (Math.random() > 0.5 ? {} : undefined);
41 if (Math.random() > 0.5) {
46 x: Math.random() * x,
47 y: Math.random() * y
61 if (Math.random() > 0.5) {
66 x: Math.random() * x,
67 y: Math.random() * y
80 if (add(Math.random() * 10, Math.random() * 10) > 10) {
82 let r = addSpecial(Math.random() * 1
[all...]
/third_party/python/Modules/_decimal/tests/
H A Drandfloat.py6 import random namespace
21 # Select a random odd n in [2**53/5**k,
24 n, e = random.randrange(lower, upper, 2), k
58 # bit pattern for a random finite positive (or +0.0) float
59 bits = random.randrange(2047*2**52)
94 digits = n + random.randrange(-3*u, 3*u)
104 # to boundary_tests, except that the random error doesn't scale
109 digits = base + random.randrange(-1000, 1000)
117 digits = random.randrange(dig10)
118 exponent = random
[all...]
H A Dformathelper.py32 import os, sys, locale, random namespace
229 # Return random fill character.
232 i = random.randrange(0, 0x110002)
236 # Generate random format strings
239 active = sorted(random.sample(range(7), random.randrange(8)))
245 s += random.choice('<>=^')
248 s += random.choice('+- ')
252 s += str(random.randrange(1, 100))
257 s += str(random
[all...]
/third_party/skia/src/gpu/
H A DGrTestUtils.cpp21 static const SkMatrix& test_matrix(SkRandom* random, in test_matrix() argument
44 return gMatrices[random->nextULessThan(count)]; in test_matrix()
46 return gMatrices[count - 1 - random->nextULessThan(kPerspectiveCount)]; in test_matrix()
49 return gMatrices[random->nextULessThan(count - kPerspectiveCount)]; in test_matrix()
54 const SkMatrix& TestMatrix(SkRandom* random) { return test_matrix(random, true, true); } in TestMatrix() argument
56 const SkMatrix& TestMatrixPreservesRightAngles(SkRandom* random) { in TestMatrixPreservesRightAngles() argument
79 return gMatrices[random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT(gMatrices)))]; in TestMatrixPreservesRightAngles()
82 const SkMatrix& TestMatrixRectStaysRect(SkRandom* random) { in TestMatrixRectStaysRect() argument
105 return gMatrices[random in TestMatrixRectStaysRect()
108 TestMatrixInvertible(SkRandom* random) TestMatrixInvertible() argument
109 TestMatrixPerspective(SkRandom* random) TestMatrixPerspective() argument
111 TestWrapModes(SkRandom* random, GrSamplerState::WrapMode wrapModes[2]) TestWrapModes() argument
120 TestRect(SkRandom* random) TestRect() argument
136 TestSquare(SkRandom* random) TestSquare() argument
147 TestRRectSimple(SkRandom* random) TestRRectSimple() argument
165 TestPath(SkRandom* random) TestPath() argument
213 TestPathConvex(SkRandom* random) TestPathConvex() argument
247 randomize_stroke_rec(SkStrokeRec* rec, SkRandom* random) randomize_stroke_rec() argument
258 TestStrokeRec(SkRandom* random) TestStrokeRec() argument
266 TestStyle(SkRandom* random, GrStyle* style) TestStyle() argument
312 TestColorSpace(SkRandom* random) TestColorSpace() argument
326 TestColorXform(SkRandom* random) TestColorXform() argument
354 RandomColor(SkRandom* random) RandomColor() argument
391 RandomCoverage(SkRandom* random) RandomCoverage() argument
[all...]
/third_party/typescript/tests/baselines/reference/
H A DinferringClassMembersFromAssignments.js6 if (Math.random()) {
15 if (Math.random()) {
27 if (Math.random()) {
36 if (Math.random()) {
46 if (Math.random()) {
54 if (Math.random()) {
62 if (Math.random()) {
70 if (Math.random()) {
79 if (Math.random()) {
87 if (Math.random()) {
[all...]
H A DstrictNullEmptyDestructuring.js14 let { } = Math.random() ? {} : null;
16 ({} = Math.random() ? {} : null);
18 let { } = Math.random() ? {} : undefined;
20 ({} = Math.random() ? {} : undefined);
22 let { } = Math.random() ? null : undefined;
24 ({} = Math.random() ? null : undefined);
34 var _d = Math.random() ? {} : null;
35 (Math.random() ? {} : null);
36 var _e = Math.random() ? {} : undefined;
37 (Math.random()
[all...]
H A DparenthesizedContexualTyping1.js19 var i = fun((Math.random() < 0.5 ? x => x : x => undefined), 10);
20 var j = fun((Math.random() < 0.5 ? (x => x) : (x => undefined)), 10);
21 var k = fun((Math.random() < 0.5 ? (x => x) : (x => undefined)), x => x, 10);
22 var l = fun(((Math.random() < 0.5 ? ((x => x)) : ((x => undefined)))), ((x => x)), 10);
44 var i = fun((Math.random() < 0.5 ? function (x) { return x; } : function (x) { return undefined; }), 10);
45 var j = fun((Math.random() < 0.5 ? (function (x) { return x; }) : (function (x) { return undefined; })), 10);
46 var k = fun((Math.random() < 0.5 ? (function (x) { return x; }) : (function (x) { return undefined; })), function (x) { return x; }, 10);
47 var l = fun(((Math.random() < 0.5 ? ((function (x) { return x; })) : ((function (x) { return undefined; })))), ((function (x) { return x; })), 10);
/third_party/python/Lib/
H A Drandom.py13 pick random element
14 pick random sample
15 pick weighted random sample
16 generate random permutation
39 * The random() method is implemented in C, executes in a single Python step,
83 "random",
111 methods: random(), seed(), getstate(), and setstate().
140 bytes, or bytearray. For version 1 (provided for reproducing random
201 # longer called; we leave it here because it has been here since random was
216 """Control how subclasses generate random integer
796 def random(self): global() member in SystemRandom
833 random = _inst.random global() variable
[all...]
/third_party/node/deps/v8/tools/clusterfuzz/js_fuzzer/test/
H A Dtest_try_catch.js15 const random = require('../random.js');
40 sandbox.stub(random, 'choose').callsFake(() => { return false; });
41 sandbox.stub(random, 'random').callsFake(() => { return 0.7; });
47 sandbox.stub(random, 'choose').callsFake(() => { return false; });
48 sandbox.stub(random, 'random').callsFake(() => { return 0.04; });
60 sandbox.stub(random, 'choose').callsFake(() => { return false; });
61 sandbox.stub(random, 'rando
[all...]
H A Dtest_mutate_expressions.js21 const random = require('../random.js');
41 sandbox.stub(random, 'randInt').callsFake((a, b) => b);
43 sandbox.stub(random, 'random').callsFake(() => 0.8);
52 sandbox.stub(random, 'shuffle').callsFake(a => a);
54 sandbox.stub(random, 'choose').callsFake(a => a === 1);
61 sandbox.stub(random, 'shuffle').callsFake(a => [a[1], a[0]]);
63 sandbox.stub(random, 'choose').callsFake(() => true);
/third_party/python/Lib/test/
H A Dtest_random.py3 import random namespace
22 """Helper function to make a list of random numbers"""
23 return [self.gen.random() for i in range(n)]
64 @unittest.mock.patch('random._urandom') # os.urandom
94 # actually happen in a genuinely random shuffle, it is
305 # Test consistency with random.choice() for empty population
315 # in choices() when the value returned by random() was large
316 # enough to make `random() * total` round up to the total.
349 x1 = self.gen.random()
353 x2 = self.gen.random()
1234 def random(self): global() member in TestRandomSubclassing.test_subclasses_overriding_methods.SubClass1
1247 def random(self): global() member in TestRandomSubclassing.test_subclasses_overriding_methods.SubClass2
1267 def random(self): global() member in TestRandomSubclassing.test_subclasses_overriding_methods.SubClass4
1277 def random(self): global() member in TestRandomSubclassing.test_subclasses_overriding_methods.Mixin1
[all...]
H A Dsortperf.py10 import random namespace
18 """Return a list of n random floats in [0, 1)."""
26 r = random.random
47 i = random.randrange(n)
74 *sort: random data
77 3sort: ascending, then 3 random exchanges
78 +sort: ascending, then 10 random at the end
79 %sort: ascending, then randomly replace 1% of the elements w/ random values
98 # Do 3 random exchange
[all...]
H A Dtest_strtod.py4 import random namespace
116 # Select a random odd n in [2**53/5**k,
119 n, e = random.randrange(lower, upper, 2), k
152 # bit pattern for a random finite positive (or +0.0) float
153 bits = random.randrange(2047*2**52)
187 digits = n + random.randrange(-3*u, 3*u)
197 # to boundary_tests, except that the random error doesn't scale
202 digits = base + random.randrange(-1000, 1000)
210 digits = random.randrange(dig10)
211 exponent = random
[all...]
/third_party/decimal.js/test/modules/
H A Drandom.js3 T('random', function () {
13 sd = Math.random() * maxDigits + 1 | 0;
15 if (Math.random() > 0.5) {
17 r = Decimal.random();
19 r = Decimal.random(sd);
25 tx(function () { Decimal.random(Infinity) }, 'Infinity');
26 tx(function () { Decimal.random('-Infinity') }, "'-Infinity'");
27 tx(function () { Decimal.random(NaN) }, 'NaN');
28 tx(function () { Decimal.random(null) }, 'null');
/third_party/ltp/testcases/network/nfsv4/acl/
H A Drandom_gen.py3 import random namespace
32 group = self.gList[random.randint(0,len(self.gList)-1)][0]
151 """ Create a random name of random length """
154 l=random.randint(0,maxlength)
156 a = random.randint(0,a_length-1)
160 """ Create a random name of fixed length """
164 a = random.randint(0,a_length-1)
178 type = ace_type[random.randint(0,len(ace_type))]
179 flag = ace_flags[random
[all...]
/third_party/openssl/test/
H A Ddrbgtest.c76 /* size of random output generated in test_drbg_reseed() */
166 * Generates random output using rand_bytes() and rand_priv_bytes()
172 * |public_random|, |private_random|: generated random output
214 * step 2: generate random output in test_drbg_reseed()
220 /* Generate random output from the public and private DRBG */ in test_drbg_reseed()
288 unsigned char random[RANDOM_SIZE]; /* random output */ member
299 * This simplifies finding duplicate random output and makes
312 result = memcmp(l->random, r->random, RANDOM_SIZ in compare_drbg_fork_result()
344 unsigned char random[2 * RANDOM_SIZE]; test_drbg_reseed_in_child() local
414 unsigned char random[2 * RANDOM_SIZE]; test_rand_reseed_on_fork() local
528 unsigned char random[1]; test_rand_fork_safety() local
[all...]
/third_party/skia/third_party/externals/abseil-cpp/absl/numeric/
H A Dint128_benchmark.cc18 #include <random>
40 std::mt19937 random = MakeRandomEngine(); in GetRandomClass128SampleUniformDivisor() local
44 T a{absl::MakeUint128(uniform_h(random), uniform_h(random))}; in GetRandomClass128SampleUniformDivisor()
45 T b{absl::MakeUint128(uniform_h(random), uniform_h(random))}; in GetRandomClass128SampleUniformDivisor()
80 std::mt19937 random = MakeRandomEngine(); in GetRandomClass128SampleSmallDivisor() local
84 T a{absl::MakeUint128(uniform_h(random), uniform_h(random))}; in GetRandomClass128SampleSmallDivisor()
85 H b{std::max(H{2}, uniform_h(random))}; in GetRandomClass128SampleSmallDivisor()
117 std::mt19937 random = MakeRandomEngine(); GetRandomClass128Sample() local
171 std::mt19937 random = MakeRandomEngine(); GetRandomIntrinsic128SampleUniformDivisor() local
212 std::mt19937 random = MakeRandomEngine(); GetRandomIntrinsic128SampleSmallDivisor() local
251 std::mt19937 random = MakeRandomEngine(); GetRandomIntrinsic128Sample() local
[all...]
/third_party/node/deps/v8/tools/clusterfuzz/js_fuzzer/mutators/
H A Dexpression_mutator.js13 const random = require('../random.js');
27 if (!random.choose(thisMutator.settings.MUTATE_EXPRESSIONS)) {
31 const probability = random.random();
38 // Get a random previous sibling.
39 const prev = path.getSibling(random.randInt(0, path.key - 1));
44 const [selected, destination] = random.shuffle([prev, path]);
50 if (random.choose(0.5)) {
H A Darray_mutator.js15 const random = require('../random.js');
35 if (!random.choose(thisMutator.settings.MUTATE_ARRAYS) ||
47 // Add or replace elements at a random index.
50 const index = random.randInt(0, elements.length - replace);
55 const element = random.single(elements);
64 annotate('Insert a random value', replace);
75 randomSplice(random.randInt(1, count));
80 random.shuffle(elements);
101 const count = random
[all...]
H A Dcommon.js14 const random = require('../random.js');
165 return random.single(availableVariables(path));
169 return random.single(availableFunctions(path));
173 return random.randInt(0, 2**20);
200 const numArgs = random.randInt(0, MAX_ARGUMENT_COUNT);
211 const probability = random.random();
257 const probability = random.random();
[all...]
H A Dobject_mutator.js15 const random = require('../random.js');
45 if (!random.choose(thisMutator.settings.MUTATE_OBJECTS) ||
70 return properties[random.single(propertyIndicies)];
74 const [a, b] = random.sample(propertyIndicies, 2);
88 const [a, b] = random.shuffle(getTwoRandomProperties());
98 annotate('Insert a random value');
111 properties.splice(random.single(propertyIndicies), 1);
127 random.single(mutations)();
/third_party/node/deps/v8/tools/clusterfuzz/js_fuzzer/
H A Drandom.js14 return Math.floor(Math.random() * (max - min + 1)) + min;
18 return Math.random() < probability;
21 function random() { function
22 return Math.random();
26 return Math.random() * (max - min) + min;
72 // Map a random number to the summarized indices of both arrays. Give
74 const p = random();
107 random: random,
/third_party/skia/docs/examples/
H A DBitmap_allocN32Pixels.cpp7 SkRandom random; in REG_FIDDLE() local
13 SkColor color = random.nextU(); in REG_FIDDLE()
14 uint32_t w = random.nextRangeU(4, 32); in REG_FIDDLE()
15 uint32_t cx = random.nextRangeU(0, 64 - w); in REG_FIDDLE()
16 uint32_t h = random.nextRangeU(4, 32); in REG_FIDDLE()
17 uint32_t cy = random.nextRangeU(0, 64 - h); in REG_FIDDLE()
/third_party/skia/src/gpu/ops/
H A DDrawAtlasOp.cpp331 static SkRSXform random_xform(SkRandom* random) { in random_xform() argument
339 SkRSXform xform = SkRSXform::MakeFromRadians(random->nextRangeScalar(kMinScale, kMaxScale), in random_xform()
340 random->nextRangeScalar(kMinRotate, kMaxRotate), in random_xform()
341 random->nextRangeScalar(kMinExtent, kMaxExtent), in random_xform()
342 random->nextRangeScalar(kMinExtent, kMaxExtent), in random_xform()
343 random->nextRangeScalar(kMinExtent, kMaxExtent), in random_xform()
344 random->nextRangeScalar(kMinExtent, kMaxExtent)); in random_xform()
348 static SkRect random_texRect(SkRandom* random) { in random_texRect() argument
352 SkRect texRect = SkRect::MakeLTRB(random->nextRangeScalar(kMinCoord, kMaxCoord), in random_texRect()
353 random in random_texRect()
360 randomize_params(uint32_t count, SkRandom* random, SkTArray<SkRSXform>* xforms, SkTArray<SkRect>* texRects, SkTArray<GrColor>* colors, bool hasColors) randomize_params() argument
[all...]
H A DLatticeOp.cpp426 SkRandom* random) {
429 // Not terribly efficient alg for generating random divs:
445 int entry = random->nextULessThan(count + 1);
461 // We loop because our random lattice code can produce an invalid lattice in the case where
470 dims.fWidth = random->nextRangeU(1, 1000);
471 dims.fHeight = random->nextRangeU(1, 1000);
472 GrSurfaceOrigin origin = random->nextBool() ? kTopLeft_GrSurfaceOrigin
488 if (random->nextBool()) {
489 subset.fLeft = random->nextULessThan(dims.fWidth);
490 subset.fRight = random
[all...]

Completed in 12 milliseconds

12345678910>>...28