HashUtil

Description

static class Tinman.Core.System.HashUtil

Helper class for computing hash values.

Public / Methods

Float32


[Pure]
public static method Float32 → (2)

value in : float32

The value.

hash opt : int32 = 0

Previous hash code to combine with.

returns → int32

The resulting hash code.

Computes a hash code for the given value.

Float64


[Pure]
public static method Float64 → (2)

value in : float64

The value.

hash opt : int32 = 0

Previous hash code to combine with.

returns → int32

The resulting hash code.

Computes a hash code for the given value.

Hash


[Pure]
public static method Hash → (2)

hash0 in : int32

First hash code.

hash1 in : int32

Second hash code.

returns → int32

The resulting hash code.

Computes a hash code for the given values.

Int32


[Pure]
public static method Int32 → (2)

value in : int32

The value.

hash opt : int32 = 0

Previous hash code to combine with.

returns → int32

The resulting hash code.

Computes a hash code for the given value.

Int64


[Pure]
public static method Int64 → (2)

value in : int64

The value.

hash opt : int32 = 0

Previous hash code to combine with.

returns → int32

The resulting hash code.

Computes a hash code for the given value.

Obj


[Pure]
public static method Obj → (2)

value in : object

The value.

hash opt : int32 = 0

Previous hash code to combine with.

returns → int32

The resulting hash code.

Computes a hash code for the given value.

Obj​Ref


[Pure]
public static method ObjRef → (2)

value in : object

The value.

hash opt : int32 = 0

Previous hash code to combine with.

returns → int32

The resulting hash code.

Computes a hash code for the given value.

Shall​Grow​Hashtable


public static method ShallGrowHashtable → (3)

countUsedBuckets in : int32

Number of used hashtable buckets.

countUsedNodes in : int32

Sum of number of linked nodes of all hashtable buckets.

capacity in : int32

Capacity of the hashtable, in buckets.

returns → bool

true if the hashtable should be grown, false if not.

Determines whether a power-of-two sized hashtable should be grown in order to keep up good hashing performance.

Str


[Pure]
public static method Str → (3)

value in : string

The value.

hash opt : int32 = 0

Previous hash code to combine with.

caseSensitive opt : bool = true

true to compute a case-sensitive hash,
false to compute a case-insensitive hash.
In either way, the computed hash code will correlate with the results of StringUtil.ComparePart.

returns → int32

The resulting hash code.

Computes a hash code for the given value.

The method will always produce the same hash code for the same string value, independently of the programming language or runtime environment (e.g. DOT.NET 32-bit vs. 64-bit).