Constructor HashDictionary
HashDictionary(MemoryType)
Create a hash dictionary using a default equalityComparer for the keys. Initial capacity of internal table will be 16 entries and threshold for expansion is 66% fill.
Declaration
public HashDictionary(MemoryType memoryType = MemoryType.Normal)
Parameters
Type | Name | Description |
---|---|---|
MemoryType | memoryType |
HashDictionary(Collections.Generic.IEqualityComparer<K>, MemoryType)
Create a hash dictionary using a custom equalityComparer for the keys. Initial capacity of internal table will be 16 entries and threshold for expansion is 66% fill.
Declaration
public HashDictionary(Collections.Generic.IEqualityComparer<K> keyequalityComparer, MemoryType memoryType = MemoryType.Normal)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEqualityComparer<K> | keyequalityComparer | The external key equalitySCG.Comparer |
MemoryType | memoryType | The memory type of the enumerator used to iterate the collection |
HashDictionary(Int32, Double, Collections.Generic.IEqualityComparer<K>, MemoryType)
Create a hash dictionary using a custom equalityComparer and prescribing the initial size of the dictionary and a non-default threshold for internal table expansion.
Declaration
public HashDictionary(int capacity, double fill, Collections.Generic.IEqualityComparer<K> keyequalityComparer, MemoryType memoryType = MemoryType.Normal)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | capacity | The initial capacity. Will be rounded upwards to nearest power of 2, at least 16. |
System.Double | fill | The expansion threshold. Must be between 10% and 90%. |
System.Collections.Generic.IEqualityComparer<K> | keyequalityComparer | The external key equalitySCG.Comparer |
MemoryType | memoryType | The memory type of the enumerator used to iterate the collection |