?? generatem.m
字號:
function MemoryLab=GenerateM(path,ktyqhl,CM,TSPMatrix,MemoryLab)
%生成記憶庫
tempktyqhl=ktyqhl;
if(find(0==MemoryLab))
[rowindex,colindex]=find(0==MemoryLab);
for i=1:(CM/10)
[temp,rowindex1]=max(tempktyqhl);
tempktyqhl(rowindex1)=0;
MemoryLab(rowindex(i),:)=path(rowindex1,:);
end
else
FP=Fitness(MemoryLab,TSPMatrix);
for i=1:(CM/10)
[temp,rowindex]=min(FP);
FP(rowindex)=1;
[temp,rowindex1]=max(tempktyqhl);
tempktyqhl(rowindex1)=0;
MemoryLab(rowindex,:)=path(rowindex1,:);
end
end
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -