Interface IRandomNumberGenerator<T>
Interface for random number generators.
Namespace: ISynergy.Framework.Mathematics.Random
Assembly: ISynergy.Framework.Mathematics.dll
Syntax
public interface IRandomNumberGenerator<T>
Type Parameters
Name | Description |
---|---|
T |
Remarks
The interface defines set of methods and properties, which should be implemented by different algorithms for random numbers generation.
Methods
View SourceGenerate()
Generates a random observation from the current distribution.
Declaration
T Generate()
Returns
Type | Description |
---|---|
T | A random observations drawn from this distribution. |
Generate(Int32)
Generates a random vector of observations from the current distribution.
Declaration
T[] Generate(int samples)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | samples | The number of samples to generate. |
Returns
Type | Description |
---|---|
T[] | A random vector of observations drawn from this distribution. |
Generate(Int32, T[])
Generates a random vector of observations from the current distribution.
Declaration
T[] Generate(int samples, T[] result)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | samples | The number of samples to generate. |
T[] | result | The location where to store the samples. |
Returns
Type | Description |
---|---|
T[] | A random vector of observations drawn from this distribution. |