public void AddValue(ulong keyHash, T value)
 {
     if (value != null)
     {
         _estimator.Add(_byteConverter.ToByteArray(value));
     }
 }
        public void AddValue(ulong keyHash, T value)
        {
            ulong hash = 1;

            if (value != null)
            {
                var    bytes  = _byteConverter.ToByteArray(value);
                byte[] result = _murmurHash.ComputeHash(bytes);
                hash = BitConverter.ToUInt64(result, 0);
            }

            AddHash(hash);
        }
Exemple #3
0
        public ulong GetHash(T value)
        {
            ulong hash = 1;

            if (value != null)
            {
                var    bytes  = _byteConverter.ToByteArray(value);
                byte[] result = _murmurHash.ComputeHash(bytes);
                hash = BitConverter.ToUInt64(result, 0);
            }

            return(hash);
        }