Back to FabImage Library website
However, to implement basic example perform following steps:
inMaxCount= 1
[1, 2, 3] [1]
[1, 2, 3] [2]
[1, 2, 3] [3]
inMaxCount = 2
[1, 2, 3] [1]
[1, 2, 3] [1, 2]
[1, 2, 3] [2, 3]
inMaxCount = 3
[1, 2, 3] [1]
[1, 2, 3] [1, 2]
[1, 2, 3] [1, 2, 3]
You are here: Start » Function Reference » All Functions » Loop Utils » LastMultipleObjects

LastMultipleObjects
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 |
Returns an array of most recent objects.
Syntax
void fil::LastMultipleObjects ( const T& inObject, ftl::Optional<int> inMaxCount, bool inReset, ftl::Array<Type>& outObjectArray )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inObject | const T& | |||
![]() |
inMaxCount | Optional<int> | 0 - ![]() |
NIL | Number of last objects that are remembered |
![]() |
inReset | bool | False | Reset accumulator state | |
![]() |
outObjectArray | Array<Type>& | Array of most recent objects |
Examples
However, to implement basic example perform following steps:
- Using FisFilter_CreateArray create 1x3 dimensional array [1, 2, 3].
- Connect created vector to inObject input of the filter
- LastMultipleObjects will iterate through each element in inObject and will return outObjectArray of previous elements for each element of inObject, with the size of smaller of the numbers:
- Result will be as follows (red numbers are currently iterated elements, while green ones are result):
inMaxCount= 1
[1, 2, 3] [1]
[1, 2, 3] [2]
[1, 2, 3] [3]
inMaxCount = 2
[1, 2, 3] [1]
[1, 2, 3] [1, 2]
[1, 2, 3] [2, 3]
inMaxCount = 3
[1, 2, 3] [1]
[1, 2, 3] [1, 2]
[1, 2, 3] [1, 2, 3]