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

📄 uncondirections.m

📁 遗传算法工具包
💻 M
字号:
function directions = uncondirections(pollmethod,x)
%UNCONDIRECTIONS: finds search vectors when no constraints are present.
%   POLLMETHOD: Poll method used to get search vectors.
%
% 	X: Point at which polling is done (usually the best point found so
% 	far).
% 	
% 	DIRECTIONS:  Returns direction vectors that positively span the tangent
% 	cone at the current iterate, with respect to bound and linear constraints.

%   Copyright 2004 The MathWorks, Inc.
%   $Revision: 1.8.4.1 $  $Date: 2004/04/06 01:09:55 $
%   Rakesh Kumar
vars = length(x);
Basis  = eye(vars);
% Form directions that forms the positive basis
if strcmpi(pollmethod,'positivebasisnp1')            %Minimal positive basis (n+1 vectors)
    directions = [-1*ones(vars,1) Basis];
elseif strcmpi(pollmethod,'positivebasis2n')         %Maximal positive basis (2n vectors)
    directions = [Basis -Basis];
else
    error('gads:UNCONDIRECTIONS:pollmethod','Invalid choice of Poll method.');
end

⌨️ 快捷键说明

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