Example #1
0
 /**
  * Purges this graph, making it the empty graph.
  */
 public function purge()
 {
     for ($i = 0; $i < $this->numberOfVertices; ++$i) {
         $this->adjacencyList[$i]->purge();
     }
     parent::purge();
 }
Example #2
0
 /**
  * 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();
 }