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

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

    Index
    • Creates an empty window that keeps up to capacity readings, 32 unless told fewer.

      Parameters

      • Optionalcapacity: number | null

      Returns kit.Window

    • 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

    • get isFull(): boolean

      Whether the window holds as many readings as it keeps.

      Returns boolean

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

      Returns number | null

    • 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

    • The oldest reading still held, 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, or null while empty.

      Returns number | null

    • The population variance of the readings, 0 for one reading, or null while empty.

      Returns number | null