public string HeapEkle(int key, Heap value, Bolum_Bilgi bvalue) { int hash = key % size; if (table[hash] == null) { table[hash] = new LinkedListHashEnty(key, value, bvalue); return("true"); } else { LinkedListHashEnty entry = table[hash]; while (entry.Next != null && entry.Anahtar != key) { entry = entry.Next; } if (entry.Anahtar == key) { entry.HValue = value; entry.BValue = bvalue; } else { entry.Next = new LinkedListHashEnty(key, value, bvalue); } return("true"); } }
public LinkedListHashEnty(int anahtar, Heap hvalue, Bolum_Bilgi b) { this.anahtar = anahtar; this.hvalue = hvalue; this.bvalue = b; this.next = null; }
public void BolumEkle(Bolum_Bilgi b) { Staj_Bilgisi s = new Staj_Bilgisi(); int hash = b.BolumNo % size; //table[hash].HDeger = new Heap(100); LinkedListHashEnty ll = new LinkedListHashEnty(b.BolumNo, new Heap(100), s); if (table[hash] == null) { table[hash] = ll; } else { while (table[hash] != null) { table[hash] = table[hash].Next; } table[hash] = ll; } }