Example #1
0
        public static int hasheq(object o)
        {
            if (o == null)
            {
                return(0);
            }

            IHashEq ihe = o as IHashEq;

            if (ihe != null)
            {
                return(dohasheq(ihe));
            }

            if (Util.IsNumeric(o))
            {
                return(Numbers.hasheq(o));
            }

            String s = o as string;

            if (s != null)
            {
                return(Murmur3.HashInt(s.GetHashCode()));
            }

            return(o.GetHashCode());
        }
Example #2
0
 public int hasheq()
 {
     if (_hasheq == 0)
     {
         _hasheq = Util.hashCombine(Murmur3.HashString(_name), Util.hasheq(_ns));
     }
     return(_hasheq);
 }
Example #3
0
 public int hasheq()
 {
     if (_hasheq == -1)
     {
         _hasheq = Murmur3.HashOrdered(this);
     }
     return(_hasheq);
 }
Example #4
0
        public int hasheq()
        {
            if (_bipart == null)
            {
                return(Murmur3.HashLong(_lpart));
            }

            return(_bipart.GetHashCode());
        }
 public int hasheq()
 {
     if (_hasheq == -1)
     {
         //_hasheq = mapHasheq(this);
         _hasheq = Murmur3.HashUnordered(this);
     }
     return(_hasheq);
 }
        public int hasheq()
        {
            int cached = _hasheq;

            if (cached == 0)
            {
                //_hasheq = mapHasheq(this);
                _hasheq = cached = Murmur3.HashUnordered(this);
            }
            return(cached);
        }
 public int hasheq()
 {
     if (_hasheq == -1)
     {
         //int hash = 1;
         //foreach (object o in this)
         //    hash = 31 * hash + Util.hasheq(o);
         //_hasheq = hash;
         _hasheq = Murmur3.HashOrdered(this);
     }
     return(_hasheq);
 }
Example #8
0
        public int hasheq()
        {
            if (_hasheq == -1)
            {
                //int hash = 1;
                //for (ISeq s = seq(); s != null; s = s.next())
                //    hash = 31 * hash + Util.hasheq(s.first());

                //_hasheq = hash;
                _hasheq = Murmur3.HashOrdered(this);
            }
            return(_hasheq);
        }
 public int hasheq()
 {
     if (_hasheq == -1)
     {
         //int hash = 0;
         //for (ISeq s = seq(); s != null; s = s.next())
         //{
         //    object e = s.first();
         //    hash += Util.hasheq(e);
         //}
         //_hasheq = hash;
         _hasheq = Murmur3.HashUnordered(this);
     }
     return(_hasheq);
 }
Example #10
0
        public int hasheq()
        {
            if (_hasheq == -1)
            {
                int n;
                int hash = 1;

                for (n = 0; n < count(); ++n)
                {
                    hash = 31 * hash + Util.hasheq(nth(n));
                }

                _hasheq = Murmur3.MixCollHash(hash, n);
            }
            return(_hasheq);
        }
Example #11
0
        public int hasheq()
        {
            int cached = _hasheq;

            if (cached == 0)
            {
                //int hash = 1;
                //for (ISeq s = seq(); s != null; s = s.next())
                //{
                //    hash = 31 * hash + Util.hasheq(s.first());
                //}
                //_hasheq = hash;
                _hasheq = cached = Murmur3.HashOrdered(this);
            }
            return(cached);
        }
        public int hasheq()
        {
            int cached = _hasheq;

            if (cached == 0)
            {
                //int hash = 0;
                //for (ISeq s = seq(); s != null; s = s.next())
                //{
                //    object e = s.first();
                //    hash += Util.hasheq(e);
                //}
                //_hasheq = hash;
                _hasheq = cached = Murmur3.HashUnordered(this);
            }
            return(cached);
        }
        public int hasheq()
        {
            int hash = _hasheq;

            if (hash == 0)
            {
                int n;
                hash = 1;

                for (n = 0; n < count(); ++n)
                {
                    hash = 31 * hash + Util.hasheq(nth(n));
                }

                _hasheq = hash = Murmur3.MixCollHash(hash, n);
            }
            return(hash);
        }
Example #14
0
 public int hasheq()
 {
     return(Murmur3.HashOrdered(this));
 }