Struct HashCode
- Namespace
- Alis.Core.Aspect.Math.Util
- Assembly
- Alis.dll
The hash code
public struct HashCode
Inherited Members
Fields
Prime1
The prime
private const uint Prime1 = 2654435761
Field Value
Prime2
The prime
private const uint Prime2 = 2246822519
Field Value
Prime3
The prime
private const uint Prime3 = 3266489917
Field Value
Prime4
The prime
private const uint Prime4 = 668265263
Field Value
Prime5
The prime
private const uint Prime5 = 374761393
Field Value
SSeed
The generate global seed
private static readonly uint SSeed
Field Value
_length
The length
private uint _length
Field Value
_queue1
The queue
private uint _queue1
Field Value
_queue2
The queue
private uint _queue2
Field Value
_queue3
The queue
private uint _queue3
Field Value
_v1
The
private uint _v1
Field Value
_v2
The
private uint _v2
Field Value
_v3
The
private uint _v3
Field Value
_v4
The
private uint _v4
Field Value
Methods
Add<T>(T)
Adds the value
public void Add<T>(T value)
Parameters
value
T-
The value
Type Parameters
T
-
The
Add(int)
Adds the value
private void Add(int value)
Parameters
value
int-
The value
Combine<T1>(T1)
Combines the value 1
public static int Combine<T1>(T1 value1)
Parameters
value1
T1-
The value
Returns
- int
-
The int
Type Parameters
T1
-
The
Combine<T1, T2>(T1, T2)
Combines the value 1
public static int Combine<T1, T2>(T1 value1, T2 value2)
Parameters
value1
T1-
The value
value2
T2-
The value
Returns
- int
-
The int
Type Parameters
T1
-
The
T2
-
The
Combine<T1, T2, T3>(T1, T2, T3)
Combines the value 1
public static int Combine<T1, T2, T3>(T1 value1, T2 value2, T3 value3)
Parameters
value1
T1-
The value
value2
T2-
The value
value3
T3-
The value
Returns
- int
-
The int
Type Parameters
T1
-
The
T2
-
The
T3
-
The
Combine<T1, T2, T3, T4>(T1, T2, T3, T4)
Combines the value 1
public static int Combine<T1, T2, T3, T4>(T1 value1, T2 value2, T3 value3, T4 value4)
Parameters
value1
T1-
The value
value2
T2-
The value
value3
T3-
The value
value4
T4-
The value
Returns
- int
-
The int
Type Parameters
T1
-
The
T2
-
The
T3
-
The
T4
-
The
Combine<T1, T2, T3, T4, T5>(T1, T2, T3, T4, T5)
Combines the value 1
public static int Combine<T1, T2, T3, T4, T5>(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5)
Parameters
value1
T1-
The value
value2
T2-
The value
value3
T3-
The value
value4
T4-
The value
value5
T5-
The value
Returns
- int
-
The int
Type Parameters
T1
-
The
T2
-
The
T3
-
The
T4
-
The
T5
-
The
Combine<T1, T2, T3, T4, T5, T6>(T1, T2, T3, T4, T5, T6)
Combines the value 1
public static int Combine<T1, T2, T3, T4, T5, T6>(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6)
Parameters
value1
T1-
The value
value2
T2-
The value
value3
T3-
The value
value4
T4-
The value
value5
T5-
The value
value6
T6-
The value
Returns
- int
-
The int
Type Parameters
T1
-
The
T2
-
The
T3
-
The
T4
-
The
T5
-
The
T6
-
The
Combine<T1, T2, T3, T4, T5, T6, T7>(T1, T2, T3, T4, T5, T6, T7)
Combines the value 1
public static int Combine<T1, T2, T3, T4, T5, T6, T7>(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7)
Parameters
value1
T1-
The value
value2
T2-
The value
value3
T3-
The value
value4
T4-
The value
value5
T5-
The value
value6
T6-
The value
value7
T7-
The value
Returns
- int
-
The int
Type Parameters
T1
-
The
T2
-
The
T3
-
The
T4
-
The
T5
-
The
T6
-
The
T7
-
The
Combine<T1, T2, T3, T4, T5, T6, T7, T8>(T1, T2, T3, T4, T5, T6, T7, T8)
Combines the value 1
public static int Combine<T1, T2, T3, T4, T5, T6, T7, T8>(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8)
Parameters
value1
T1-
The value
value2
T2-
The value
value3
T3-
The value
value4
T4-
The value
value5
T5-
The value
value6
T6-
The value
value7
T7-
The value
value8
T8-
The value
Returns
- int
-
The int
Type Parameters
T1
-
The
T2
-
The
T3
-
The
T4
-
The
T5
-
The
T6
-
The
T7
-
The
T8
-
The
GenerateGlobalSeed()
Generates the global seed
private static uint GenerateGlobalSeed()
Returns
- uint
-
The uint
Initialize(out uint, out uint, out uint, out uint)
Initializes the v 1
private static void Initialize(out uint v1, out uint v2, out uint v3, out uint v4)
Parameters
MixEmptyState()
Mixes the empty state
private static uint MixEmptyState()
Returns
- uint
-
The uint
MixFinal(uint)
Mixes the final using the specified hash
private static uint MixFinal(uint hash)
Parameters
hash
uint-
The hash
Returns
- uint
-
The hash
MixState(uint, uint, uint, uint)
Mixes the state using the specified v 1
private static uint MixState(uint v1, uint v2, uint v3, uint v4)
Parameters
Returns
- uint
-
The uint
QueueRound(uint, uint)
Queues the round using the specified hash
private static uint QueueRound(uint hash, uint queuedValue)
Parameters
Returns
- uint
-
The uint
RotateLeft(uint, int)
Rotates the left using the specified value
public static uint RotateLeft(uint value, int offset)
Parameters
Returns
- uint
-
The uint
Round(uint, uint)
Rounds the hash
private static uint Round(uint hash, uint input)
Parameters
Returns
- uint
-
The uint
ToHashCode()
Returns the hash code
public int ToHashCode()
Returns
- int
-
The int