Implementation of Hidden Markov Model functions in C