/// <summary> /// Create HeapElement /// </summary> /// <param name="size"></param> /// <param name="heap"></param> public HeapElement(int size, Heap heap) { allocated = Count = size; this.heap = heap; if (size != 0) { values = Enumerable.Repeat(StackValue.BuildInvalid(), allocated).ToArray(); } }
public HeapElement(int size, int symbolindex) { AllocSize = VisibleSize = size; Dict = null; Stack = new StackValue[AllocSize]; for (int n = 0; n < AllocSize; ++n) { Stack[n] = StackValue.BuildInvalid(); } }
public HeapElement(int size, Heap heap) { allocated = VisibleSize = size; items = new StackValue[allocated]; this.heap = heap; for (int n = 0; n < allocated; ++n) { items[n] = StackValue.BuildInvalid(); } }