about summary refs log tree commit diff
path: root/sourcecodes/bnt-master/BNT/inference/static/@belprop_mrf2_inf_engine/marginal_nodes.m
blob: c51ed6666449a65d70bc25cc1718f6a1bd37a6f9 (plain)
1
2
3
4
5
6
7
8
9
10
function marginal = marginal_nodes(engine, query)
% MARGINAL_NODES Compute the marginal on the specified query nodes (belprop)
% marginal = marginal_nodes(engine, query)
%
% query must be a single node

if length(query)>1
  error('can only handle single node marginals')
end
marginal = engine.bel{query};