public override int GetHashCode() { unchecked { var hashCode = (int)TwoGramCount; hashCode = (hashCode * 397) ^ (int)N1PlusStarww; hashCode = (hashCode * 397) ^ NwwStarCount.GetHashCode(); hashCode = ThreeGramCounts?.Aggregate(hashCode, (current, threeGram) => (int)((((current * 397) ^ threeGram.Key) * 397) ^ threeGram.Value)) ?? hashCode; hashCode = MostLikelies?.Aggregate(hashCode, (current, count) => (current * 397) ^ count) ?? hashCode; return(hashCode); } }
public override int GetHashCode() { unchecked { var comparer = new KeyValuePairIntTwoStringInfoComparer(); var hashCode = (int)OneGramCount; hashCode = (hashCode * 397) ^ (int)N1PlusStarwStar; hashCode = (hashCode * 397) ^ (int)N1PlusStarw; hashCode = (hashCode * 397) ^ NwStarCount.GetHashCode(); hashCode = MostLikelies?.Aggregate(hashCode, (current, count) => (current * 397) ^ count) ?? hashCode; hashCode = TwoGrams?.Aggregate(hashCode, (current, twoGram) => (current * 397) ^ comparer.GetHashCode(twoGram)) ?? hashCode; return(hashCode); } }