pamoja for TypeScript - v0.2.0
    Preparing search index...

    Class Median

    Rejects a single wild reading, where an average would let it pull the answer.

    Index
    • Creates an empty median filter over up to capacity readings, 32 unless told fewer.

      A small odd window, such as 5, follows a real change in a few readings; a window of 32 follows it 16 readings late.

      Parameters

      • Optionalcapacity: number | null

      Returns Median

    • get value(): number | null

      The current median, or null before the first reading.

      Returns number | null

    • Folds a reading in and returns the median of the window.

      Parameters

      • reading: number

      Returns number