📄 delta.m
字号:
function[change] = delta(ct,mt,y,b)
% The delta function is the non-uniform distributions used by the nonUniform
% mutations. This function returns a change based on the current gen, the
% max gen and the amount of possible deviation.
%
% function[change] = delta(ct,mt,y,b)
% ct - current generation
% mt - maximum generation
% y - maximum amount of change, i.e. distance from parameter value to bounds
% b - shape parameter
r=ct/mt;
if(r>1)
r=.99;
% disp(sprintf('max gen %d < current gen %d setting ratio = 1',mt,ct));
end
change = y*(rand*(1-r))^b;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -