pub struct QGramIndex { /* private fields */ }
Expand description

A classical, flexible, q-gram index implementation.

Implementations

Create a new q-gram index. The q has to be smaller than b / log2(|A|) with |A| being the alphabet size and b the number bits with the usize data type.

Create a new q-gram index, only considering q-grams that occur at most max_count times. The q has to be smaller than b / log2(|A|) with |A| being the alphabet size and b the number bits with the usize data type.

The used q.

Return text positions with matching q-gram. Complexity O(1).

Return matches of the given pattern. Complexity O(m + k) for pattern of length m and k being the number of matching q-grams.

Return exact matches (substrings) of the given pattern. Complexity O(m + k) for pattern of length m and k being the number of matching q-grams.

Trait Implementations

Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.