Exemple #1
0
 public bool ExisteElemento(cVertice pElemento)
 {
     if ((aElemento != null) && (pElemento != null))
     {
         return((aElemento.Equals(pElemento)) || (aSublista.ExisteElemento(pElemento)));
     }
     else
     {
         return(false);
     }
 }
Exemple #2
0
 private void agregarArco(cVertice pVerticeOrigen, cVertice pVerticeDestino, int pdistancia)
 {
     if (ExisteVertice(pVerticeOrigen))
     {
         if (aVertice.Equals(pVerticeOrigen))
         {
             //Agregar Arco
             if (!aLista.ExisteElemento(pVerticeDestino))
             {
                 aLista.Agregar(pVerticeDestino, pdistancia);
             }
         }
         else if (aSiguiente != null)
         {
             aSiguiente.agregarArco(pVerticeOrigen, pVerticeDestino, pdistancia);
         }
     }
 }