forward_sp function

Forward algorithm for hidden semi-Markov models with periodically varying transition probability matrices