Class HashDictionary<K, V>
A generic dictionary class based on a hash set class C5.HashSet`1.
Inheritance
Implements
Inherited Members
Namespace: Lucene.Net.Support.C5
Assembly: Lucene.Net.dll
Syntax
public class HashDictionary<K, V> : DictionaryBase<K, V>, IDictionary<K, V>, ICollectionValue<KeyValuePair<K, V>>, IEnumerable<KeyValuePair<K, V>>, IEnumerable, IShowable, IFormattable
Type Parameters
Name | Description |
---|---|
K | |
V |
Constructors
| Improve this Doc View SourceHashDictionary(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(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(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, 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, 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 |