Legend:
Library
Module
Module type
Parameter
Class
Class type
Prefix trie interface.
Trie is a mutable table that can be seen as a specialized form of a hash table.
Use the Trie.Make functor to create modules that implement this signature. Some modules also provide an implementation of this signature under a Trie name, e.g., Bitvector.Trie, Bil.Trie, Insn.Trie, etc. See also a Trie.String module below, that is a specialized implementation of a trie data structure with string keys.
type'a t
trie can store arbitrary data
includesig ... end
val t_of_sexp : (Sexplib.Sexp.t ->'a)->Sexplib.Sexp.t ->'at
val sexp_of_t : ('a->Sexplib.Sexp.t)->'at->Sexplib.Sexp.t
val bin_t :
'aCore_kernel.Std.Bin_prot.Type_class.t->'atCore_kernel.Std.Bin_prot.Type_class.t
val bin_read_t :
'aCore_kernel.Std.Bin_prot.Read.reader->'atCore_kernel.Std.Bin_prot.Read.reader
val __bin_read_t__ :
'aCore_kernel.Std.Bin_prot.Read.reader->(int ->'at)Core_kernel.Std.Bin_prot.Read.reader
val bin_reader_t :
'aCore_kernel.Std.Bin_prot.Type_class.reader->'atCore_kernel.Std.Bin_prot.Type_class.reader
val bin_size_t :
'aCore_kernel.Std.Bin_prot.Size.sizer->'atCore_kernel.Std.Bin_prot.Size.sizer
val bin_write_t :
'aCore_kernel.Std.Bin_prot.Write.writer->'atCore_kernel.Std.Bin_prot.Write.writer
val bin_writer_t :
'aCore_kernel.Std.Bin_prot.Type_class.writer->'atCore_kernel.Std.Bin_prot.Type_class.writer
add trie ~key ~data associates data with key. If trie already has some value associated with key, then the value will be overwritten (rebound)
val change : 'at->key->('a option->'a option)-> unit
change trie key f if trie has data associated with key then f will be called with Some data, otherwise it will be called with None. If f returns None then there will be no data associated with key, if f returns Some thing, then thing will be associated with key
val walk : 'at->key->init:'b->f:('b->'a option->'b)->'b
walk trie key ~init ~f walks down the tree starting from the root and ending with the last token of the key. Function f is fold over values associated with all substrings of the key, starting from a zero substring.
longest_match trie key find a value associated with a longest substring of key. Returns a pair - a length of matched key and the value, associated with that key.