/// <summary> /// Returns the order statistic (order 1..N) from the provided samples. /// </summary> /// <param name="data">The data sample sequence.</param> /// <param name="order">One-based order of the statistic, must be between 1 and N (inclusive).</param> public static double OrderStatistic(IEnumerable <double> data, int order) { if (data == null) { throw new ArgumentNullException("data"); } var array = data.ToArray(); return(ArrayStatistics.OrderStatisticInplace(array, order)); }
/// <summary> /// Returns the order statistic (order 1..N) from the provided samples. /// </summary> /// <param name="data">The data sample sequence.</param> /// <param name="order">One-based order of the statistic, must be between 1 and N (inclusive).</param> public static double OrderStatistic(IEnumerable <double> data, int order) { var array = data.ToArray(); return(ArrayStatistics.OrderStatisticInplace(array, order)); }