Package lupos.compression.huffman.tree

Examples of lupos.compression.huffman.tree.InnerNode


   
    // combine in each iteration those entries with the lowest weights
    while(heap.size()>1){
      HeapEntry a = heap.pop();
      HeapEntry b = heap.pop();
      heap.add(new HeapEntry(a.weight + b.weight, new InnerNode(a.node, b.node)));
    }
   
    // finally get the root (= last element in the heap!)
    HeapEntry root = heap.pop();
    return root.node;
View Full Code Here

TOP

Related Classes of lupos.compression.huffman.tree.InnerNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.