All pastes #358050 Raw Edit

Untitled

public text v1 · immutable
·published 2007-02-16 01:28 UTC
rendered paste body

	public $listaDeVertice = array();
	public $matrizDeAdj = array();
	public $numeroVertices = 0;
	
    public final function  __construct($numeroVertices)
    {
      	try { 
		    
      	   for($i=1; $i<=$numeroVertices; $i++)
      	   {	
      	 	  for($j=1; $j<=$numeroVertices; $j++)
      	      {	
      	    	$this->matrizDeAdj[(int)$i][(int)$j] = 0;
      	      }
      	      $this->listaDeVertice[$i] = new Vertice($i);
      	   }  
		   $this->numeroVertices = $numeroVertices;
      	} 
     
      	catch(Exception  $e) {
      		  printf("An exception has occured: %s<br>",$e->getMessage());    	
        }
    }