Fills the columns of a given matrix with independent random streams following the given probablility distributions.

Namespace:  CenterSpace.NMath.Core
Assembly:  NMath (in NMath.dll) Version: 5.1.0.0

Syntax

C#
public void Fill(
	IRandomNumberDistribution<float>[] distributions,
	FloatMatrix R
)
Visual Basic (Declaration)
Public Sub Fill ( _
	distributions As IRandomNumberDistribution(Of Single)(), _
	R As FloatMatrix _
)
Visual C++
public:
void Fill(
	array<IRandomNumberDistribution<float>^>^ distributions, 
	FloatMatrix^ R
)

Parameters

distributions
Type: array< CenterSpace.NMath.Core..::.IRandomNumberDistribution<(Of <(Single>)>) >[]()[]
Array of probablility distributions. On exit column i of the input matrix R will contain a random stream following distribution distributions[i]. Array distributions must have length greater than NumberOfStreams.
R
Type: CenterSpace.NMath.Core..::.FloatMatrix
StreamLength x NumberOfStreams matrix to be filled. On exit column i of R will contain a random stream following distribution distributions[i].

Remarks

The input matrix R must have its data in contiguous storage. This means that the matrix R can not be obtained by slicing another matrix. This means that the property R.IsCompactStride must be true or, equivalently, R.RowStride == 1 amp;amp; R.ColStride == R.Rows.

Exceptions

ExceptionCondition
CenterSpace.NMath.Core..::.InvalidArgumentExceptionThrown if the number of rows in R is not equal to StreamLength, or if the number of columns in R is not equal to NumberOfStreams, or if the length of distributions is less than NumberOfStreams.

See Also