Markov Switching State Model C++ implementations