Photon Quantum 3.0.0

Static Public Member Functions | List of all members
Quantum.HashCodeUtils Class Reference

Hashcode generation utilities. More...

Static Public Member Functions

static int CombineHashCodes (int a, int b)
 Create a hashcode from two integers. More...
 
static int CombineHashCodes (int a, int b, int c)
 Create a hashcode from three integers. More...
 
static int GetArrayHashCode< T > (in FixedArray< T > arr, int initialHash=0)
 Create a hashcode from a fixed array. More...
 
static int GetArrayHashCode< T > (T *ptr, int length, int initialHash=0)
 Create a hashcode from an array. More...
 
static int Int64HashCode (long value)
 Create a hashcode from a long. More...
 
static int UInt64HashCode (ulong value)
 Create a hashcode from an unsigned long. More...
 

Detailed Description

Hashcode generation utilities.

Member Function Documentation

◆ CombineHashCodes() [1/2]

static int Quantum.HashCodeUtils.CombineHashCodes ( int  a,
int  b 
)
inlinestatic

Create a hashcode from two integers.

Parameters
aInteger One
bInteger Two
Returns
Hashcode of two ints

◆ CombineHashCodes() [2/2]

static int Quantum.HashCodeUtils.CombineHashCodes ( int  a,
int  b,
int  c 
)
inlinestatic

Create a hashcode from three integers.

Parameters
aInteger One
bInteger Two
cInteger Three
Returns
Hashcode of three ints

◆ Int64HashCode()

static int Quantum.HashCodeUtils.Int64HashCode ( long  value)
inlinestatic

Create a hashcode from a long.

Parameters
valueInput value
Returns
Hashcode

◆ UInt64HashCode()

static int Quantum.HashCodeUtils.UInt64HashCode ( ulong  value)
inlinestatic

Create a hashcode from an unsigned long.

Parameters
valueInput value
Returns
Hashcode

◆ GetArrayHashCode< T >() [1/2]

static int Quantum.HashCodeUtils.GetArrayHashCode< T > ( T *  ptr,
int  length,
int  initialHash = 0 
)
inlinestatic

Create a hashcode from an array.

Template Parameters
TType of array
Parameters
ptrPointer to array
lengthLength of the array
initialHashInitial hashcode value
Returns
Hashcode
Type Constraints
T :unmanaged 

◆ GetArrayHashCode< T >() [2/2]

static int Quantum.HashCodeUtils.GetArrayHashCode< T > ( in FixedArray< T >  arr,
int  initialHash = 0 
)
inlinestatic

Create a hashcode from a fixed array.

Template Parameters
TArray type
Parameters
arrInput array
initialHashInitial hash value
Returns
Hashcode
Type Constraints
T :unmanaged