function pData::getHarmonicMean
Search API
5.x pData.class.php | pData::getHarmonicMean($Serie) |
File
- inc/
pchart/ pchart/ class/ pData.class.php, line 296
Class
Code
function getHarmonicMean($Serie)
{
if (isset($this->Data ["Series"][$Serie]))
{
$SerieData = $this->stripVOID($this->Data ["Series"][$Serie]["Data"]);
$Seriesum = 0;
foreach ($SerieData as $Key => $Value) {
$Seriesum = $Seriesum + 1 / $Value;
}
return (sizeof($SerieData) / $Seriesum);
}
else {
return (NULL);
}
}