public function degreeOf($vertex) { return $this->inDegreeOf($vertex) + $this->outDegreeOf($vertex); }