public function instability(DependencyMap $map) : array
    {
        $ce = $this->efferentCoupling($map);
        $ca = $this->afferentCoupling($map);
        $instability = [];
        foreach ($ce as $class => $count) {
            $totalCoupling = $ce[$class] + $ca[$class];
            $instability[$class] = $ce[$class] / $totalCoupling;
        }
        return $instability;
    }