mortified_penguin

huff_tree.hpp

Dec 29th, 2012
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. #ifndef TREE_HPP
  2. #define TREE_HPP
  3.  
  4. #include <queue>
  5. #include <map>
  6.  
  7. #include "node.hpp"
  8.  
  9. class tree
  10. {
  11.    public:
  12.       tree(const std::map<char, int> histo);
  13.       ~tree();
  14.       node* rootnode() const;
  15.  
  16.    private:
  17.       node *root;
  18.       std::priority_queue<node*, std::vector<node*>, node_comp> leaves;
  19.       void create_tree();
  20. };
  21.  
  22. #endif // TREE_HPP
Advertisement
Add Comment
Please, Sign In to add comment