Back to Adaptive Vision Library website

You are here: Start » Function Reference » Array Composition » RemoveRangeFromArray

RemoveRangeFromArray


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

Removes the elements of indices in the given range from an array.

Syntax

void avl::RemoveRangeFromArray
(
	atl::Array<Type>& ioArray,
	int inStart,
	atl::Optional<int> inLength
)

Parameters

Name Type Range Default Description
ioArray Array<Type>&
inStart int 0 - Index of the first element to be removed
inLength Optional<int> 0 - NIL Number of elements to be removed

Description

The operation removes a range of elements from inArray. Removed are the elements at indices from inStart to inStart + inLength - 1.

Examples

inArray = {6,7,3,4,10}
inStart = 1
inLength = 2
outArray = {6,4,10}

Errors

Error type Description
DomainError Negative inLength in RemoveRangeFromArray.
DomainError Negative inStart in RemoveRangeFromArray.
DomainError Index out of range in RemoveRangeFromArray.

See Also