Back to Aurora Vision Library website

You are here: Start » Function Reference » Basic » Statistics » Median

Median


Header: STD.h
Namespace: avl
Module: FoundationLite

Computes the median of an array of real numbers. The array must be not empty. Optional weights, when supplied, must be positive.

Syntax

void avl::Median
(
	const atl::Array<float>& inValues,
	const atl::Optional<const atl::Array<float>&>& inWeights,
	float& outMedian
)

Parameters

Name Type Default Description
Input value inValues const Array<float>&
Input value inWeights const Optional<const Array<float>&>& NIL
Output value outMedian float&

Hints

  • If the input array is not guaranteed to be non-empty, precede this filter with SkipEmptyArray.

Errors

List of possible exceptions:

Error type Description
DomainError Empty array on input in Median.