[][src]Function hotsax::dim_reduction::sax

pub fn sax<N>(data: &Vec<N>, word_size: usize, alpha: usize) -> String where
    N: Float

Returns a sax word representation of the original list.

word_size determines the length of the word, and alpha represents the alphabet size.

If word_size is the same as data's length, then the paa step is skipped. Keep in mind that if you want to avoid using the piecewise approximation, you can do this:

This example is not tested
sax(&data, data.len(), alpha);

Panics

  • if alpha is not between 3 and 7. Higher numbers can only be supported if the static variable BREAKPOINTS is updated.
  • if word_size is larger than data.len()