comparison toolboxes/FullBNT-1.0.7/bnt/inference/static/@jtree_limid_inf_engine/enter_evidence.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 function engine = enter_evidence(engine, evidence, varargin)
2 % ENTER_EVIDENCE Add the specified evidence to the network (jtree_limid)
3 % engine = enter_evidence(engine, evidence, ...)
4 %
5 % evidence{i} = [] if if X(i) is hidden, and otherwise contains its observed value.
6 %
7 % The list below gives optional arguments [default value in brackets].
8 %
9 % exclude - list of nodes whose potential will not be included in the joint [ [] ]
10 %
11 % e.g., engine = enter_evidence(engine, ev, 'exclude', 3)
12
13 exclude = [];
14
15 if nargin >= 3
16 args = varargin;
17 nargs = length(args);
18 for i=1:2:nargs
19 switch args{i},
20 case 'exclude', exclude = args{i+1};
21 otherwise,
22 error(['invalid argument name ' args{i}]);
23 end
24 end
25 end
26
27 engine.exclude = exclude;
28 engine.evidence = evidence;