Method | Description | |
---|---|---|
Bernoulli ( ) : bool |
Returns either true or false at a 50% chance each.
|
|
Bernoulli ( double p ) : bool |
Returns either true or false, depending on the given probability.
|
|
Binomial ( int trials ) : int |
Conceptually, generates either 1 or 0 the given number of times, where either number is equally likely, and counts the number of 1's generated.
|
|
Binomial ( int trials, double p ) : int |
Conceptually, generates either 1 or 0 the given number of times, where a 1 is generated at the given probability, and counts the number of 1's generated.
|
|
ChiSquared ( int df ) : double |
Generates a random number that is the sum of the squares of "df" normally-distributed random numbers with a mean of 0 and a standard deviation of 1.
|
|
Exponential ( ) : double |
Not documented yet.
|
|
Gamma ( double a ) : double |
Not documented yet.
|
|
Gamma ( double a, double b ) : double |
Not documented yet.
|
|
Geometric ( ) : int |
Conceptually, generates either 1 or 0 until a 1 is generated, and counts the number of 0's generated. Either number has an equal probability of being generated.
|
|
Geometric ( double p ) : int |
Conceptually, generates either 1 or 0 until a 1 is generated, and counts the number of 0's generated. A 1 is generated at the given probability.
|
|
Hypergeometric ( int trials, int ones, int count ) : int |
Conceptually, given a set of tokens, some of which are labeled 1 and the others labeled 0, draws "trials" tokens at random without replacement and then counts the number of 1's drawn.
|
|
LogNormal ( double mean, double sd ) : double |
Generates a logarithmic normally-distributed number with the given mean and standard deviation.
|
|
NegativeBinomial ( int trials ) : int |
Conceptually, generates either 1 or 0 the given number of times until the given number of 1's are generated, and counts the number of 0's generated. Either number has an equal probability of being generated.
|
|
NegativeBinomial ( int trials, double p ) : int |
Conceptually, generates either 1 or 0 until the given number of 1's are generated, and counts the number of 0's generated. A 1 is generated at the given probability.
|
|
Normal ( ) : double |
Generates a normally-distributed number with mean 0 and standard deviation 1.
|
|
Normal ( double mean, double sd ) : double |
Generates a normally-distributed number with the given mean and standard deviation.
|
|
Poisson ( double mean ) : int |
Generates a random integer such that the average of random numbers approaches the given mean number when this method is called repeatedly with the same mean.
|
|
RandomGenerator ( ) : System |
Initializes a new instance of the RandomGenerator class.
|
|
RandomGenerator ( IRandomGen valueIrg ) : System |
Initializes a new instance of the RandomGenerator class.
|
|
Uniform ( ) : double |
Returns a uniformly-distributed 64-bit floating-point number from 0 and up, but less than 1.
|
|
Uniform ( double max ) : double |
Returns a uniformly-distributed 64-bit floating-point number from 0 and up, but less than the given number.
|
|
Uniform ( double min, double max ) : double |
Not documented yet.
|
|
UniformInt ( int maxExclusive ) : int |
Generates a random 32-bit signed integer 0 or greater and less than the given number.
|
|
UniformInt ( int minInclusive, int maxExclusive ) : int |
Generates a random 32-bit signed integer within a given range.
|
|
UniformLong ( long maxExclusive ) : long |
Generates a random 32-bit signed integer 0 or greater and less than the given number.
|
|
UniformLong ( long minInclusive, long maxExclusive ) : long |
Generates a random 64-bit signed integer within a given range.
|
|
UniformSingle ( ) : double |
Returns a uniformly-distributed 32-bit floating-point number from 0 and up, but less than 1.
|
Method | Description | |
---|---|---|
NonZeroUniform ( ) : double |
public Bernoulli ( double p ) : bool | ||
p | double | A probability from 0 through 1. 0 means always /// false, and 1 means always true. |
return | bool |
public Binomial ( int trials ) : int | ||
trials | int | The number of times to generate a random /// number, conceptually. |
return | int |
public Binomial ( int trials, double p ) : int | ||
trials | int | The number of times to generate a random /// number, conceptually. |
p | double | The probability for each trial to succeed, from 0 /// (never) to 1 (always). |
return | int |
public ChiSquared ( int df ) : double | ||
df | int | Degrees of freedom (the number of independently /// chosen normally-distributed numbers). |
return | double |
public Gamma ( double a ) : double | ||
a | double | Another 64-bit floating-point number. |
return | double |
public Gamma ( double a, double b ) : double | ||
a | double | Another 64-bit floating-point number. |
b | double | A 64-bit floating-point number. (3). |
return | double |
public Geometric ( double p ) : int | ||
p | double | A 64-bit floating-point number. |
return | int |
public Hypergeometric ( int trials, int ones, int count ) : int | ||
trials | int | The number of tokens drawn at random without /// replacement. |
ones | int | The number of tokens labeled 1. |
count | int | The number of tokens labeled 1 or 0. |
return | int |
public LogNormal ( double mean, double sd ) : double | ||
mean | double | The desired mean. |
sd | double | Standard deviation. |
return | double |
public NegativeBinomial ( int trials ) : int | ||
trials | int | The number of 1's to generate before the /// process stops. |
return | int |
public NegativeBinomial ( int trials, double p ) : int | ||
trials | int | The number of 1's to generate before the /// process stops. |
p | double | The probability for each trial to succeed, from 0 /// (never) to 1 (always). |
return | int |
public Normal ( double mean, double sd ) : double | ||
mean | double | The desired mean. |
sd | double | Standard deviation. |
return | double |
public Poisson ( double mean ) : int | ||
mean | double | The expected mean of the random numbers. |
return | int |
public RandomGenerator ( IRandomGen valueIrg ) : System | ||
valueIrg | IRandomGen | An IRandomGen object. |
return | System |
public Uniform ( double max ) : double | ||
max | double | Number that the randomly-generated number will be /// less than. |
return | double |
public Uniform ( double min, double max ) : double | ||
min | double | Smallest possible number that will be /// generated. |
max | double | Number that the randomly-generated number will be /// less than. |
return | double |
public UniformInt ( int maxExclusive ) : int | ||
maxExclusive | int | One plus the largest possible value of /// the random number. |
return | int |
public UniformInt ( int minInclusive, int maxExclusive ) : int | ||
minInclusive | int | Smallest possible value of the random /// number. |
maxExclusive | int | One plus the largest possible value of /// the random number. |
return | int |
public UniformLong ( long maxExclusive ) : long | ||
maxExclusive | long | One plus the largest possible value of /// the random number. |
return | long |
public UniformLong ( long minInclusive, long maxExclusive ) : long | ||
minInclusive | long | Smallest possible value of the random /// number. |
maxExclusive | long | One plus the largest possible value of /// the random number. |
return | long |