📄 next_case.m.svn-base
字号:
function [cas, continu] = next_case(cas, node_sizes, rev)% [cas, continu] = next_case(cas, node_sizes, rev)%% rev is optionnal :% if ns == [2 2 2] then% if rev = 0 or is not present% [1 1 1] --> [2 1 1] --> [1 2 1] --> ...%% if rev ~= 0% [1 1 1] --> [1 1 2] --> [1 2 1] --> ...%if nargin<3, rev=0; endN=length(node_sizes);if length(cas)~=N, error('sizes must be the same'); endif N==0, continu = 0;elseif N==1, if cas >= node_sizes, continu = 0; else cas = cas+1; continu =1; endelseif N>=2 if all(cas>=node_sizes)~=0, continu=0; else continu=1; goon=1; if ~rev n=1; cas(n)=cas(n)+1; while goon if cas(n)>node_sizes(n) & n<N cas(n)=1; cas(n+1)=cas(n+1)+1; else goon=0; end n=n+1; end else n=N; cas(n)=cas(n)+1; while goon if cas(n)>node_sizes(n) & n>1 cas(n)=1; cas(n-1)=cas(n-1)+1; else goon=0; end n=n-1; end end endend
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -