annotate toolboxes/FullBNT-1.0.7/bnt/CPDs/@generic_CPD/Old/CPD_to_dpots.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
rev   line source
wolffd@0 1 function pots = CPD_to_dpots(CPD, domain, ns, cnodes, evidence)
wolffd@0 2 % CPD_TO_DPOTS Convert the CPD to several discrete potentials, for different instantiations (generic)
wolffd@0 3 % pots = CPD_to_dpots(CPD, domain, ns, cnodes, evidence)
wolffd@0 4 %
wolffd@0 5 % domain(:,i) is the domain of the i'th instantiation of CPD.
wolffd@0 6 % node_sizes(i) is the size of node i.
wolffd@0 7 % cnodes = all the cts nodes
wolffd@0 8 % evidence{i} is the evidence on the i'th node.
wolffd@0 9 %
wolffd@0 10 % This just calls CPD_to_dpot for each domain.
wolffd@0 11
wolffd@0 12 nCPDs = size(domain,2);
wolffd@0 13 pots = cell(1,nCPDs);
wolffd@0 14 for i=1:nCPDs
wolffd@0 15 pots{i} = CPD_to_dpot(CPD, domain(:,i), ns, cnodes, evidence);
wolffd@0 16 end