public static int HistogramMedian( this int values )
<ExtensionAttribute> Public Shared Function HistogramMedian ( values As Integer() ) As Integer
The input array is treated as histogram, i.e. its indexes are treated as values of stochastic function, but array values are treated as "probabilities" (total amount of hits).
|The median value is calculated accumulating histogram's values starting from the left point until the sum reaches 50% of histogram's sum.|