📄 minwdegree.m
字号:
function index = minwdegree(G,J,a,b)% index = minlex(G,J,m)%% Find minimum polynomial with respect to (a,b) weighted degree.% Arguments are a list of polynomials G, indices to search over J% and parameter m. The polynomials are assumed to be in the form%% G(x,y,index)%% so that G(:,:,j) is the j-th polynomial in the list.winval = 1e6;winlocI = 1e6;winlocJ = 1e6;for ind1=J g = reshape(G(:,:,ind1),size(G,1),size(G,2)); [Is, Js, gij] = find(g~=0); wts = a*(Is-1) + b*(Js-1); % make sure to get 0 term [val, k] = max(wts); if (val < winval) winval = val; winlocI = Is(k); winlocJ = ind1; elseif (val == winval) % break ties with lexicographic if Is(k) < winlocI winval = val; winlocI = Is(k); winlocJ = ind1; end endendindex = winlocJ;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -