/// <summary> /// /// </summary> /// <returns>Null, if tree is not complete.</returns> public HuffmanTree Create() { HuffmanTree temp = HuffmanLoader.NextNode(); if ((temp.root.symbol == -1) && (temp.root.weight == 0)) { return(null); } if (temp.root.symbol != -1) { return(temp); } temp.root.Left = Create(); temp.root.Right = Create(); return(temp); }
public TreeLoader(HuffmanLoader hf) { HuffmanLoader = hf; LoadingStack = new Stack <HuffmanTree>(); }