wolffd@0: function joint = combine_marginals_into_joint(marginalsT, hnodes, ns) wolffd@0: wolffd@0: jointT = dpot(hnodes, ns(hnodes)); wolffd@0: for i=hnodes(:)' wolffd@0: jointT = multiply_by_pot(jointT, marginalsT{i}); wolffd@0: end wolffd@0: m = pot_to_marginal(jointT); wolffd@0: joint = m.T(:);