C# Class MpcLib.Common.StochasticUtils.StaticRandom

Only for simulation use. Do not use for real runs.
ファイルを表示 Open project: mahdiz/mpclib

Public Methods

Method Description
Init ( int seed ) : void
Next ( System.Numerics.BigInteger maxValue ) : System.Numerics.BigInteger

Returns a BigInteger random number between 0 (inclusive) and maxValue (exclusive). maxValue must be larger than int.MaxValue.

Next ( int minValue, int maxValue ) : int

Returns a random number within a specified range.

Next ( long min, long max ) : long

Returns a random number within a specified range.

NextDouble ( ) : double

Returns a random number between 0.0 and 1.0.

Method Details

Init() public static method

public static Init ( int seed ) : void
seed int
return void

Next() public static method

Returns a BigInteger random number between 0 (inclusive) and maxValue (exclusive). maxValue must be larger than int.MaxValue.
public static Next ( System.Numerics.BigInteger maxValue ) : System.Numerics.BigInteger
maxValue System.Numerics.BigInteger
return System.Numerics.BigInteger

Next() public static method

Returns a random number within a specified range.
public static Next ( int minValue, int maxValue ) : int
minValue int The inclusive lower bound of the random number returned.
maxValue int /// The exclusive upper bound of the random number returned. maxValue must be /// greater than or equal to minValue. ///
return int

Next() public static method

Returns a random number within a specified range.
public static Next ( long min, long max ) : long
min long The inclusive lower bound.
max long The exclusive upper bound.
return long

NextDouble() public static method

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