Discrete Distribution<T>.Sample Levels 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 | Fills a span with the level indexes of random samples from this DiscreteDistribution<T>. |
| Sample | Fills a span with the level indexes of random samples from this DiscreteDistribution<T>. |
| Sample | Fills a span with the level indexes of random samples from this DiscreteDistribution<T>. |
| Sample | Fills a span with the level indexes of random samples from this DiscreteDistribution<T>. |
SampleLevels<TGenerator>(TGenerator, Span<Int32>)
Fills a span with the level indexes of random samples from
this DiscreteDistribution<T>.
public void SampleLevels<TGenerator>(
ref TGenerator generator,
Span<int> samples
)
where TGenerator : struct, new(), IRandomGenerator
Parameters
Type Parameters
- TGenerator
- The underlying generator type of the random source, used to enable optimizations like inlining.
Remarks
This method fills a block of length elements of samples, starting at index startIndex with random samples from the distribution.
Exceptions
| Argument | random is null. |
SampleLevels(IRandomSource, Span<Int32>)
Fills a span with the level indexes of random samples from
this DiscreteDistribution<T>.
public void SampleLevels(
IRandomSource random,
Span<int> samples
)Parameters
- random IRandomSource
- A Random object that specifies the uniform random number generator that is to be used to generate the samples.
- samples Span<Int32>
- An array.
Remarks
This method fills a block of length elements of samples, starting at index startIndex with random samples from the distribution.
Exceptions
| Argument | random is null. |
SampleLevels<TGenerator>(IRandomSource<TGenerator>, Span<Int32>)
Fills a span with the level indexes of random samples from
this DiscreteDistribution<T>.
public void SampleLevels<TGenerator>(
IRandomSource<TGenerator> random,
Span<int> samples
)
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.
- samples Span<Int32>
- An array.
Type Parameters
- TGenerator
- The underlying generator type of the random source, used to enable optimizations like inlining.
Remarks
This method fills a block of length elements of samples, starting at index startIndex with random samples from the distribution.
Exceptions
| Argument | random is null. |
SampleLevels(Random, Span<Int32>)
Fills a span with the level indexes of random samples from
this DiscreteDistribution<T>.
public void SampleLevels(
Random random,
Span<int> samples
)Parameters
Remarks
This method fills a block of length elements of samples, starting at index startIndex with random samples from the distribution.
Exceptions
| Argument | random is null. |