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

📄 element.java

📁 用分支界限法解决的几个问题:包括0-1背包问题,最大团问题,电路布线问题,最大装载问题.作业最优处理问韪.
💻 JAVA
字号:
/* * Element.java * * Created on 2006年4月17日, 下午2:15 * * To change this template, choose Tools | Options and locate the template under * the Source Creation and Management node. Right-click the template and choose * Open. You can then make changes to the template in the Source Editor. */package test;import java.lang.*;/** * * @author michael */   public   class Element implements Comparable{        int id;        double d;        public Element(int idd,double dd){            id=idd;            d=dd;        }        public int compareTo(Object x){            double xd=((Element)x).d;            if (d<xd) return -1;            if (d==xd) return 0;            return 1;        }        public boolean equals(Object x){            return d==((Element)x).d;        }         }

⌨️ 快捷键说明

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