Back to FabImage Library website
You are here: Start » Function Reference » All Functions » Array Transforms » SlideArray
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: | fil |
Module: | FoundationLite |
Creates two copies of the input array - one with elements removed at the beginning, the other with elements removed at the end.
Applications: This filter is useful for computing something on all the pairs of two consecutive elements of an array, e.g. creating a list of segments from an ordered list of points.
Syntax
void fil::SlideArray ( const ftl::Array<Type>& inArray, int inShift, ftl::Array<Type>& outArray1, ftl::Array<Type>& outArray2 )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inArray | const Array<Type>& | Input array | |
![]() |
inShift | int | Number of elements to be removed | |
![]() |
outArray1 | Array<Type>& | Input array with inShift last elements removed | |
![]() |
outArray2 | Array<Type>& | Input array with inShift first elements removed |
Examples
![]() |
![]() |
inArray = {1,2,3,4,5,6,7} inShift = 2 |
outArray1 = {1,2,3,4,5} outArray1 = {3,4,5,6,7} |
See Also
- RotateArray – Cyclically shifts the elements of an array.