Back to Adaptive Vision Studio website

You are here: Start » Filter Reference » Array Statistics » GetNthElement

GetNthElement


Returns the array element corresponding to the n-th biggest/smallest value from the inValues array.

Name Type Range Description
inArray <T>Array Elements from which element corresponding to n-th value will be chosen
inValues RealArray Values defining the order
inN Integer 0 -
inSortingOrder SortingOrder
outElement <T> Element from the array
outValue Real Nth biggest/smallest value
outIndex Integer Index of the found value

The type of this filter is defined using the type variable T which represents any valid type. Read more.

Hints

  • You must guarantee that the input arrays have at least N+1 elements.

Errors

This filter can throw an exception to report error. Read how to deal with errors here: Error Handling

Error type Description
DomainError N must not be negative and must be smaller than size of input array in GetNthElement.
DomainError Inconsistent array sizes in GetNthElement.

Complexity Level

This filter is available on Basic Complexity Level.

See Also