Exemplo n.º 1
0
 public void CreateDicoFreq(List <KeyValuePair <byte, int> > entry)
 {
     for (int i = 0; i < entry.Count; i++)
     {
         DicoFreq.Add(entry[i].Key, entry[i].Value);
     }
 }
Exemplo n.º 2
0
 //Lecture d'une String et transformation en tableau de fréquence
 public void ReadFreq(byte[] s)
 {
     foreach (byte c in s)
     {
         if (DicoFreq.ContainsKey(c))
         {
             DicoFreq[c]++;
         }
         else
         {
             DicoFreq.Add(c, 1);
         }
     }
 }