__hash__() 공개 정적인 메소드

public static __hash__ ( double d ) : int
d double
리턴 int
예제 #1
0
 public static int __hash__(Complex x)
 {
     if (x.Imaginary() == 0)
     {
         return(DoubleOps.__hash__(x.Real));
     }
     return(x.GetHashCode());
 }
예제 #2
0
        public static int __hash__(Complex x)
        {
            if (x.Imaginary() == 0)
            {
                return(DoubleOps.__hash__(x.Real));
            }

            int hash = (DoubleOps.__hash__(x.Real) + SysModule.hash_info.imag * DoubleOps.__hash__(x.Imaginary)) % SysModule.hash_info.modulus;

            if (hash == -1)
            {
                hash = -2;
            }
            return(hash);
        }
예제 #3
0
 public static int __hash__(float x)
 {
     return(DoubleOps.__hash__(((double)x)));
 }