Back to Aurora Vision Library website

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: avl
Module: FoundationLite

Returns an array of most recent objects.

Syntax

void avl::LastMultipleObjects
(
	const T& inObject,
	atl::Optional<int> inMaxCount,
	bool inReset,
	atl::Array<Type>& outObjectArray
)

Parameters

Name Type Range Default Description
Input value inObject const T&
Input value inMaxCount Optional<int> 0 - NIL Number of last objects that are remembered
Input value inReset bool False Reset accumulator state
Output value outObjectArray Array<Type>& Array of most recent objects

Examples



However, to implement basic example perform following steps:
  • Using AvsFilter_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:
  • {element index(non zero-based), inMaxCount}.
  • 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]