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.

def discrete[A](elts: (A, Double)*): Random[A]
def double: Random[Double]

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.

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.

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.

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.

def normal: Random[Double]
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.