Util
object Util
Static helper methods.
Types
Link copied to clipboard
open class TopNSearcher<T>(fst: FST<T>, topN: Int, maxQueueDepth: Int, comparator: Comparator<T>, pathComparator: Comparator<Util.FSTPath<T>>)
Utility class to find top N shortest paths from start point(s).
Link copied to clipboard
Holds the results for a top N search using TopNSearcher
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <T> shortestPaths(fst: FST<T>, fromNode: FST.Arc<T>, startOutput: T, comparator: Comparator<T>, topN: Int, allowEmptyString: Boolean): Util.TopResults<T>
Starting from node, find the top N min cost completions to a final node.
Link copied to clipboard
Just converts IntsRef to BytesRef; you must ensure the int values fit into a byte.
Link copied to clipboard
Just takes unsigned byte values from the BytesRef and converts into an IntsRef.
Link copied to clipboard
Just maps each UTF16 unit (char) to the ints in an IntsRef.
Link copied to clipboard
Decodes the Unicode codepoints from the provided CharSequence and places them in the provided scratch IntsRef, which must not be null, returning it.
Decodes the Unicode codepoints from the provided char[] and places them in the provided scratch IntsRef, which must not be null, returning it.