예제 #1
0
        public override int GetHashCode()
        {
            unchecked
            {
                int hashCode = (int)Type;
                hashCode = (hashCode * 397) ^ (int)Strategy;

                if (Type == SpatialFieldType.Geography)
                {
                    hashCode = (hashCode * 397) ^ Units.GetHashCode();
                }

                if (Strategy != SpatialSearchStrategy.BoundingBox)
                {
                    hashCode = (hashCode * 397) ^ MaxTreeLevel;

                    if (Type == SpatialFieldType.Cartesian)
                    {
                        hashCode = (hashCode * 397) ^ MinX.GetHashCode();
                        hashCode = (hashCode * 397) ^ MaxX.GetHashCode();
                        hashCode = (hashCode * 397) ^ MinY.GetHashCode();
                        hashCode = (hashCode * 397) ^ MaxY.GetHashCode();
                    }
                }

                return(hashCode);
            }
        }
예제 #2
0
        public override int GetHashCode()
        {
            int hashCode = -1882349014;

            hashCode = hashCode * -1521134295 + MinX.GetHashCode();
            hashCode = hashCode * -1521134295 + MinY.GetHashCode();
            hashCode = hashCode * -1521134295 + MaxX.GetHashCode();
            hashCode = hashCode * -1521134295 + MaxY.GetHashCode();
            return(hashCode);
        }
예제 #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = MinX.GetHashCode();
         hashCode = (hashCode * 397) ^ MaxX.GetHashCode();
         hashCode = (hashCode * 397) ^ MinY.GetHashCode();
         hashCode = (hashCode * 397) ^ MaxY.GetHashCode();
         return(hashCode);
     }
 }
예제 #4
0
        /// <summary>
        /// Hashcode method
        /// </summary>
        /// <returns></returns>
        public override int GetHashCode()
        {
            int hashCode = -1838259446;

            hashCode = hashCode * -1521134295 + MinX.GetHashCode();
            hashCode = hashCode * -1521134295 + MinY.GetHashCode();
            hashCode = hashCode * -1521134295 + MinZ.GetHashCode();
            hashCode = hashCode * -1521134295 + MaxX.GetHashCode();
            hashCode = hashCode * -1521134295 + MaxY.GetHashCode();
            hashCode = hashCode * -1521134295 + MaxZ.GetHashCode();
            return(hashCode);
        }
예제 #5
0
 public override int GetHashCode()
 {
     return(MinX.GetHashCode() ^ MinY.GetHashCode() ^ MaxX.GetHashCode() ^ MaxY.GetHashCode());
 }
예제 #6
0
 public override int GetHashCode()
 {
     return(MinX.GetHashCode() >> 3 ^ MaxX.GetHashCode() << 3 ^ MinY.GetHashCode() >> 2 ^ MaxY.GetHashCode() << 2);
 }