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

📄 delta.m

📁 王小平《遗传算法——理论、应用与软件实现》随书光盘
💻 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 + -