C# Class QuickCheck.Random.Random

Datei anzeigen Open project: jystic/quickcheck-net

Public Methods

Method Description
Bool ( this random ) : bool

Generate a uniformly distributed bool in the range [false, true].

Byte ( this random ) : Byte

Generate a uniformly distributed byte in the range [0, 2^8).

Double ( this random ) : double

Generate a uniformly distributed double in the range (0, 1]. Zero is explicitly excluded, to allow generated values to be used in statistical calculations that require non-zero values (e.g. uses of the 'log' function).

Subtract Math.Pow(2, -53) to generate a double in a range of [0,1).

Float ( this random ) : float

Generate a uniformly distributed float in the range (0, 1]. Zero is explicitly excluded, to allow generated values to be used in statistical calculations that require non-zero values (e.g. uses of the 'log' function).

Subtract Math.Pow(2, -33) to generate a float in a range of [0,1).

Int16 ( this random ) : Int16

Generate a uniformly distributed short in the range [-2^8, 2^8).

Int32 ( this random ) : Int32

Generate a uniformly distributed int in the range [-2^16, 2^16).

Int64 ( this random ) : System.Int64

Generate a uniformly distributed long in the range [-2^32, 2^32).

SByte ( this random ) : SByte

Generate a uniformly distributed sbyte in the range [-2^4, 2^4).

UInt16 ( this random ) : UInt16

Generate a uniformly distributed uint in the range [0, 2^16).

UInt64 ( this random ) : System.UInt64

Generate a uniformly distributed ulong in the range [0, 2^64).

Private Methods

Method Description
ToDouble ( uint v, uint u ) : double
ToFloat ( uint i ) : float

Method Details

Bool() public static method

Generate a uniformly distributed bool in the range [false, true].
public static Bool ( this random ) : bool
random this
return bool

Byte() public static method

Generate a uniformly distributed byte in the range [0, 2^8).
public static Byte ( this random ) : Byte
random this
return Byte

Double() public static method

Generate a uniformly distributed double in the range (0, 1]. Zero is explicitly excluded, to allow generated values to be used in statistical calculations that require non-zero values (e.g. uses of the 'log' function).

Subtract Math.Pow(2, -53) to generate a double in a range of [0,1).
public static Double ( this random ) : double
random this
return double

Float() public static method

Generate a uniformly distributed float in the range (0, 1]. Zero is explicitly excluded, to allow generated values to be used in statistical calculations that require non-zero values (e.g. uses of the 'log' function).

Subtract Math.Pow(2, -33) to generate a float in a range of [0,1).
public static Float ( this random ) : float
random this
return float

Int16() public static method

Generate a uniformly distributed short in the range [-2^8, 2^8).
public static Int16 ( this random ) : Int16
random this
return System.Int16

Int32() public static method

Generate a uniformly distributed int in the range [-2^16, 2^16).
public static Int32 ( this random ) : Int32
random this
return System.Int32

Int64() public static method

Generate a uniformly distributed long in the range [-2^32, 2^32).
public static Int64 ( this random ) : System.Int64
random this
return System.Int64

SByte() public static method

Generate a uniformly distributed sbyte in the range [-2^4, 2^4).
public static SByte ( this random ) : SByte
random this
return SByte

UInt16() public static method

Generate a uniformly distributed uint in the range [0, 2^16).
public static UInt16 ( this random ) : UInt16
random this
return System.UInt16

UInt64() public static method

Generate a uniformly distributed ulong in the range [0, 2^64).
public static UInt64 ( this random ) : System.UInt64
random this
return System.UInt64