Back to FabImage Library websiteYou are here:
Start »
Function Reference »
Basic »
Statistics »
Median
Header: |
STD.h
|
Namespace: |
fil |
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 fil::Median
(
const ftl::Array<float>& inValues,
const ftl::Optional<const ftl::Array<float>&>& inWeights,
float& outMedian
)
Parameters
|
Name |
Type |
Default |
Description |
|
inValues |
const Array<float>& |
|
|
|
inWeights |
const Optional<const Array<float>&>& |
NIL |
|
|
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. |