WIP implementing max-product algorithm for veterbi like inference.