⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 set_all_potentials.m.svn-base

📁 Probabilistic graphical models in matlab.
💻 SVN-BASE
字号:
function [model] = set_all_potentials(model, method, pot_mat)if (strcmp (model.type, 'pairwise-discrete' ) )       if (strcmp (method, 'all_random' ) )        model.all_potentials_code = '(all-random)';    end        if (strcmp (method, 'one_random_strongly_diagonal_uniform_noise' ) )        model.all_potentials_code = strcat('(one-random-strongly-diagonal-uniform-noise) (', strcat( num2str(pot_mat), ')')) ;    end    if (strcmp (method, 'one_uniform_strongly_diagonal_uniform_noise' ) )        model.all_potentials_code = strcat('(one-uniform-strongly-diagonal-uniform-noise) (', strcat( num2str(pot_mat), ')')) ;    end    if (strcmp (method, 'one_random_strongly_diagonal_random_noise' ) )        model.all_potentials_code = strcat('(one-random-strongly-diagonal-random-noise) (', strcat( num2str(pot_mat), ')')) ;    end    if (strcmp (method, 'all_random_strongly_diagonal_uniform_noise' ) )        model.all_potentials_code = strcat('(all-random-strongly-diagonal-uniform-noise) (', strcat( num2str(pot_mat), ')')) ;    end    if (strcmp (method, 'normal' ) )        model.all_potentials_code = '(normal) (';        [m,n] = size(pot_mat);        for j = 1: m            for k = 1: n                model.all_potentials_code =  [ model.all_potentials_code ' ' num2str(pot_mat(j,k)) ];            end        end        model.all_potentials_code =  strcat( model.all_potentials_code, ') ');    end    model.all_potentials = 1;    %     [m,n] = size(model.link_matrix);    %    %     for i=1:m    %    %         for j=1:n    %    %             if (model.link_matrix(i,j) == 1)    %    %                 model = set_potential(model, i, j, pot_mat);    %    %             end    %    %         end    %    %     endendif (strcmp (model.type, 'factorgraph-discrete' ) )    error ('set_all_potentials(...) can not be used with a factor Graph.');end

⌨️ 快捷键说明

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