Back to Adaptive Vision Library website
You are here: Start » Function Reference » Array Composition » AvsFilter_InsertToArray
This is Filter Equivalent. This function may be present in generated code, but should not be used in hand-written code.
Inserts a new element to an array at a specified location.
Syntax
void avs::AvsFilter_InsertToArray ( atl::Array<Type>& ioArray, const Type& inValue, int inIndex, bool inInverse )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
ioArray | Array<Type>& | ||||
inValue | const Type& | Input value to be inserted | |||
inIndex | int | 0 - | Input index within the inArray at which the inValue will be placed | ||
inInverse | bool | False | Reversed order in the array |
Examples
inArray = {1,2,3,4,5} inIndex = 1 inValue = 10 |
outArray = {1,10,2,3,4,5} |
inArray = {1,2,3,4,5} inIndex = 5 inValue = 10 |
outArray = {1,2,3,4,5,10} |
Errors
Error type | Description |
---|---|
DomainError | Index out of range in InsertToArray. |