Пример #1
0
        internal void Collect(SampleCounter sc)
        {
            var hash = sc.GetAlterHash();

            while (true)
            {
                if (hashTable.ContainsKey(hash))
                {
                    if (sc.AlterEqualsTo(hashTable[hash]))
                    {
                        hashTable[hash].counter++;
                        return;
                    }
                    hash++;
                }
                else
                {
                    hashTable[hash] = sc;
                    return;
                }
            }
        }
Пример #2
0
 internal bool AlterEqualsTo(SampleCounter sc2)
 {
     return(CompareArrays(word, 0, sc2.word));
 }
Пример #3
0
        internal void Collect(byte[] word)
        {
            var sc = new SampleCounter(word);

            Collect(sc);
        }