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

    Class Window

    A rolling window of the most recent readings, with the stats over them.

    Index
    • get capacity(): number

      How many readings the window holds before it starts dropping.

      Returns number

    • get isEmpty(): boolean

      Whether the window is still waiting for its first reading.

      Returns boolean

    • The largest reading, or null while the window is empty.

      Returns number | null

    • The mean of the readings, or null while the window is empty.

      Returns number | null

    • The smallest reading, or null while the window is empty.

      Returns number | null

    • Adds a reading, dropping the oldest once the window is full.

      Parameters

      • reading: number

      Returns void

    • The spread between the smallest and largest readings.

      Returns number | null

    • The variance of the readings, or null without enough of them.

      Returns number | null