Template Function ADS::arithmeticInterval

Function Documentation

template<class C>
std::pair<Rational, Rational> ADS::arithmeticInterval(std::span<const C> text, const std::map<C, Rational> &prob)

the interval [ l , l + s ) of text, as the pair ( l , s )

Pre:

the probabilities positive with sum 1, each symbol of text in prob