|
MathSample
Generates a random sample from the array elements.
Version for working with an array of real values:
bool MathSample(
|
Version for working with an array of integer values:
bool MathSample(
|
Version for working with an array of real values. It is possible to obtain a sample with replacement:
bool MathSample(
|
Version for working with an array of integer values. It is possible to obtain a sample with replacement:
bool MathSample(
|
Version for working with an array of real values, for which the probabilities of sampling are defined.
bool MathSample(
|
Version for working with an array of integer values, for which the probabilities of sampling are defined.
bool MathSample(
|
Version for working with an array of real values, for which the probabilities of sampling are defined. It is possible to obtain a sample with replacement:
bool MathSample(
|
Version for working with an array of integer values, for which the probabilities of sampling are defined. It is possible to obtain a sample with replacement:
bool MathSample(
|
Parameters
array[]
[in] Array of integer values.
probabilities[]
[in] Array of probabilities for sampling the elements.
count
[in] The number of elements.
replace
[in] Parameter that allows sampling with replacement.
result[]
[out] Array to output the results.
Return Value
Returns true if successful, otherwise false.
Note
The replace=true argument allows performing random sampling of the elements with replacement back to the original sequence.