Exemple #1
0
        public override int GetHashCode()
        {
            int hash = MurmurHash.Initialize(1);

            foreach (T t in this)
            {
                hash = MurmurHash.Update(hash, t.GetHashCode());
            }
            hash = MurmurHash.Finish(hash, this.Count);
            return(hash);
        }
Exemple #2
0
        public override int GetHashCode()
        {
            int hash = MurmurHash.Initialize();

            foreach (Interval I in intervals)
            {
                hash = MurmurHash.Update(hash, I.a);
                hash = MurmurHash.Update(hash, I.b);
            }
            hash = MurmurHash.Finish(hash, intervals.Count * 2);
            return(hash);
        }