Interface ISampleableDistribution<TObservations>
Common interface for sampleable distributions (i.e. distributions that
allow the generation of new samples through the Mars.Common.Core.Random.IRandomNumberGenerator<T>.Generate()
method.
Inherited Members
Mars.Common.Core.Random.IRandomNumberGenerator<TObservations>.Generate(System.Int32)
Mars.Common.Core.Random.IRandomNumberGenerator<TObservations>.Generate(System.Int32, TObservations[])
Mars.Common.Core.Random.IRandomNumberGenerator<TObservations>.Generate()
Assembly: Mars.Numerics.dll
Syntax
public interface ISampleableDistribution<TObservations> : IRandomNumberGenerator<TObservations>
Type Parameters
Name |
Description |
TObservations |
The type of the observations, such as System.Double. |
Methods
|
Improve this Doc
View Source
Generate(TObservations, FastRandom)
Generates a random observation from the current distribution.
Declaration
TObservations Generate(TObservations result, FastRandom source)
Parameters
Type |
Name |
Description |
TObservations |
result |
The location where to store the sample. |
Mars.Common.Core.Random.FastRandom |
source |
The random number generator to use as a source of randomness.
Default is to use System.Random.
|
Returns
Type |
Description |
TObservations |
A random observation drawn from this distribution. |
|
Improve this Doc
View Source
Generate(TObservations)
Generates a random observation from the current distribution.
Declaration
TObservations Generate(TObservations result)
Parameters
Type |
Name |
Description |
TObservations |
result |
The location where to store the sample. |
Returns
Type |
Description |
TObservations |
A random observation drawn from this distribution. |
|
Improve this Doc
View Source
Generate(FastRandom)
Generates a random observation from the current distribution.
Declaration
TObservations Generate(FastRandom source)
Parameters
Type |
Name |
Description |
Mars.Common.Core.Random.FastRandom |
source |
|
Returns
Type |
Description |
TObservations |
A random observations drawn from this distribution. |
|
Improve this Doc
View Source
Generate(Int32, TObservations[], FastRandom)
Generates a random vector of observations from the current distribution.
Declaration
TObservations[] Generate(int samples, TObservations[] result, FastRandom source)
Parameters
Type |
Name |
Description |
System.Int32 |
samples |
The number of samples to generate. |
TObservations[] |
result |
The location where to store the samples. |
Mars.Common.Core.Random.FastRandom |
source |
The random number generator to use as a source of randomness.
Default is to use System.Random.
|
Returns
Type |
Description |
TObservations[] |
A random vector of observations drawn from this distribution. |
|
Improve this Doc
View Source
Generate(Int32, FastRandom)
Generates a random vector of observations from the current distribution.
Declaration
TObservations[] Generate(int samples, FastRandom source)
Parameters
Type |
Name |
Description |
System.Int32 |
samples |
The number of samples to generate. |
Mars.Common.Core.Random.FastRandom |
source |
The random number generator to use as a source of randomness.
Default is to use System.Random.
|
Returns
Type |
Description |
TObservations[] |
A random vector of observations drawn from this distribution. |
Extension Methods