clusterId = $clusterId; $this->clusterSize = $clusterArray["size"]; } public function calcPeerClusterRatioNorm($referencePoint) { $this->peerClusterRatioNorm = $this->clusterSize / $referencePoint; if ($this->peerClusterRatioNorm - $this->range > 1) { $this->bgColor = "red"; } elseif ($this->peerClusterRatioNorm + $this->range < 1) { $this->bgColor = "blue"; } elseif ($this->peerClusterRatioNorm == 1) { $this->bgColor = "green"; } } public function toHTML() { $table = "bgColor\">"; $table .= ""; $table .= ""; $table .= ""; $table .= ""; $table .= ""; $table .= ""; $table .= ""; $table .= ""; $table .= ""; $table .= "
ClusterId:$this->clusterId
ClusterSize:$this->clusterSize
PeerClusterRatioNorm:$this->peerClusterRatioNorm
"; return $table; } } ?>