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

📄 putmoveatpos.m

📁 UMDA. a kind of estimation of distribution algorithm , which is the improvement of genetic algorithm
💻 M
字号:
function[Pos] = PutMoveAtPos(Pos,pos,mov)% PutMoveAtPos updates the lattice given a mov% INPUTS% sizeChain: Size of the subchain inspected% pos: Position of the residue in the sequence  % mov: Corresponding move (left,front,right)% OUTPUTS% Pos: Final configuration of the sequence if (pos<3)  return;endi = pos; if(Pos(i-1,2)==Pos(i-2,2))  if (mov==0)            %UP MOVE   Pos(i,1) = Pos(i-1,1);     Pos(i,2) = Pos(i-1,2) + (Pos(i-1,1)-Pos(i-2,1));  elseif (mov==1)        %FORWARD MOVE    Pos(i,1) = Pos(i-1,1) + (Pos(i-1,1)-Pos(i-2,1));     Pos(i,2) = Pos(i-1,2);  else                         %DOWN MOVE   Pos(i,1) = Pos(i-1,1);     Pos(i,2) = Pos(i-1,2) - (Pos(i-1,1)-Pos(i-2,1));  end  endif (Pos(i-1,1)==Pos(i-2,1))  if (mov==0)            %UP MOVE    Pos(i,2) = Pos(i-1,2);      Pos(i,1) = Pos(i-1,1) -  (Pos(i-1,2)-Pos(i-2,2));    elseif (mov==1)        %FORWARD MOVE     Pos(i,2) = Pos(i-1,2) +  (Pos(i-1,2)-Pos(i-2,2));      Pos(i,1) = Pos(i-1,1);  else                         %DOWN MOVE    Pos(i,2) = Pos(i-1,2);      Pos(i,1) = Pos(i-1,1) + (Pos(i-1,2)-Pos(i-2,2));  end end% Last version 10/09/2005. Roberto Santana (rsantana@si.ehu.es) 

⌨️ 快捷键说明

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