/// <summary> /// Calculates statistical indicators /// </summary> /// <param name="statisticalData">Defines statistical data</param> /// <param name="countOfRecordsToBeProcessed">Defines count of records to be processed</param> /// <returns>Calculated statistical indicators</returns> public Statistics CalculateStatistics(double[] statisticalData, int countOfRecordsToBeProcessed) { double max = this.CalculateMax(statisticalData, countOfRecordsToBeProcessed); double min = this.CalculateMin(statisticalData, countOfRecordsToBeProcessed); double average = this.CalculateAverage(statisticalData, countOfRecordsToBeProcessed); Statistics statistics = new Statistics(max, min, average); return statistics; }
/// <summary> /// Prints statistics /// </summary> /// <param name="statistics">Defines statistics to be printed</param> public void Print(Statistics statistics) { this.PrintMax(statistics.Max); this.PrintMin(statistics.Min); this.PrintAverage(statistics.Average); }