/// /** * # DynSDT Implementations * * Dynamic Score-Decomposed Tries* which solve the scored prefix completion problem. The C# version is the primary version at the moment. The preliminary TypeScript version in the main repo was created just to match the pseudocode from the paper to help verify the correctness of the pseudocode. The Zig version is still in-development. * * Paper: [validark.github.io/DynSDT](https://validark.github.io/DynSDT/), entitled *Heap-like Dynamic Score-Decomposed Tries for Top-k Autocomplete* * * Live Demo: [validark.github.io/DynSDT/demo](https://validark.github.io/DynSDT/demo/) * * Email autocomplete proof-of-concept: [validark.github.io/DynSDT/web-autocomplete](https://validark.github.io/DynSDT/web-autocomplete/) * - This uses another TypeScript implementation I made which supports aliasing so multiple names/emails can autocomplete to the same person. [The source code is available here](https://github.com/Validark/DynSDT/tree/paper/web-autocomplete). * * Paper & Demo website code: [/tree/paper](https://github.com/Validark/DynSDT/tree/paper) * * Give Validark a star [here](https://github.com/Validark/DynSDT)! * * Keywords: Query Autocomplete, QAC, type-ahead, ranked autosuggest, top-k autocomplete, trie decomposition, Dynamic Score-Decomposed Trie, trie autocomplete, Completion Trie. * * @author Validark * Adapted for Luau + RobloxTS by HowManySmall. */ export declare class DynamicScoreDecomposedTrie { readonly rootBranchPoints: [{ readonly lcp: number; node?: Node; }] | [BranchPoint]; getRoot(): Node | undefined; setRoot(node: Node): void; topCompletions(prefix: string, kndex: number): string[]; set(term: string, score: number): void; private setExactMatchFound; private insertionSortIntoList; private findNodeForLcp; private setScoreLocationFound; private mergeTwoSortedSubArrays; private findLocusForPrefix; private supplantNodeFromParent; private extractLcpsBelowThreshold; private insertionSortIndex; private insertionSortIndexUp; private insertionSortIndexDown; } interface Node extends BranchPoints { readonly key: string; score: number; } interface BranchPoint { lcp: number; node: Node; } interface BranchPoints { branchPoints: Array; } export {};