To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Revision:

root / _FullBNT / BNT / CPDs / @generic_CPD / Old / CPD_to_dpots.m @ 8:b5b38998ef3b

History | View | Annotate | Download (586 Bytes)

1
function pots = CPD_to_dpots(CPD, domain, ns, cnodes, evidence)
2
% CPD_TO_DPOTS Convert the CPD to several discrete potentials, for different instantiations (generic)
3
% pots = CPD_to_dpots(CPD, domain, ns, cnodes, evidence)
4
%
5
% domain(:,i) is the domain of the i'th instantiation of CPD.
6
% node_sizes(i) is the size of node i.
7
% cnodes = all the cts nodes
8
% evidence{i} is the evidence on the i'th node.
9
%
10
% This just calls CPD_to_dpot for each domain.
11
    
12
nCPDs = size(domain,2);
13
pots = cell(1,nCPDs);
14
for i=1:nCPDs
15
  pots{i} = CPD_to_dpot(CPD, domain(:,i), ns, cnodes, evidence);
16
end