MultivariateContinuousDistribution.FillSamples Method

Definition

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

Overload List

FillSamples(IRandomSource, Matrix<Double>) Fills the rows of a matrix with random samples from the distribution.
FillSamples(Random, Matrix<Double>) Fills the rows of a matrix with random samples from the distribution.
FillSamples<TGenerator>(TGenerator, Matrix<Double>) Fills the rows of a matrix with random samples from the distribution.
FillSamples<TGenerator>(IRandomSource<TGenerator>, Matrix<Double>) Fills the rows of a matrix with random samples from the distribution.

FillSamples<TGenerator>(TGenerator, Matrix<Double>)

Fills the rows of a matrix with random samples from the distribution.
C#
protected virtual void FillSamples<TGenerator>(
	ref TGenerator generator,
	Matrix<double> samples
)
where TGenerator : struct, new(), IRandomGenerator

Parameters

generator  TGenerator
The random number generator used to generate the samples.
samples  Matrix<Double>
A matrix.

Type Parameters

TGenerator
The underlying generator type of the random source, used to enable optimizations like inlining.

Remarks

This method fills the rows of the matrix specified by samples, with random samples from the distribution.

Exceptions

ArgumentNullException

samples is null.

DimensionMismatchException

The number of columns of samples does not equal the Order of the distribution.

FillSamples(IRandomSource, Matrix<Double>)

Fills the rows of a matrix with random samples from the distribution.
C#
public void FillSamples(
	IRandomSource random,
	Matrix<double> samples
)

Parameters

random  IRandomSource
The random number generator to use.
samples  Matrix<Double>
A matrix with one column per distribution dimension.

Remarks

This method fills the rows of the matrix specified by samples, with random samples from the distribution.

A nonempty destination must be writable. Writability is checked before drawing samples, and protected copy-on-write snapshots are preserved. A matrix with zero rows consumes no randomness and may be read-only.

Exceptions

ArgumentNullException

samples is null.

-or-

random is null.

DimensionMismatchException

The number of columns of samples does not equal the Order of the distribution.

ComponentReadOnlyException

samples is nonempty and read-only.

FillSamples<TGenerator>(IRandomSource<TGenerator>, Matrix<Double>)

Fills the rows of a matrix with random samples from the distribution.
C#
public void FillSamples<TGenerator>(
	IRandomSource<TGenerator> random,
	Matrix<double> samples
)
where TGenerator : struct, new(), IRandomGenerator

Parameters

random  IRandomSource<TGenerator>
The random number generator to use.
samples  Matrix<Double>
A matrix with one column per distribution dimension.

Type Parameters

TGenerator
The underlying generator type of the random source, used to enable optimizations like inlining.

Remarks

This method fills the rows of the matrix specified by samples, with random samples from the distribution.

A nonempty destination must be writable. Writability is checked before drawing samples, and protected copy-on-write snapshots are preserved. A matrix with zero rows consumes no randomness and may be read-only.

Exceptions

ArgumentNullException

samples is null.

-or-

random is null.

DimensionMismatchException

The number of columns of samples does not equal the Order of the distribution.

ComponentReadOnlyException

samples is nonempty and read-only.

FillSamples(Random, Matrix<Double>)

Fills the rows of a matrix with random samples from the distribution.
C#
public void FillSamples(
	Random random,
	Matrix<double> samples
)

Parameters

random  Random
The random number generator to use.
samples  Matrix<Double>
A matrix with one column per distribution dimension.

Remarks

This method fills the rows of the matrix specified by samples, with random samples from the distribution.

A nonempty destination must be writable. Writability is checked before drawing samples, and protected copy-on-write snapshots are preserved. A matrix with zero rows consumes no randomness and may be read-only.

Exceptions

ArgumentNullException

samples is null.

-or-

random is null.

DimensionMismatchException

The number of columns of samples does not equal the Order of the distribution.

ComponentReadOnlyException

samples is nonempty and read-only.

See Also