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

📄 tspswapmove.java

📁 一个java的tabu search算法框架
💻 JAVA
字号:
public class TSPSwapMove implements net.iharder.opents.Move {    public int pos1;    public int pos2;        private int   a; // Used repeatedly in swap operation    private int[] t; // Used repeatedly in swap operation        public TSPSwapMove(){}    public TSPSwapMove( int pos1, int pos2 )    {   this.pos1 = pos1;        this.pos2   = pos2;    }   // end constructor        /** Swap two customers in this solution. */    public void operateOn( net.iharder.opents.Solution solution )    {           t       = ((TSPSolution)solution).tour;        a       = t[pos1];        t[pos1] = t[pos2];        t[pos2] = a;    }   // end operateOn}   // end class TSPSwapMove

⌨️ 快捷键说明

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