s="string">'libdai: %g seconds\n'</span>, t);
    assert(approxeq(gamma, gammaLD));
<span class="keyword">end</span>
</pre><h2>Compare map assignments<a name="8"></a></h2><pre class="codeinput">mapDGM = dgmMap(dgm, <span class="string">'localev'</span>, X);
mapHMM = hmmMap(model, X);
assert(isequal(mapDGM, mapHMM));
</pre><p class="footer"><br>
      Published with MATLAB&reg; 7.12<br></p></div><!--
##### SOURCE BEGIN #####
%% Compare different inference methods for an HMM
%
%% Create a random hmm model

% 