问题描述
我有一个数字向量,我想用霍夫曼编码进行压缩。我在互联网上看到了很多代码,但任何输入都无法合并。我还必须解压缩数字的输出向量。
1 - 无效代码(向量输入,向量输出);
2 - 无效解码(矢量输入,矢量输出);
// ............... .................................. input => vector in;
output =>向量out1,out2;
代码(in,out1);
decode(out1,out2) ;
// ............................... ..........
我的问题是,如何输入数字的输入向量(浮点数)?
I have a vector of numbers, and I wanted to do compression using Huffman coding. I saw a lot of code on the internet but any input that I can not be combined. I also have to decompress the output vector of numbers.
1 - void code(vector input , vector output);
2 - void decode(vector input , vector output);
//................................................. input = > vector in ;
output= > vector out1 , out2;
code(in,out1);
decode(out1,out2);
//.........................................
MY PROBLEM IS , How do I put in the input vector of numbers(float) ?
这篇关于用c ++编写的霍夫曼编码和解码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!