Function quantileSorted

  • Similar to quantile, but expects the input to be a sorted array of values. In contrast with quantile, the accessor is only called on the elements needed to compute the quantile.

    Parameters

    Returns number | undefined

  • Similar to quantile, but expects the input to be a sorted array of values. In contrast with quantile, the accessor is only called on the elements needed to compute the quantile.

    Type Parameters

    • T

    Parameters

    • array: T[]
    • p: number
    • accessor: ((element, i, array) => number)
        • (element, i, array): number
        • Parameters

          • element: T
          • i: number
          • array: T[]

          Returns number

    Returns number | undefined