TernaryTree

Ternary search tree.

The upstream implementation stores the keys in compact ternary-tree arrays. This common-code port keeps the public surface and the behavior needed by the hyphenation package, while backing lookup with a map so it remains platform agnostic and easy to verify.

Inheritors

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open fun balance()
Link copied to clipboard
open override fun clone(): TernaryTree
Link copied to clipboard
open fun find(key: String): Int
open fun find(key: CharArray, start: Int): Int
Link copied to clipboard
open fun insert(key: String, val: Char)
open fun insert(key: CharArray, start: Int, val: Char)
Link copied to clipboard
open fun knows(key: String): Boolean
Link copied to clipboard
open fun printStats(out: Any)
Link copied to clipboard
open fun trimToSize()