From 93e355d1c81f13a5054f3929841327880146a719 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 17 Feb 2007 18:52:00 +0000 Subject: [PATCH] We don't need the _standardDeviation() and _arrayAverage() functions anymore --- GraphLine.php | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/GraphLine.php b/GraphLine.php index d171c00..bb0240f 100644 --- a/GraphLine.php +++ b/GraphLine.php @@ -278,41 +278,6 @@ class BSGraphLine extends BSGraph return $pivot; } - // ################################################################### - /** - * Returns the unbiased statistical standard deviation of an array of - * values - * - * @param array Array of values - * - * @return float Standard deviation (unbiased) - */ - private function _standardDeviation($vals) - { - $average = $this->_arrayAverage($vals); - $popVariance = array(); - - foreach ($vals AS $val) - { - $popVariance[] = pow($val - $average, 2); - } - - return sqrt($this->_arrayAverage($popVariance)); - } - - // ################################################################### - /** - * Returns the stastical mean of an array of values - * - * @param array Array of values - * - * @return float Statistical mean - */ - private function _arrayAverage($vals) - { - return array_sum($vals) / count($vals); - } - // ################################################################### /** * Sets the titles of the two axes -- 2.22.5