📄 initialindexpop.m
字号:
function [pop] = initialIndexPop(s,popSize)
% from s to initial a Pop
%the pop's column is add one for fitness
solSize=size(s,2);
pop=zeros(popSize,solSize);
for n=1:popSize
pop(n,:)=randArray(s);
%pop(n,:)=s;
end
tm=zeros(popSize,1);
pop=[pop tm];
%make out the fitness of every sol in pop
for n=1:popSize
[pop(n,:) pop(n,solSize+1)]=routFitness(pop(n,:),0);
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -