Module median

Module median 

Source
Expand description

This module provides a processor that calculates the median of multiple input values. Median calculation provides a robust measure of central tendency that is less affected by outliers compared to the arithmetic mean.

The module provides:

  • The MedianProcessor struct which implements median calculation
  • Support for a minimum source count requirement
  • Proper handling of both odd and even number of data points

§Median Calculation

The median calculation follows these rules:

  • For odd number of values, the median is the middle value after sorting
  • For even number of values, the median is the average of the two middle values
  • Processing fails if fewer than the required minimum sources are available

Structs§

MedianProcessor
Processor that calculates the median of input values.