Home
last modified time | relevance | path

Searched refs:gammavariate (Results 1 – 8 of 8) sorted by relevance

/external/python/cpython3/Lib/
Drandom.py655 def gammavariate(self, alpha, beta): member in Random
742 y = self.gammavariate(alpha, 1.0)
744 return y / (y + self.gammavariate(beta, 1.0))
829 gammavariate = _inst.gammavariate variable
865 _test_generator(N, gammavariate, (0.01, 1.0))
866 _test_generator(N, gammavariate, (0.1, 1.0))
867 _test_generator(N, gammavariate, (0.1, 2.0))
868 _test_generator(N, gammavariate, (0.5, 1.0))
869 _test_generator(N, gammavariate, (0.9, 1.0))
870 _test_generator(N, gammavariate, (1.0, 1.0))
[all …]
/external/python/cpython2/Lib/
Drandom.py492 def gammavariate(self, alpha, beta): member in Random
627 y = self.gammavariate(alpha, 1.)
631 return y / (y + self.gammavariate(beta, 1.))
868 _test_generator(N, gammavariate, (0.01, 1.0))
869 _test_generator(N, gammavariate, (0.1, 1.0))
870 _test_generator(N, gammavariate, (0.1, 2.0))
871 _test_generator(N, gammavariate, (0.5, 1.0))
872 _test_generator(N, gammavariate, (0.9, 1.0))
873 _test_generator(N, gammavariate, (1.0, 1.0))
874 _test_generator(N, gammavariate, (2.0, 1.0))
[all …]
/external/python/cpython3/Lib/test/
Dtest_random.py924 g.random = x[:].pop; g.gammavariate(0.01, 1.0)
925 g.random = x[:].pop; g.gammavariate(1.0, 1.0)
926 g.random = x[:].pop; g.gammavariate(200.0, 1.0)
1003 self.assertRaises(ValueError, random.gammavariate, -1, 3)
1004 self.assertRaises(ValueError, random.gammavariate, 0, 2)
1005 self.assertRaises(ValueError, random.gammavariate, 2, 0)
1006 self.assertRaises(ValueError, random.gammavariate, 1, -3)
1020 returned_value = random.gammavariate(1.1, 2.3)
1031 returned_value = random.gammavariate(1.0, 3.14)
1041 gammavariate_returned_value = random.gammavariate(1.0, beta)
[all …]
/external/python/cpython2/Lib/test/
Dtest_random.py528 g.random = x[:].pop; g.gammavariate(0.01, 1.0)
529 g.random = x[:].pop; g.gammavariate(1.0, 1.0)
530 g.random = x[:].pop; g.gammavariate(200.0, 1.0)
/external/scapy/scapy/
Dvolatile.py135 return int(round(random.gammavariate(self.alpha, self.beta)))
/external/python/cpython2/Doc/library/
Drandom.rst237 .. function:: gammavariate(alpha, beta)
/external/python/cpython3/Doc/library/
Drandom.rst304 .. function:: gammavariate(alpha, beta)
/external/python/cpython3/Misc/NEWS.d/
D3.8.0a1.rst2056 random.gammavariate(1.0, beta) now computes the same result as