07-25-2011 10:28 AM - edited 07-25-2011 10:30 AM
Greetings,
This is my first time to the forum, I was hoping if anyone could help me out in generating 'Huffman Trees', I have already created a table that does the probability check for variable length coding, once the probabilities are added.
Thanks
Solved! Go to Solution.
07-27-2011 11:25 AM - edited 07-27-2011 11:29 AM
@co2junkie_ wrote:
Greetings,
This is my first time to the forum, I was hoping if anyone could help me out in generating 'Huffman Trees', I have already created a table that does the probability check for variable length coding, once the probabilities are added.
Thanks
Hey co2junkie_,
I've managed to produce a VI that can generate a string which defines the huffman tree from a given Frequency and Value 2D array, and I've fully documented the code to show the thought process and tools used in its production. This VI generates a string which is encoded to represent the full tree span, hopefully you'll be able to infer the Huffman Code required for a particular value from this string. I've never used a Huffman Tree before so I couldn't work out what sort of algorithm is required for it's implementation from the Front Panel you provided, so I used this website for reference; I hope this still suits your purpose even when created following this format. However if it doesn't suit your specification, I still firmly believe it will serve as a good guideline towards producing data which matches your specification. I've made sure that you can use double values as Frequency/Value input data similar to how you have usedin your example's arrays. If you wish to use this in a larger VI, you can just drag the icon from the connector pane located in the top right of the Front Panel/Block Diagram into your other block diagram.
Anyway, check out the VI I've attached, I hope the comments are clear enough although if you need to clarify any aspects of the code please ask away!
07-28-2011 09:29 AM