C# Class Microsoft.Automata.Chooser

Random number chooser.
Mostrar archivo Open project: AutomataDotNet/Automata Class Usage Examples

Public Methods

Method Description
Choose ( int n ) : int

Initializes a new instance of the Chooser class.

Gets or sets the random seed of the chooser. The value of this property is ignored. The property is needed for backward compatibility.

Returns a nonnegative random number less than the specified maximum.

ChooseBV32 ( ) : uint

Choose a random uint.

ChooseBV64 ( ) : ulong

Choose a random ulong.

ChooseDouble ( ) : double

Returns a random number between 0.0 and 1.0.

ChooseTrueOrFalse ( ) : bool

Choose true or false randomly.

Chooser ( ) : System

Initializes a new instance of the Chooser class.

Private Methods

Method Description
GetMostSignificantBit ( uint n ) : uint

Calculates the value of the most significant bit in a positive integer.

Method Details

Choose() public method

Initializes a new instance of the Chooser class. Gets or sets the random seed of the chooser. The value of this property is ignored. The property is needed for backward compatibility. Returns a nonnegative random number less than the specified maximum.
public Choose ( int n ) : int
n int The exclusive upper bound of the random number to be generated. n must be /// greater than or equal to zero.
return int

ChooseBV32() public method

Choose a random uint.
public ChooseBV32 ( ) : uint
return uint

ChooseBV64() public method

Choose a random ulong.
public ChooseBV64 ( ) : ulong
return ulong

ChooseDouble() public method

Returns a random number between 0.0 and 1.0.
public ChooseDouble ( ) : double
return double

ChooseTrueOrFalse() public method

Choose true or false randomly.
public ChooseTrueOrFalse ( ) : bool
return bool

Chooser() public method

Initializes a new instance of the Chooser class.
public Chooser ( ) : System
return System