⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mutation.m

📁 旅行商问题的IAGA算法。好象很不错的程序。matlab编写的
💻 M
字号:
function Gpath=Mutation(Gpath,Pm,Popsize)
%位对调变异
[row,col]=size(Gpath);
for i=1:Popsize
    for j=1:col
        tempPm=rand(1);
        if(tempPm<Pm)
            temp=randperm(col-j+1);
            Gpath(i,j)=temp(1);
        end
    end
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -