Random

object Random
class Object
trait Matchable
class Any
Random.type

Value members

Concrete methods

def always[A](in: A): Random[A]

Create a Random that always generates the given value.

Create a Random that always generates the given value.

Source:
random.scala
def discrete[A](elts: (A, Double)*): Random[A]

Create a Random that generates a Double uniformly distributed between 0.0 and 1.0.

Create a Random that generates a Double uniformly distributed between 0.0 and 1.0.

Source:
random.scala
def int: Random[Int]

Create a Random that generates an Int uniformly distributed across the entire range.

Create a Random that generates an Int uniformly distributed across the entire range.

Source:
random.scala
def int(lower: Int, upper: Int): Random[Int]

Create a Random that generates an Int uniformly distributed in the range greater than or equal to lower and less than upper.

Create a Random that generates an Int uniformly distributed in the range greater than or equal to lower and less than upper.

Source:
random.scala
def natural(upperLimit: Int): Random[Int]

Create a Random that generates an Int uniformly distributed in the range greater than or equal to zero and less than upper.

Create a Random that generates an Int uniformly distributed in the range greater than or equal to zero and less than upper.

Source:
random.scala
def normal(mean: Double, stdDev: Double): Random[Double]
def oneOf[A](elts: A*): Random[A]

Create a Random that generates one of the provided values with uniform distribution.

Create a Random that generates one of the provided values with uniform distribution.

Source:
random.scala