public function getEdgeIndex($index)
    {
        if (!isset($this->edges[$index])) {
            throw new OutOfBoundsException('Invalid edge index');
        }
        return $this->edges[$index];
    }