Back to Adaptive Vision Library website

You are here: Start » Function Reference » Array Basics » AvsFilter_GetRandomElements

AvsFilter_GetRandomElements


This is Filter Equivalent. This function may be present in generated code, but should not be used in hand-written code.

Header:STD.h
Namespace:avs

Get random array elements with repeating values or not.

Syntax

void avs::AvsFilter_GetRandomElements
(
	const atl::Array<Type>& inArray,
	const int inCount,
	const bool inUniqueIndex,
	atl::Optional<int> inSeed,
	atl::Array<Type>& outArray
)

Parameters

Name Type Range Default Description
inArray const Array<Type>& Input array
inCount const int 0 - Number or selected records
inUniqueIndex const bool False Flag implying select unique indices
inSeed Optional<int> NIL Random seed used to generate values
outArray Array<Type>& Output array

Errors

List of possible exceptions:

Error type Description
DomainError Negative inCount in GetRandomElements.
DomainError Not enough items in the input array in GetRandomElements.