This commit is contained in:
2013-12-08 20:49:17 +01:00
commit 546acd105b
76 changed files with 654 additions and 0 deletions

31
Huffman/exec.cpp Normal file
View File

@@ -0,0 +1,31 @@
#include <vector>
#include <iostream>
#include <string>
#include <ctime>
#include <fstream>
#include <algorithm>
#include "DataSet.h"
#include "HElement.h"
#include "Huffman.h"
int main(int n_parameters, char** parameters) {
std::vector<DataCharString> table_code;
huffman_p (huffman_f ( read_data (*(parameters + 1) ) ), &table_code);
std::sort (table_code.begin(), table_code.end());
for (std::vector<DataCharString>::iterator i = table_code.begin() ; i!= table_code.end() ; ++i){
std::cout << "Char: " << (*i).getChar() << " - Code: " << (*i).getCode() << std::endl;
}
std::cin.get();
return 0;
}