SymbolSet
A SymbolSet is an alternate implementation of a HashSet. It is implemented as a hashtable with external linking, that uses primes as the table size in order to reduce the danger of funneling.
Constructors
Constructor | Description |
new()
Signature: unit -> unit
|
Create a SymbolSet that autmatically grows and shrinks as necessary. |
new(initialCapacity)
Signature: initialCapacity:int -> unit
|
Create a SymbolSet that autmatically grows and shrinks as necessary, but also specify an initial capacity. |
new(items)
Signature: items:IEnumerable<Symbol> -> unit
|
Create a SymbolSet and initialize it to contain the supplied items. |
new(items)
Signature: items:IEnumerable<string> -> unit
|
Create a SymbolSet and initialize to contain the supplied items. Note hat this incurs the overhead of converting all string keys to symbols. |
Instance members
Instance member | Description |
Add(key)
Signature: key:Symbol -> bool
Modifiers: abstract |
Add the item with the supplied key to the SymbolSet. |
Add(key)
Signature: key:string -> unit
|
Adds the supplied item to the SymbolSet. Note that this incurs the overhead of converting the string key to a symbol. |
AddObject(objkey)
Signature: objkey:obj -> bool
Modifiers: abstract |
Add the item with supplied key both supplied as generic objects, to the SymbolSet. Note that the supplied key and value are cast to the concrete type of the keys and values used in the SymbolSet and this will fail if they are of different types. |
AddRange(keys)
Signature: keys:IEnumerable<Symbol> -> unit
|
Add the supplied keys to the SymbolSet. |
AsConcurrent()
Signature: unit -> ConcurrentSymbolSet
|
Retuns a concurrent wrapper around the SymbolSet to enable concurrent modifications. |
Clear()
Signature: unit -> unit
Modifiers: abstract |
Remove all items. Capacity remains unchanged. |
Contains(key)
Signature: key:Symbol -> bool
Modifiers: abstract |
Returns true if the SymbolSet contains the item with the supplied key. |
CopyTo(array, index)
Signature: (array:Symbol [] * index:int) -> unit
Modifiers: abstract |
Copies all keys in the dictionary to the supplied array starting at the supplied index. |
CopyTo(array, index)
Signature: (array:Array * index:int) -> unit
Modifiers: abstract |
Copy items into supplied array starting at supplied index. |
Count
Signature: int
Modifiers: abstract |
Returns the number of items currently contained in the SymbolSet. |
GetEnumerator()
Signature: unit -> IEnumerator<Symbol>
Modifiers: abstract |
|
IsReadOnly
Signature: bool
Modifiers: abstract |
Always returns false. Part of the ICollection implementation. |
IsSynchronized
Signature: bool
Modifiers: abstract |
|
Items
Signature: IEnumerable<Symbol>
Modifiers: abstract |
|
Keys
Signature: IEnumerable<Symbol>
|
Returns all keys in the dictionary. |
KeyType
Signature: Type
Modifiers: abstract |
|
LongCount
Signature: int64
Modifiers: abstract |
Returns the number of items currently contained in the SymbolSet as long. |
MaxFillFactor()
Signature: unit -> unit
|
Setting the maximal fill factor makes it possible to fine-tune the performance for certain applications. Normally this should not be necessary. |
MinFillFactor()
Signature: unit -> unit
|
Setting the minimal fill factor makes it possible to influence the shrinking behaviour of the SymbolSet. Normally this should be set to a quater of the maximal fill factor. In order to completely prevent shrinking it can also be set to 0.0f. |
Objects
Signature: IEnumerable<obj>
Modifiers: abstract |
|
Remove(key)
Signature: key:Symbol -> bool
Modifiers: abstract |
Remove the item with the supplied key from the SymbolSet. Returns true if the value was removed. |
SyncRoot
Signature: obj
Modifiers: abstract |
|
ToArray()
Signature: unit -> Symbol []
|
Returns all keys in the dictionary as an array. |
TryAdd(key)
Signature: key:Symbol -> bool
|
Add the item with the supplied key to the SymbolSet. |
TryRemove(key)
Signature: key:Symbol -> bool
|
Try to reomve the item with the supplied key. If multipe entries have the same key, the one that was inserted last is removed. Returns true if the item was found. |