pub fn triplet_indices(
triplet: &[u8; 3],
) -> Result<[usize; 3], MatrixLookupError>Expand description
Decodes a triplet into its three NucMatrix indices.
Several matrices are consulted for the same triplet on every base, so the ASCII decode is done once here and the resulting indices reused, rather than re-decoding per matrix. The result is a fixed-size array, so no allocation is involved.
ยงErrors
Returns a MatrixLookupError naming the offending base if any of the three is not
A, C, G, or T.