C# Class MpcLib.Common.StochasticUtils.StaticRandom

Only for simulation use. Do not use for real runs.
Afficher le fichier Open project: mahdiz/mpclib

Méthodes publiques

Méthode 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 méthode

public static Init ( int seed ) : void
seed int
Résultat void

Next() public static méthode

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
Résultat System.Numerics.BigInteger

Next() public static méthode

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. ///
Résultat int

Next() public static méthode

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.
Résultat long

NextDouble() public static méthode

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