public function isSingle()
    {
        try {
            $vertex = $this->graph->getVertices()->getVertexFirst();
        }
        catch (UnderflowException $e) {
            // no first vertex => empty graph => has zero components
            return false;
        }
        $alg = $this->createSearch($vertex);

        return (count($this->graph->getVertices()) === count($alg->getVertices()));
    }