Exemplo n.º 1
0
        private TablaHash <String, int> GetTablasHashParaDijkstra()
        {
            TablaHash <String, int> tablasHas = new TablaHash <string, int>(ArregloDVertices.GetTamanio());
            string clave = null;

            for (int i = 0; i < this.ArregloDVertices.GetTamanio(); i++)
            {
                if (this.ArregloDVertices.GetForIndex(i) != null)
                {
                    clave = this.ArregloDVertices.GetForIndex(i).Nombre;
                    tablasHas.Insertar(clave, -1);
                }
            }
            return(tablasHas);
        }
Exemplo n.º 2
0
 public bool InsertaVertice(string pNombre, T pInformacion)
 {
     return(ArregloDVertices.Insertar(pNombre, new Vertice <T>(pNombre, pInformacion)));
 }