Example #1
0
        static void Main(string[] args)
        {
            string input = "Yesterday, all my troubles seemed so far away " +
                           "Now it looks as though they're here to stay " +
                           "Oh, I believe in yesterday " +
                           "Suddenly, I'm not half the man I used to be " +
                           "There's a shadow hanging over me " +
                           "Oh, yesterday came suddenly " +
                           "Why she had to go I don't know she wouldn't say " +
                           "I said something wrong, now I long for yesterday " +
                           "Yesterday, love was such an easy game to play " +
                           "Now I need a place to hide away " +
                           "Oh, I believe in yesterday " +
                           "Why she had to go I don't know she wouldn't say " +
                           "I said something wrong, now I long for yesterday " +
                           "Yesterday, love was such an easy game to play " +
                           "Now I need a place to hide away " +
                           "Oh, I believe in yesterday " +
                           "Mm mm mm mm mm mm mm";

            HuffmanTree hTree = new HuffmanTree();

            hTree.Build(input);
Example #2
0
 public HuffmanTree(char symbol)
 {
     this.left   = null;
     this.right  = null;
     this.symbol = symbol;
 }
Example #3
0
 public HuffmanTree(HuffmanTree left, HuffmanTree right)
 {
     this.left   = left;
     this.right  = right;
     this.symbol = null;
 }
Example #4
0
 private void SetDefaultPropertiesValues()
 {
     HuffmanCodeTree = new HuffmanTree();
 }