Merge pull request #336 from homul/master

Computing variable marginals with smoothing-based algorithms added