Distributions

Random number distribution generators are used to generate random numbers with different types of the discrete and continuous distributions. The numbers are generated by transforming uniformly distributed variates in accordance with the required cumulative distribution function (CDF).

In oneDAL, distribution represents an algorithm interface that runs in-place initialization of memory according to the required CDF.

Algorithm Input

Distribution algorithms accept the input described below. Pass the Input ID as a parameter to the methods that provide input for your algorithm. For more details, see Algorithms.

Algorithm Input for Distributions

Input ID

Input

tableToFill

Pointer to the numeric table of size \(n \times p\).

Note

This input can be an object of any class derived from NumericTable except CSRNumericTable, PackedSymmetricMatrix, PackedTriangularMatrix, and MergedNumericTable when it holds one of the above table types.

Algorithm Parameters

Distribution algorithms have the following common parameter:

Algorithm Parameters for Distributions

Parameter

Default Value

Description

engine

SharePtr< engines:: mt19937:: Batch>()

Pointer to the random number engine.

Algorithm Output

Distribution algorithms calculate the result described below. Pass the Result ID as a parameter to the methods that access the results of your algorithm. For more details, see Algorithms.

Algorithm Output for Distributions

Result ID

Result

randomNumbers

Pointer to the \(n \times p\) numeric table with algorithm results.

In oneDAL, distribution algorithms are in-place, which means that the algorithm does not allocate memory for the distribution result, but returns pointer to the filled input.