an class="keyword">end</span>
</pre><pre class="codeoutput">jtree : 1.41736 seconds
</pre><h2>infer single marginals using libdai's Jtree code<a name="7"></a></h2><pre class="codeinput"><span class="keyword">if</span> libdaiInstalled
    tic;
    dgm        = hmmToDgm(model, T, <span class="string">'infEngine'</span>, <span class="string">'libdaiJtree'</span>);
    margLD     = dgmInferNodes(dgm, <span class="string">'localev'</span>, X);
    gammaLD = tfMarg2Mat(margLD);
    t = toc;
    fprintf(<span clas