![]() |
fCraft
0.636
Custom Minecraft Server
|
Specialized data structure for partial-matching of large sparse sets of words. Used as a searchable index of players for PlayerDB. More...


Classes | |
| class | TrieKeyCollection |
| class | TrieSubset |
| A subset of trie's key/value pairs that start with a certain prefix. More... | |
| class | TrieValueCollection |
Public Member Functions | |
| Trie () | |
| Creates a new empty trie. | |
| Trie ([NotNull] IEnumerable< KeyValuePair< string, T >> dictionary) | |
| Creates a new trie from an existing dictionary. Values are shallowly copied. | |
| bool | ContainsValue ([NotNull] T value) |
| Checks whether the trie contains a given value. This method uses the value enumerator and runs in O(n). | |
| bool | GetOneMatch ([NotNull] string keyPart, out T payload) |
| Searches for payloads with keys that start with keyPart, returning just one or none of the matches. | |
| List< T > | GetList ([NotNull] string keyPart, int limit) |
| Finds a list of payloads with keys that start with keyPart, up to a specified limit. Autocompletes. | |
| bool | Add ([NotNull] string key,[NotNull] T payload, bool overwriteOnDuplicate) |
| Adds a new object by key. | |
| T | Get ([NotNull] string key) |
| Get payload for an exact key (no autocompletion). | |
| IEnumerable< T > | ValuesStartingWith (string prefix) |
| Finds a subset of values whose keys start with a given prefix. | |
| IEnumerable< string > | KeysStartingWith (string prefix) |
| Finds a subset of keys that start with a given prefix. | |
| IEnumerable< KeyValuePair < string, T > > | StartingWith (string prefix) |
| Finds a subset of key/value pairs that start with a given prefix. | |
| void | Add (string key, T payload) |
| Adds a new object by key. If an entry for this key already exists, it is NOT overwritten. | |
| bool | TryGetValue (string key, out T result) |
| Tries to get a value by full key. | |
| bool | ContainsKey (string key) |
| Checks whether the trie contains a given full key. | |
| bool | Remove (string key) |
| Removes an entry by key. | |
| void | Clear () |
| Removes all keys/values from the trie, making it empty. | |
| IEnumerator< KeyValuePair < string, T > > | GetEnumerator () |
| void | Add (KeyValuePair< string, T > pair) |
| bool | Contains (KeyValuePair< string, T > pair) |
| bool | Remove (KeyValuePair< string, T > pair) |
| void | CopyTo (KeyValuePair< string, T >[] pairArray, int index) |
| void | CopyTo (Array pairArray, int index) |
| object | Clone () |
Properties | |
| ICollection< string > | Keys [get] |
| ICollection< T > | Values [get] |
| T | this[string key] [get, set] |
| bool | IsFixedSize [get] |
| int | Count [get, set] |
| bool | IsReadOnly [get] |
| bool | IsSynchronized [get] |
| object | SyncRoot [get] |
Specialized data structure for partial-matching of large sparse sets of words. Used as a searchable index of players for PlayerDB.
| T | Payload type (reference types only). |
| T | : | class |
| fCraft.Trie< T >.Trie | ( | ) |
Creates a new empty trie.
| fCraft.Trie< T >.Trie | ( | [NotNull] IEnumerable< KeyValuePair< string, T >> | dictionary | ) |
Creates a new trie from an existing dictionary. Values are shallowly copied.
| dictionary | Source dictionary to copy from. |
| bool fCraft.Trie< T >.Add | ( | [NotNull] string | key, |
| [NotNull] T | payload, | ||
| bool | overwriteOnDuplicate | ||
| ) |
Adds a new object by key.
| key | Full key. |
| payload | Object associated with the key. |
| overwriteOnDuplicate | Whether to overwrite the value in case this key already exists. |
| void fCraft.Trie< T >.Add | ( | string | key, |
| T | payload | ||
| ) |
Adds a new object by key. If an entry for this key already exists, it is NOT overwritten.
| key | Full key. |
| payload | Object associated with the key. |
| void fCraft.Trie< T >.Add | ( | KeyValuePair< string, T > | pair | ) |
| void fCraft.Trie< T >.Clear | ( | ) |
Removes all keys/values from the trie, making it empty.
| object fCraft.Trie< T >.Clone | ( | ) |
| bool fCraft.Trie< T >.Contains | ( | KeyValuePair< string, T > | pair | ) |
| bool fCraft.Trie< T >.ContainsKey | ( | string | key | ) |
Checks whether the trie contains a given full key.
| key | Full key to search for. |
| bool fCraft.Trie< T >.ContainsValue | ( | [NotNull] T | value | ) |
Checks whether the trie contains a given value. This method uses the value enumerator and runs in O(n).
| value | Value to search for. |
| void fCraft.Trie< T >.CopyTo | ( | KeyValuePair< string, T >[] | pairArray, |
| int | index | ||
| ) |
| void fCraft.Trie< T >.CopyTo | ( | Array | pairArray, |
| int | index | ||
| ) |
| T fCraft.Trie< T >.Get | ( | [NotNull] string | key | ) |
Get payload for an exact key (no autocompletion).
| key | Full key. |
| IEnumerator<KeyValuePair<string, T> > fCraft.Trie< T >.GetEnumerator | ( | ) |
| List<T> fCraft.Trie< T >.GetList | ( | [NotNull] string | keyPart, |
| int | limit | ||
| ) |
Finds a list of payloads with keys that start with keyPart, up to a specified limit. Autocompletes.
| keyPart | Partial or full key. |
| limit | Limit on the number of payloads to find/return. |
| bool fCraft.Trie< T >.GetOneMatch | ( | [NotNull] string | keyPart, |
| out T | payload | ||
| ) |
Searches for payloads with keys that start with keyPart, returning just one or none of the matches.
| keyPart | Partial or full key. |
| payload | Payload object to output (will be set to null if no single match was found). |
| IEnumerable<string> fCraft.Trie< T >.KeysStartingWith | ( | string | prefix | ) |
Finds a subset of keys that start with a given prefix.
| prefix | Key prefix. |
| bool fCraft.Trie< T >.Remove | ( | string | key | ) |
Removes an entry by key.
| key | Key for the entry to remove. |
| bool fCraft.Trie< T >.Remove | ( | KeyValuePair< string, T > | pair | ) |
| IEnumerable<KeyValuePair<string, T> > fCraft.Trie< T >.StartingWith | ( | string | prefix | ) |
Finds a subset of key/value pairs that start with a given prefix.
| prefix | Key prefix. |
| bool fCraft.Trie< T >.TryGetValue | ( | string | key, |
| out T | result | ||
| ) |
Tries to get a value by full key.
| key | Full key to search for. |
| result | Result. |
| IEnumerable<T> fCraft.Trie< T >.ValuesStartingWith | ( | string | prefix | ) |
Finds a subset of values whose keys start with a given prefix.
| prefix | Key prefix. |
|
getset |
|
get |
|
get |
|
get |
|
get |
|
get |
|
getset |
|
get |
1.8.2