public function getAverageHeightOfGraph()
    {
        $ns = [];
        foreach ($this->graph->getRootNodes() as $node) {
            array_push($ns, $this->getLongestBranch($node));
        }
        return round(array_sum($ns) / max(1, sizeof($ns)), 2);
    }