/** * Purges this graph, making it the empty graph. */ public function purge() { for ($i = 0; $i < $this->numberOfVertices; ++$i) { $this->adjacencyList[$i]->purge(); } parent::purge(); }
/** * Purges this graph, making it the empty graph. */ public function purge() { for ($i = 0; $i < $this->numberOfVertices; ++$i) { for ($j = 0; $j < $this->numberOfVertices; ++$j) { $this->matrix[array($i, $j)] = NULL; } } parent::purge(); }