Beispiel #1
0
        private HashedSequence <S> Wrap(S @base)
        {
            int end = @base.Size();

            int[] hashes = new int[end];
            for (int ptr = 0; ptr < end; ptr++)
            {
                hashes[ptr] = cmp.Hash(@base, ptr);
            }
            return(new HashedSequence <S>(@base, hashes));
        }
Beispiel #2
0
 public override int Hash(Subsequence <S> seq, int ptr)
 {
     return(cmp.Hash(seq.@base, ptr + seq.begin));
 }