Пример #1
0
 protected bool Equals(TwoStringInfo other)
 {
     return(TwoGramCount == other.TwoGramCount && N1PlusStarww == other.N1PlusStarww &&
            NwwStarCount.Equals(other.NwwStarCount) &&
            ThreeGramCounts.SequenceEqual(other.ThreeGramCounts, new KeyValuePairIntUintComparer()) &&
            MostLikelies.SequenceEqual(other.MostLikelies));
 }
Пример #2
0
 protected static byte[] Serialize(TwoStringInfo data)
 {
     return(Serialization.Concat(BitConverter.GetBytes(data.TwoGramCount),
                                 BitConverter.GetBytes(data.N1PlusStarww),
                                 Serialize(data.NwwStarCount),
                                 Serialization.Encapsulate(Serialization.Serialize(data.MostLikelies)),
                                 Serialization.Encapsulate(Serialization.Serialize(data.ThreeGramCounts))));
 }