Discrete Distribution<T>.Sample Level Method
Definition
Namespace: Numerics.NET.Statistics.Distributions
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
Overload List
| Sample | Returns the level index of a random sample from the distribution. |
| Sample | |
| Sample | Returns the level index of a random sample from the distribution. |
SampleLevel(IRandomSource)
Returns the level index of a random sample from the distribution.
public int SampleLevel(
IRandomSource random
)Parameters
- random IRandomSource
- A Random object that specifies the uniform random number generator that is to be used to generate the samples.
Return Value
Int32The index of the sample in the set of items.
Remarks
This method uses the random number generator specified by random to generate a random sample from the distribution. The return values of successive calls to this method follow the statistical distribution represented by this distribution.
SampleLevel<TGenerator>(IRandomSource<TGenerator>)
Returns the level index of a random sample from the distribution.
public int SampleLevel<TGenerator>(
IRandomSource<TGenerator> random
)
where TGenerator : struct, new(), IRandomGenerator
Parameters
- random IRandomSource<TGenerator>
- A Random object that specifies the uniform random number generator that is to be used to generate the samples.
Type Parameters
- TGenerator
- The underlying generator type of the random source, used to enable optimizations like inlining.
Return Value
Int32The index of the sample in the set of items.
Remarks
This method uses the random number generator specified by random to generate a random sample from the distribution. The return values of successive calls to this method follow the statistical distribution represented by this distribution.