A compact patricia trie that uses strings as keys.
This data structure can be very space-efficient when asked to store a large numbers of keys with common prefixes; maximum efficiency is achieved when the associated values are all (or almost all) null.
- Template Parameters
-
TValue | Type of value associated with each key. |
|
| CPStringTrie (CPStringTrie< TValue > clone) |
|
new int | CountMemoryUsage (int sizeOfT) |
|
void | Add (string key, TValue value) |
|
bool | TryAdd (string key, TValue value) |
| Adds the specified key-value pair only if the specified key is not already present in the trie. More...
|
|
bool | TryAdd (string key, ref TValue value) |
| Adds the specified key-value pair only if the specified key is not already present in the trie. More...
|
|
bool | ContainsKey (string key) |
|
bool | Remove (string key) |
|
bool | Remove (string key, ref TValue value) |
|
bool | TryGetValue (string key, out TValue value) |
|
void | Add (KeyValuePair< string, TValue > item) |
|
new void | Clear () |
|
bool | Contains (KeyValuePair< string, TValue > item) |
|
void | CopyTo (KeyValuePair< string, TValue >[] array, int arrayIndex) |
|
bool | Remove (KeyValuePair< string, TValue > item) |
|
Enumerator | GetEnumerator () |
|
Enumerator | FindAtLeast (string key) |
|
Enumerator | FindExact (string key) |
|
bool | Find (string key, out Enumerator e) |
|
CPStringTrie< TValue > | Clone () |
|
| CPTrie (CPTrie< T > copy) |
|
|
bool | Find (ref KeyWalker key, CPEnumerator< T > e) |
|
bool | Find (ref KeyWalker key, ref T value) |
| Retrieves the value associated with the specified key; does nothing if the key does not exist. More...
|
|
bool | ContainsKey (ref KeyWalker key) |
|
bool | Set (ref KeyWalker key, ref T value, CPMode mode) |
| Associates the specified value with the specified key. More...
|
|
bool | Remove (ref KeyWalker key, ref T value) |
| Removes the specified key and associated value. More...
|
|
bool | Remove (ref KeyWalker key) |
|
void | Clear () |
|
int | CountMemoryUsage (int sizeOfT) |
| Calculates the memory usage of this object, assuming a 32-bit architecture. More...
|
|
static StringBuilder | BytesToStringBuilder (byte[] key, int keyLength) |
|
static Comparer< T > | DefaultComparer |
|