MultivariateContinuousDistribution.Sample Method

Definition

Namespace: Numerics.NET.Statistics.Distributions
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0

Overload List

Sample(Random) Returns a random sample from the distribution.
Sample(Random, Int32) Returns a matrix with random samples from the distribution.

Sample(Random)

Returns a random sample from the distribution.
C#
public DenseVector<double> Sample(
	Random random
)

Parameters

random  Random
A Random object that specifies the uniform random number generator that is to be used to generate the samples.

Return Value

DenseVector<Double>

Remarks

This method returns a vector that contains a single sample from the distribution.

Exceptions

ArgumentNullException

random is null.

Sample(Random, Int32)

Returns a matrix with random samples from the distribution.
C#
public virtual DenseMatrix<double> Sample(
	Random random,
	int count
)

Parameters

random  Random
A Random object that specifies the uniform random number generator that is to be used to generate the samples.
count  Int32
The number of samples to return.

Return Value

DenseMatrix<Double>

Remarks

Each row of the matrix contains a random sample from the distribution.

Exceptions

ArgumentOutOfRangeException

count is less than zero.

See Also