Back to Adaptive Vision Library website

You are here: Start » Function Reference » Array Transforms » CropArray

CropArray


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

Selects a continuous subsequence of array elements.

Syntax

void avl::CropArray
(
	const atl::Array<Type>& inArray,
	const int inStart,
	atl::Optional<int> inLength,
	atl::Array<Type>& outCroppedArray
)

Parameters

Name Type Range Default Description
inArray const Array<Type>& Input array
inStart const int 0 -
inLength Optional<int> 0 - NIL
outCroppedArray Array<Type>& Cropped array

Examples

inArray = {2,4,3,2,5}
inStart = 1
inLength = 3
outCroppedArray = {4,3,2}

Errors

Error type Description
DomainError inStart negative in CropArray
DomainError inLength negative in CropArray

See Also