📄 harmirton.m
字号:
function [ chain ] = harmirton( m ,n )%HARMIRTON Summary of this function goes here% Detailed explanation goes herechain=[];mask=zeros(m,n);queueMask=0;queueStructure{1}.tmpNode=[];currentQueuePos=1;IsLoop=0;while(1) if queueMask==0 tmpNode=findldNode(mask); if isempty(tmpNode) if size(chain,1)>1 & currentQueuePos>1 popQueue; else chain=[]; break; end end end queueMask=0; if (size(tmpNode,2)==3) [chain,mask,IsLoop]=updateChain(chain,mask,tmpNode); else pushQueue; [chain,mask,IsLoop]=updateChain(chain,mask,tmpNode(1,1:3)); end if (IsLoop==1) IsLoop=0; if (currentQueuePos>1) popQueue; queueMask=1; else chain=[]; break; end else if IsLoop==2 break; end end end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -