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

📄 bipart_perturb.m

📁 模拟退火算法实现
💻 M
字号:
function W = bipart_perturb(X,W,Ea,T)
% W = bipart_perturb(X,W,Ea,T)
% Method for graphbipart example supplied with SA Tools.
% See http://www.frostconcepts.com/software for information on SA Tools.
%
%   W = bipart_perturb(X,W,Ea,T) ;
%
%   X = {N, A}
%       N = # of vertices.
%       A = Adjacency matrix.
%   W = vector of +1, -1 partition of length N
%   Ea = (not used) average energy at current temperature.
%   T = (not used) current temperature
%
%   Flips the sign of a random element of W.
%
n = X{1} ;
i = 1 + floor(n*rand) ;
W(i) = -W(i) ;

⌨️ 快捷键说明

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