Back to Aurora Vision Library website

You are here: Start » Function Reference » Data Flow » Loop Generators » EnumerateCombinations

EnumerateCombinations


Header: STD.h
Namespace: avl
Module: FoundationLite

In each consecutive iteration produces a consecutive combination of integer numbers.

Syntax

bool avl::EnumerateCombinations
(
	EnumerateCombinationsState& ioState,
	int inCombinationSize,
	int inSetSize,
	bool inRepeat,
	atl::Array<int>& outCombination,
	int& outIndex
)

Parameters

Name Type Range Default Description
Input will be modified
ioState EnumerateCombinationsState& Object used to maintain state of the function.
Input value
inCombinationSize int 0 - 2
Input value
inSetSize int 0 - 3
Input value
inRepeat bool Determines whether to repeat loop
Output value
outCombination Array<int>&
Output value
outIndex int&

Errors

List of possible exceptions:

Error type Description
DomainError Combination size cannot be greater than the set size in EnumerateCombinations.