mk_initial_pot.m
来自「麻省理工学院的人工智能工具箱,很珍贵,希望对大家有用!」· M 代码 · 共 30 行
M
30 行
function pot = mk_initial_pot(pot_type, dom, ns, cnodes, onodes)% MK_INITIAL_POT A "initial" potential is one which has not had any evidence entered into it.% pot = mk_initial_pot(pot_type, domain, node_sizes, cnodes, onodes)%% pot_type is one of 'd', 'g', 'cg' or 'u'% domain is the set of nodes to be included in the potential.% node_sizes(i) is the size of node i.switch pot_type case 'd', ns(onodes) = 1; pot = dpot(dom, ns(dom)); case 'u', ns(onodes) = 1; pot = upot(dom, ns(dom)); case 'g', ns(onodes) = 0; pot = cpot(dom, ns(dom)); case 'cg', dnodes = mysetdiff(1:length(ns), cnodes); ddom = myintersect(dnodes, dom); cdom = myintersect(cnodes, dom); dobs = myintersect(dnodes, onodes); cobs = myintersect(cnodes, onodes); ns(dobs) = 1; ns(cobs) = 0; pot = cgpot(ddom, cdom, ns);end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?