/external/guava/guava-tests/test/com/google/common/hash/ |
D | HashTestUtils.java | 92 @Override void performAction(Random random, Iterable<? extends PrimitiveSink> sinks) { in PUT_BOOLEAN() argument 93 boolean value = random.nextBoolean(); in PUT_BOOLEAN() 100 @Override void performAction(Random random, Iterable<? extends PrimitiveSink> sinks) { in PUT_BYTE() argument 101 int value = random.nextInt(); in PUT_BYTE() 108 @Override void performAction(Random random, Iterable<? extends PrimitiveSink> sinks) { in PUT_SHORT() argument 109 short value = (short) random.nextInt(); in PUT_SHORT() 116 @Override void performAction(Random random, Iterable<? extends PrimitiveSink> sinks) { in PUT_CHAR() argument 117 char value = (char) random.nextInt(); in PUT_CHAR() 124 @Override void performAction(Random random, Iterable<? extends PrimitiveSink> sinks) { in PUT_INT() argument 125 int value = random.nextInt(); in PUT_INT() [all …]
|
/external/skia/src/gpu/ |
D | GrTestUtils.cpp | 19 static const SkMatrix& test_matrix(SkRandom* random, in test_matrix() argument 42 return gMatrices[random->nextULessThan(count)]; in test_matrix() 44 return gMatrices[count - 1 - random->nextULessThan(kPerspectiveCount)]; in test_matrix() 47 return gMatrices[random->nextULessThan(count - kPerspectiveCount)]; in test_matrix() 52 const SkMatrix& TestMatrix(SkRandom* random) { return test_matrix(random, true, true); } in TestMatrix() argument 54 const SkMatrix& TestMatrixPreservesRightAngles(SkRandom* random) { in TestMatrixPreservesRightAngles() argument 77 return gMatrices[random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT(gMatrices)))]; in TestMatrixPreservesRightAngles() 80 const SkMatrix& TestMatrixRectStaysRect(SkRandom* random) { in TestMatrixRectStaysRect() argument 103 return gMatrices[random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT(gMatrices)))]; in TestMatrixRectStaysRect() 106 const SkMatrix& TestMatrixInvertible(SkRandom* random) { return test_matrix(random, true, false); } in TestMatrixInvertible() argument [all …]
|
D | GrTestUtils.h | 87 static inline GrColor GrRandomColor(SkRandom* random) { in GrRandomColor() argument 97 ColorMode colorMode = ColorMode(random->nextULessThan(kLast_ColorMode + 1)); in GrRandomColor() 107 color = GrColorPackRGBA(random->nextULessThan(256), in GrRandomColor() 108 random->nextULessThan(256), in GrRandomColor() 109 random->nextULessThan(256), in GrRandomColor() 113 uint8_t alpha = random->nextULessThan(256); in GrRandomColor() 114 color = GrColorPackRGBA(random->nextRangeU(0, alpha), in GrRandomColor() 115 random->nextRangeU(0, alpha), in GrRandomColor() 116 random->nextRangeU(0, alpha), in GrRandomColor() 125 static inline uint8_t GrRandomCoverage(SkRandom* random) { in GrRandomCoverage() argument [all …]
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/random/ |
D | BitsStreamGenerator.java | 17 package org.apache.commons.math.random; 69 final int random = next(32); in nextBytes() local 70 bytes[i] = (byte) (random & 0xff); in nextBytes() 71 bytes[i + 1] = (byte) ((random >> 8) & 0xff); in nextBytes() 72 bytes[i + 2] = (byte) ((random >> 16) & 0xff); in nextBytes() 73 bytes[i + 3] = (byte) ((random >> 24) & 0xff); in nextBytes() 76 int random = next(32); in nextBytes() local 78 bytes[i++] = (byte) (random & 0xff); in nextBytes() 79 random = random >> 8; in nextBytes() 98 final double random; in nextGaussian() local [all …]
|
/external/python/cpython2/Lib/ |
D | random.py | 192 return _int(self.random() * istart) 216 return _int(istart + _int(self.random()*width)) 236 return istart + istep*_int(self.random() * n) 260 if type(self.random) is _BuiltinMethod or type(getrandbits) is _Method: 269 return _int(self.random() * n) 275 return seq[int(self.random() * len(seq))] # raises IndexError if seq is empty 277 def shuffle(self, x, random=None): argument 285 if random is None: 286 random = self.random 290 j = _int(random() * (i+1)) [all …]
|
/external/eigen/test/ |
D | svd_fill.h | 29 s = internal::random<RealScalar>(1,s); 32 d(k) = d(k)*pow(RealScalar(10),internal::random<RealScalar>(-s,s)); 34 bool dup = internal::random<int>(0,10) < 3; 35 …bool unit_uv = internal::random<int>(0,10) < (dup?7:3); // if we duplicate some diagonal entries, … 40 Index n = internal::random<Index>(0,d.size()-1); 42 d(internal::random<Index>(0,d.size()-1)) = d(internal::random<Index>(0,d.size()-1)); 50 if(internal::random<int>(0,10) < 1) 77 Index count = internal::random<Index>(-diagSize,diagSize); 80 Index i = internal::random<Index>(0,diagSize-1); 89 Index n = internal::random<Index>(0,m.size()-1); [all …]
|
D | product_large.cpp | 15 int rows = internal::random<int>(1,12); in test_aliasing() 16 int cols = internal::random<int>(1,12); in test_aliasing() 36 …CALL_SUBTEST_1( product(MatrixXf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<in… in test_product_large() 37 …CALL_SUBTEST_2( product(MatrixXd(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<in… in test_product_large() 38 …CALL_SUBTEST_3( product(MatrixXi(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<in… in test_product_large() 39 …CALL_SUBTEST_4( product(MatrixXcf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2), internal::random… in test_product_large() 40 …(Matrix<float,Dynamic,Dynamic,RowMajor>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::ra… in test_product_large() 64 std::ptrdiff_t l1 = internal::random<int>(10000,20000); in test_product_large() 65 std::ptrdiff_t l2 = internal::random<int>(100000,200000); in test_product_large() 66 std::ptrdiff_t l3 = internal::random<int>(1000000,2000000); in test_product_large() [all …]
|
D | linearstructure.cpp | 35 Scalar s1 = internal::random<Scalar>(); in linearStructure() 36 while (abs(s1)<RealScalar(1e-3)) s1 = internal::random<Scalar>(); in linearStructure() 38 Index r = internal::random<Index>(0, rows-1), in linearStructure() 39 c = internal::random<Index>(0, cols-1); in linearStructure() 82 RealScalar s = internal::random<RealScalar>(); in real_complex() 123 …L_SUBTEST_5( linearStructure(MatrixXcf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2), internal::r… in test_linearstructure() 124 …LL_SUBTEST_6( linearStructure(MatrixXf (internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::ra… in test_linearstructure() 125 …LL_SUBTEST_7( linearStructure(MatrixXi (internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::ra… in test_linearstructure() 126 …L_SUBTEST_8( linearStructure(MatrixXcd(internal::random<int>(1,EIGEN_TEST_MAX_SIZE/2), internal::r… in test_linearstructure() 127 …LL_SUBTEST_9( linearStructure(ArrayXXf (internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::ra… in test_linearstructure() [all …]
|
/external/eigen/unsupported/test/ |
D | cxx11_tensor_const.cpp | 18 Tensor<int, 3> random(2,3,7); in test_simple_assign() local 19 random.setRandom(); in test_simple_assign() 21 TensorMap<Tensor<const int, 3> > constant(random.data(), 2, 3, 7); in test_simple_assign() 28 VERIFY_IS_EQUAL((result(i,j,k)), random(i,j,k)); in test_simple_assign() 37 Tensor<int, 3> random(2,3,7); in test_assign_of_const_tensor() local 38 random.setRandom(); in test_assign_of_const_tensor() 40 TensorMap<Tensor<const int, 3> > constant1(random.data(), 2, 3, 7); in test_assign_of_const_tensor() 41 TensorMap<const Tensor<int, 3> > constant2(random.data(), 2, 3, 7); in test_assign_of_const_tensor() 42 const TensorMap<Tensor<int, 3> > constant3(random.data(), 2, 3, 7); in test_assign_of_const_tensor() 50 VERIFY_IS_EQUAL((result1(i,j)), random(i,j,0)); in test_assign_of_const_tensor() [all …]
|
D | cxx11_tensor_thread_pool.cpp | 29 Eigen::ThreadPool tp(internal::random<int>(3, 11)); in test_multithread_elementwise() 30 Eigen::ThreadPoolDevice thread_pool_device(&tp, internal::random<int>(3, 11)); in test_multithread_elementwise() 52 Eigen::ThreadPool tp(internal::random<int>(3, 11)); in test_multithread_compound_assignment() 53 Eigen::ThreadPoolDevice thread_pool_device(&tp, internal::random<int>(3, 11)); in test_multithread_compound_assignment() 113 t_left = (t_left.constant(-0.5f) + t_left.random()) * 2.0f; in test_contraction_corner_cases() 114 t_right = (t_right.constant(-0.6f) + t_right.random()) * 2.0f; in test_contraction_corner_cases() 142 t_left = (t_left.constant(-0.5f) + t_left.random()) * 2.0f; in test_contraction_corner_cases() 158 t_left = (t_left.constant(-0.5f) + t_left.random()) * 2.0f; in test_contraction_corner_cases() 159 t_right = (t_right.constant(-0.6f) + t_right.random()) * 2.0f; in test_contraction_corner_cases() 176 t_left = (t_left.constant(-0.5f) + t_left.random()) * 2.0f; in test_contraction_corner_cases() [all …]
|
/external/llvm/test/Analysis/BasicAA/ |
D | negoffset.ll | 6 declare i32* @random.i32(i32* %ptr) 13 %random = call i32* @random.i32(i32* %alloca) 14 %p0 = getelementptr inbounds i32, i32* %random, i32 0 15 %p1 = getelementptr inbounds i32, i32* %random, i32 1 23 %random = call i32* @random.i32(i32* %arg) 24 %p0 = getelementptr inbounds i32, i32* %random, i32 0 25 %p1 = getelementptr inbounds i32, i32* %random, i32 1 34 %random = call i32* @random.i32(i32* @gv) 35 %p0 = getelementptr inbounds i32, i32* %random, i32 0 36 %p1 = getelementptr inbounds i32, i32* %random, i32 1 [all …]
|
/external/python/cpython2/Lib/test/ |
D | test_random.py | 2 import random 17 return [self.gen.random() for i in xrange(n)] 63 val = self.gen.random() 132 x1 = self.gen.random() 136 x2 = self.gen.random() 145 origseq = [self.gen.random() for i in xrange(10)] 147 restoredseq = [newgen.random() for i in xrange(10)] 164 gen = random.WichmannHill() 174 r1 = self.gen.random() 178 self.gen.random() [all …]
|
D | test_mutants.py | 2 import random 51 if random.random() < 0.5: 54 if random.random() < 0.5: 59 if random.random() < 0.2: 63 newkey = Horrid(random.randrange(100)) 66 target[newkey] = Horrid(random.randrange(100)) 73 i = random.randrange(len(keys)) 91 self.hashcode = random.randrange(1000000000) 115 d[Horrid(random.choice(candidates))] = \ 116 Horrid(random.choice(candidates)) [all …]
|
D | sortperf.py | 10 import random 26 r = random.random 47 i = random.randrange(n) 100 i1 = random.randrange(n) 101 i2 = random.randrange(n) 107 L[-10:] = [random.random() for dummy in range(10)] 112 L[random.randrange(n)] = random.random() 164 random.seed(x)
|
D | test_strtod.py | 4 import random 120 n, e = random.randrange(lower, upper, 2), k 154 bits = random.randrange(2047*2**52) 188 digits = n + random.randrange(-3*u, 3*u) 203 digits = base + random.randrange(-1000, 1000) 211 digits = random.randrange(dig10) 212 exponent = random.randrange(-400, 400) 225 s = random.choice(signs) 226 intpart_len = random.randrange(5) 227 s += ''.join(random.choice(digits) for _ in xrange(intpart_len)) [all …]
|
/external/skia/src/gpu/ops/ |
D | GrDrawAtlasOp.cpp | 197 static SkRSXform random_xform(SkRandom* random) { in random_xform() argument 205 SkRSXform xform = SkRSXform::MakeFromRadians(random->nextRangeScalar(kMinScale, kMaxScale), in random_xform() 206 random->nextRangeScalar(kMinRotate, kMaxRotate), in random_xform() 207 random->nextRangeScalar(kMinExtent, kMaxExtent), in random_xform() 208 random->nextRangeScalar(kMinExtent, kMaxExtent), in random_xform() 209 random->nextRangeScalar(kMinExtent, kMaxExtent), in random_xform() 210 random->nextRangeScalar(kMinExtent, kMaxExtent)); in random_xform() 214 static SkRect random_texRect(SkRandom* random) { in random_texRect() argument 218 SkRect texRect = SkRect::MakeLTRB(random->nextRangeScalar(kMinCoord, kMaxCoord), in random_texRect() 219 random->nextRangeScalar(kMinCoord, kMaxCoord), in random_texRect() [all …]
|
D | GrLatticeOp.cpp | 198 SkRandom* random) { in init_random_divs() argument 217 int entry = random->nextULessThan(count + 1); in init_random_divs() 242 imgW = random->nextRangeU(1, 1000); in GR_DRAW_OP_TEST_DEFINE() 243 imgH = random->nextRangeU(1, 1000); in GR_DRAW_OP_TEST_DEFINE() 244 if (random->nextBool()) { in GR_DRAW_OP_TEST_DEFINE() 245 subset.fLeft = random->nextULessThan(imgW); in GR_DRAW_OP_TEST_DEFINE() 246 subset.fRight = random->nextRangeU(subset.fLeft + 1, imgW); in GR_DRAW_OP_TEST_DEFINE() 247 subset.fTop = random->nextULessThan(imgH); in GR_DRAW_OP_TEST_DEFINE() 248 subset.fBottom = random->nextRangeU(subset.fTop + 1, imgH); in GR_DRAW_OP_TEST_DEFINE() 255 lattice.fXCount = random->nextRangeU(1, subset.width()); in GR_DRAW_OP_TEST_DEFINE() [all …]
|
/external/ltp/testcases/network/nfsv4/acl/ |
D | random_gen.py | 2 import random 31 group = self.gList[random.randint(0,len(self.gList)-1)][0] 153 l=random.randint(0,maxlength) 155 a = random.randint(0,a_length-1) 163 a = random.randint(0,a_length-1) 177 type = ace_type[random.randint(0,len(ace_type))] 178 flag = ace_flags[random.randint(0,len(ace_flags))] 179 mask = ace_mask[random.randint(0,len(ace_mask))] 180 who = ace_who[random.randint(0,len(ace_who))] 189 n = random.randint(0,userListSize-1) [all …]
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dsa/ |
D | AlgorithmParameterGeneratorSpi.java | 20 protected SecureRandom random; field in AlgorithmParameterGeneratorSpi 30 SecureRandom random) in engineInit() argument 48 this.random = random; in engineInit() 53 SecureRandom random) in engineInit() argument 72 if (random == null) in engineGenerateParameters() 74 random = new SecureRandom(); in engineGenerateParameters() 81 params = new DSAParameterGenerationParameters(1024, 160, certainty, random); in engineGenerateParameters() 86 params = new DSAParameterGenerationParameters(strength, 256, certainty, random); in engineGenerateParameters() 91 pGen.init(strength, certainty, random); in engineGenerateParameters()
|
/external/python/cpython2/Doc/library/ |
D | random.rst | 1 :mod:`random` --- Generate pseudo-random numbers 4 .. module:: random 5 :synopsis: Generate pseudo-random numbers with various common distributions. 7 **Source code:** :source:`Lib/random.py` 11 This module implements pseudo-random number generators for various 15 of a random element, a function to generate a random permutation of a list 16 in-place, and a function for random sampling without replacement. 22 Almost all module functions depend on the basic function :func:`.random`, which 23 generates a random float uniformly in the semi-open range [0.0, 1.0). Python 27 tested random number generators in existence. However, being completely [all …]
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/ |
D | AlgorithmParameterGeneratorSpi.java | 19 protected SecureRandom random; field in AlgorithmParameterGeneratorSpi 26 SecureRandom random) in engineInit() argument 29 this.random = random; in engineInit() 34 SecureRandom random) in engineInit() argument 45 this.random = random; in engineInit() 54 if (random != null) in engineGenerateParameters() 56 pGen.init(strength, certainty, random); in engineGenerateParameters()
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/params/ |
D | DSAParameterGenerationParameters.java | 14 private final SecureRandom random; field in DSAParameterGenerationParameters 28 SecureRandom random) in DSAParameterGenerationParameters() argument 30 this(L, N, certainty, random, -1); in DSAParameterGenerationParameters() 46 SecureRandom random, in DSAParameterGenerationParameters() argument 53 this.random = random; in DSAParameterGenerationParameters() 73 return random; in getRandom()
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/paddings/ |
D | ISO10126d2Padding.java | 13 SecureRandom random; field in ISO10126d2Padding 20 public void init(SecureRandom random) in init() argument 23 if (random != null) in init() 25 this.random = random; in init() 29 this.random = new SecureRandom(); in init() 55 in[inOff] = (byte)random.nextInt(); in addPadding()
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/ |
D | BaseKeyGenerator.java | 37 SecureRandom random) in engineInit() argument 44 SecureRandom random) in engineInit() argument 46 if (random != null) in engineInit() 48 engine.init(new KeyGenerationParameters(random, defaultKeySize)); in engineInit() 55 SecureRandom random) in engineInit() argument 59 if (random == null) in engineInit() 61 random = new SecureRandom(); in engineInit() 63 engine.init(new KeyGenerationParameters(random, keySize)); in engineInit()
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/ |
D | KeyPairGeneratorSpi.java | 50 SecureRandom random = new SecureRandom(); field in KeyPairGeneratorSpi.EC 87 SecureRandom random) in initialize() argument 91 if (random != null) { in initialize() 93 this.random = random; in initialize() 106 initialize(ecParams, random); in initialize() 116 SecureRandom random) in initialize() argument 120 if (random == null) { in initialize() 121 random = this.random; in initialize() 133 this.param = createKeyGenParamsBC(implicitCA, random); in initialize() 138 this.param = createKeyGenParamsBC((ECParameterSpec)params, random); in initialize() [all …]
|