Back to FabImage Library website
You are here: Start » Function Reference » All Functions » Array Statistics » GetMaximumElement
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 element that corresponds to the biggest value in the array of values.
Applications: Choosing one object from an array on the basis of some feature, e.g. the blob having the highest area.
Syntax
void fil::GetMaximumElement ( const ftl::Array<Type>& inArray, const ftl::Array<float>& inValues, Type& outElement, float& outValue, int& outIndex )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inArray | const Array<Type>& | Elements from which element corresponding to biggest value will be chosen | |
![]() |
inValues | const Array<float>& | Values defining the order | |
![]() |
outElement | Type& | Element from the array | |
![]() |
outValue | float& | Biggest value | |
![]() |
outIndex | int& | Index of the biggest value |
Hints
- If the input array is not guaranteed to be non-empty, use GetMaximumElement_OrNil instead.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Empty input array in GetMaximumElement. |
DomainError | Inconsistent array sizes in GetMaximumElement. |
See Also
- GetMinimumElement – Returns an array element that corresponds to the smallest value in the array of values.