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); }
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); }