Continuous Distribution.Sample Into Method
Definition
Namespace: Numerics.NET.Statistics.Distributions
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Overload List
Sample | Fills a list with random numbers from the distribution. |
Sample | Fills a list with random numbers from the distribution. |
Sample | Fills a span with random numbers from the distribution. |
Sample | Fills part of a list with random numbers from the distribution. |
SampleInto(Random, IList<Double>)
Fills a list with random numbers from the distribution.
public void SampleInto(
Random random,
IList<double> samples
)
Parameters
- random Random
- A Random object that specifies the uniform random number generator that is to be used to generate the samples.
- samples IList<Double>
- An IList<Double>.
Remarks
This method fills the vector specified by samples, with random samples from the distribution.
Exceptions
Argument | samples is null. -or- random is null. |
SampleInto(Random, Double[])
Fills a list with random numbers from the distribution.
public void SampleInto(
Random random,
double[] samples
)
Parameters
Remarks
This method fills samples, with random samples from the distribution.
Exceptions
Argument | samples is null. -or- random is null. |
SampleInto(Random, Span<Double>)
Fills a span with random numbers from the distribution.
public virtual void SampleInto(
Random random,
Span<double> samples
)
Parameters
Remarks
This method fills the vector specified by samples, with random samples from the distribution.
Exceptions
Argument | samples is null. -or- random is null. |
SampleInto(Random, IList<Double>, Int32, Int32)
Fills part of a list with random numbers from the distribution.
public virtual void SampleInto(
Random random,
IList<double> samples,
int startIndex,
int length
)
Parameters
Remarks
This method fills a block of length elements of samples, starting at index startIndex with random samples from the distribution.
Exceptions
Argument | samples is null. -or- random is null. |
Argument | startIndex is less than zero. -or- length is less than zero. |
Argument | length is greater than the number of elements from startIndex to the end of samples. |