Struct bio::alphabets::RankTransform [] [src]

pub struct RankTransform {
    pub ranks: SymbolRanks,
}

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

Fields

Methods

impl RankTransform
[src]

[src]

Construct a new RankTransform.

[src]

Get the rank of symbol a.

[src]

Transform a given text.

[src]

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.

[src]

Restore alphabet from transform.