?? 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 + -