pub struct RankTransform {
    pub ranks: SymbolRanks,
}
Expand description

Tools based on transforming the alphabet symbols to their lexicographical ranks.

Fields

ranks: SymbolRanks

Implementations

Construct a new RankTransform.

Get the rank of symbol a.

Transform a given text.

Iterate over q-grams (substrings of length q) of given text. The q-grams are encoded as usize by storing the symbol ranks in log2(|A|) bits (with |A| being the alphabet size).

If q is larger than usize::BITS / log2(|A|), this method fails with an assertion.

Restore alphabet from transform.

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.