Back to FabImage Library website
You are here: Start » Function Reference » All Functions » Array Transforms » SplitArray
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 |
Divides an array into two parts at the given index.
Syntax
void fil::SplitArray ( const ftl::Array<Type>& inArray, const int inIndex, bool inInverse, ftl::Array<Type>& outArray1, ftl::Array<Type>& outArray2 )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inArray | const Array<Type>& | Input array | ||
![]() |
inIndex | const int | 0 - ![]() |
Index of the first element that is passed to the second of the output arrays | |
![]() |
inInverse | bool | False | Determines if the indices are counted from beginning or from end of the input array | |
![]() |
outArray1 | Array<Type>& | First output array | ||
![]() |
outArray2 | Array<Type>& | Second output array |
Description
The operation divides the inArray into two parts. The elements on positions smaller than inIndex are passed to outArray1, while the remaining ones are passed to outArray2. The index numbering in FabImage Studio is zero-based.
Examples
![]() |
![]() |
inArray = {1,4,3,2,5} inIndex = 3 |
outArray1 = {1,4,3} outArray2 = {2,5} |
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Index out of range in SplitArray. |
See Also
- FisFilter_JoinArrays – Concatenates the input arrays one after another.
- CropArray – Selects a continuous subsequence of array elements.