38 lines
655 B
Java
38 lines
655 B
Java
package fr.iutfbleau.sae.mhuffman;
|
|
|
|
import java.util.*;
|
|
|
|
public class CanonicalCode{
|
|
private Map<Integer,Integer> codeLenghts = HuffmanNode.getDictionnary();
|
|
private Map<Integer,Integer> canonicalCodes = new HashMap<>();
|
|
|
|
|
|
public void generateCodes(){
|
|
// 1- Premiere chose à faire : trier les codes initiaux par longueur du code :
|
|
|
|
List<Integer> codes = new ArrayList<>();
|
|
codes = codeLenghts.keySet();
|
|
int[] tab = code.toArray(new Integer[0]);
|
|
Arrays.sort(tab);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
public int getCode(){
|
|
return 0;
|
|
}
|
|
|
|
public int getLength(){
|
|
return 0;
|
|
}
|
|
|
|
|
|
public Map<Integer,Integer> getCanonicalCodes(){
|
|
return this.canonicalCodes;
|
|
}
|
|
}
|
|
|
|
|