protected function postProcess() { foreach ($this->nodeMetrics as $id => $metrics) { $this->afferentNodes[$id] = array(); foreach ($metrics[self::M_AFFERENT_COUPLING] as $caId) { $this->afferentNodes[$id][] = $this->nodeSet[$caId]; } sort($this->afferentNodes[$id]); $this->efferentNodes[$id] = array(); foreach ($metrics[self::M_EFFERENT_COUPLING] as $ceId) { $this->efferentNodes[$id][] = $this->nodeSet[$ceId]; } sort($this->efferentNodes[$id]); $afferent = count($metrics[self::M_AFFERENT_COUPLING]); $efferent = count($metrics[self::M_EFFERENT_COUPLING]); $this->nodeMetrics[$id][self::M_AFFERENT_COUPLING] = $afferent; $this->nodeMetrics[$id][self::M_EFFERENT_COUPLING] = $efferent; } }