Added multifor::reset() and wrote index.h/cpp unit tests
[libdai.git] / matlab / dai.m
1 % [logZ,q,md] = dai (psi, method, opts)
2 %
3 % INPUT: psi = linear cell array containing the factors
4 % psi{i} should be a structure with a Member field
5 % and a P field, like a CPTAB).
6 % method = name of the method (see README)
7 % opts = string of options (see README)
8 %
9 % OUTPUT: logZ = approximation of the logarithm of the partition sum.
10 % q = linear cell array containing all final beliefs.
11 % md = maxdiff (final linf-dist between new and old single node beliefs).