Typeclass to capture translations between HMMs and analogous structures, application to Markov chains.