graph->getVertices()->getVector(); // from each vertex foreach ($vertices as $vertex) { // to each vertex foreach ($c as $other) { // missing edge => fail if ($other !== $vertex && !$vertex->hasEdgeTo($other)) { return false; } } } return true; } }