Template Function ADS::countSegmentations(const S&, const std::vector<S>&)

Function Documentation

template<class S>
std::uint64_t ADS::countSegmentations(const S &X, const std::vector<S> &words)

the number of ways of writing X as a sequence of the words, modulo 2^64; a word repeated in the list counts once for each copy; 1 for the empty X

Pre:

no word is empty