Struct tongrams::SimpleTrieArray
source ·
[−]pub struct SimpleTrieArray { /* private fields */ }
Expand description
Simple implementation of TrieArray
with Vec<usize>
.
Trait Implementations
Returns the “default value” for a type. Read more
Builds a TrieArray
from sequences of token ids and pointers.
Serializes the data structure into the writer.
Deserializes the data structure from the reader.
Gets the number of bytes to serialize the data structure.
Gets breakdowns of memory usages for components.
Finds the position i
such that token_id(i) = id
and i in range(pos)
.
Gets the number of tokens stored.
Gets the number of pointers stored.