Class Hash
Utilities for implementing GetHashCode().
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
Fields
Start
The recommended start value for a combined hash value
Declaration
public const int Start = -2128831035
Field Value
Methods
Combine(Int32, Double)
Incorporates the hash key of a double into an existing hash key
Declaration
public static int Combine(int hash, double number)
Parameters
Type |
Name |
Description |
Int32 |
hash |
Exisiting hash key
|
Double |
number |
Floating point number to incorporate
|
Returns
Type |
Description |
Int32 |
The new, combined hash key
|
Combine(Int32, Int32)
Combines two int32 hash keys
Declaration
public static int Combine(int hash, int key)
Parameters
Type |
Name |
Description |
Int32 |
hash |
First hash key
|
Int32 |
key |
Second hash key
|
Returns
Type |
Description |
Int32 |
Incorporates the second hash key into the first hash key and returns the new, combined hash key
|
GetHashCodeAsSequence(IEnumerable)
Declaration
public static int GetHashCodeAsSequence(IEnumerable seq)
Parameters
Returns
GetHashCodeAsSequence<T>(IEnumerable<T>)
Declaration
public static int GetHashCodeAsSequence<T>(IEnumerable<T> seq)
Parameters
Returns
Type Parameters
GetHashCodeAsSet<T>(IEnumerable<T>)
Declaration
public static int GetHashCodeAsSet<T>(IEnumerable<T> set)
Parameters
Returns
Type Parameters
GetHashCodeAsSet<T>(IEnumerable<T>, IEqualityComparer<T>)
Declaration
public static int GetHashCodeAsSet<T>(IEnumerable<T> set, IEqualityComparer<T> comparer)
Parameters
Returns
Type Parameters