Beispiel #1
0
        public static int Create <T1, T2, T3, T4, T5, T6, T7, T8>(T1?value1, T2?value2, T3?value3, T4?value4, T5?value5, T6?value6, T7?value7, T8?value8)
        {
            uint hc1 = (uint)(value1?.GetHashCode() ?? 0);
            uint hc2 = (uint)(value2?.GetHashCode() ?? 0);
            uint hc3 = (uint)(value3?.GetHashCode() ?? 0);
            uint hc4 = (uint)(value4?.GetHashCode() ?? 0);
            uint hc5 = (uint)(value5?.GetHashCode() ?? 0);
            uint hc6 = (uint)(value6?.GetHashCode() ?? 0);
            uint hc7 = (uint)(value7?.GetHashCode() ?? 0);
            uint hc8 = (uint)(value8?.GetHashCode() ?? 0);

            Initialize(out uint v1, out uint v2, out uint v3, out uint v4);

            v1 = Round(v1, hc1);
            v2 = Round(v2, hc2);
            v3 = Round(v3, hc3);
            v4 = Round(v4, hc4);

            v1 = Round(v1, hc5);
            v2 = Round(v2, hc6);
            v3 = Round(v3, hc7);
            v4 = Round(v4, hc8);

            uint hash = MixState(v1, v2, v3, v4);

            hash += 32;

            hash = MixFinal(hash);
            return((int)hash);
        }
Beispiel #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (ActionId != 0)
            {
                hash ^= ActionId.GetHashCode();
            }
            if (Num != 0)
            {
                hash ^= Num.GetHashCode();
            }
            if (T0 != 0L)
            {
                hash ^= T0.GetHashCode();
            }
            if (T1 != 0L)
            {
                hash ^= T1.GetHashCode();
            }
            if (T2 != 0L)
            {
                hash ^= T2.GetHashCode();
            }
            if (T3 != 0L)
            {
                hash ^= T3.GetHashCode();
            }
            return(hash);
        }
Beispiel #3
0
        public static int Create <T1, T2>(T1?value1, T2?value2)
        {
            uint hc1 = (uint)(value1?.GetHashCode() ?? 0);
            uint hc2 = (uint)(value2?.GetHashCode() ?? 0);

            uint hash = MixEmptyState();

            hash += 8;

            hash = QueueRound(hash, hc1);
            hash = QueueRound(hash, hc2);

            hash = MixFinal(hash);
            return((int)hash);
        }
Beispiel #4
0
        public override int GetHashCode()
        {
            var hashCode = 2018318558;

            hashCode = hashCode * -1521134295 + T1.GetHashCode();
            hashCode = hashCode * -1521134295 + T2.GetHashCode();
            hashCode = hashCode * -1521134295 + T3.GetHashCode();
            hashCode = hashCode * -1521134295 + T4.GetHashCode();
            hashCode = hashCode * -1521134295 + T5.GetHashCode();
            hashCode = hashCode * -1521134295 + P1.GetHashCode();
            hashCode = hashCode * -1521134295 + P2.GetHashCode();
            hashCode = hashCode * -1521134295 + P3.GetHashCode();
            hashCode = hashCode * -1521134295 + P4.GetHashCode();
            hashCode = hashCode * -1521134295 + P5.GetHashCode();
            hashCode = hashCode * -1521134295 + JunctionIndex.GetHashCode();
            hashCode = hashCode * -1521134295 + NearestJunctionIndex.GetHashCode();
            return(hashCode);
        }
        public override int GetHashCode()
        {
            var hashCode = -1044093539;

            hashCode = hashCode * -1521134295 + T1.GetHashCode();
            hashCode = hashCode * -1521134295 + T2.GetHashCode();
            hashCode = hashCode * -1521134295 + T3.GetHashCode();
            hashCode = hashCode * -1521134295 + T4.GetHashCode();
            hashCode = hashCode * -1521134295 + T5.GetHashCode();
            hashCode = hashCode * -1521134295 + P1.GetHashCode();
            hashCode = hashCode * -1521134295 + P2.GetHashCode();
            hashCode = hashCode * -1521134295 + P3.GetHashCode();
            hashCode = hashCode * -1521134295 + P4.GetHashCode();
            hashCode = hashCode * -1521134295 + P5.GetHashCode();
            hashCode = hashCode * -1521134295 + JunctionIndex.GetHashCode();
            hashCode = hashCode * -1521134295 + NearestJunctionIndex.GetHashCode();
            hashCode = hashCode * -1521134295 + Length.GetHashCode();
            hashCode = hashCode * -1521134295 + Lock.GetHashCode();
            return(hashCode);
        }
Beispiel #6
0
        public static int Create <T1, T2, T3, T4>(T1?value1, T2?value2, T3?value3, T4?value4)
        {
            uint hc1 = (uint)(value1?.GetHashCode() ?? 0);
            uint hc2 = (uint)(value2?.GetHashCode() ?? 0);
            uint hc3 = (uint)(value3?.GetHashCode() ?? 0);
            uint hc4 = (uint)(value4?.GetHashCode() ?? 0);

            Initialize(out uint v1, out uint v2, out uint v3, out uint v4);

            v1 = Round(v1, hc1);
            v2 = Round(v2, hc2);
            v3 = Round(v3, hc3);
            v4 = Round(v4, hc4);

            uint hash = MixState(v1, v2, v3, v4);

            hash += 16;

            hash = MixFinal(hash);
            return((int)hash);
        }