add_ndx.m

来自「麻省理工学院的人工智能工具箱,很珍贵,希望对大家有用!」· M 代码 · 共 29 行

M
29
字号
function id = add_ndx(bigdom, smalldom, ns, ndx_type)% ADD_NDX Possibly add new indexes to the global cache% id = add_ndx(bigdom, smalldom, ns, ndx_type)%% ns is the node sizes of all nodes% id is the identifier for the cache entry, new or existing.global SD_NDX SD_UID_GEN     B_NDX B_UID_GEN     D_NDX D_UID_GEN   switch ndx_type case 'SD',   [id, newid, SD_UID_GEN] = mk_uid(SD_UID_GEN, {ns(bigdom), find_equiv_posns(smalldom, bigdom)});  if newid    [ndx.small, ndx.diff] = mk_ndxSD(bigdom, smalldom, ns);    SD_NDX{id} = ndx;  end case 'D',  [id, newid, D_UID_GEN] = mk_uid(D_UID_GEN, {ns(bigdom), find_equiv_posns(smalldom, bigdom)});  if newid    D_NDX{id} = mk_ndxD(bigdom, smalldom, ns);     end case 'B',  [id, newid, B_UID_GEN] = mk_uid(B_UID_GEN, {ns(bigdom), find_equiv_posns(smalldom, bigdom)});  if newid    B_NDX{id} = mk_ndxB(bigdom, smalldom, ns);     end otherwise, error(['unrecognized ndx type ' ndx_type])end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?