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

📄 pair.java

📁 本算法是实现基于KNN的基因遗传算法
💻 JAVA
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package gaknn.core;/** * * @author Niro */public class Pair implements Comparable{    public Pair(int i,double v){        index=i;        value=v;    }        int index;     double value;	       public int Index(){        return index;    }        public double Value(){        return value;    }	       public int compareTo(Object pair) throws ClassCastException {        if ((((Pair) pair).value) > this.value)            return 1;        else if ((((Pair) pair).value) == this.value)            return 0;        else            return -1;    }}

⌨️ 快捷键说明

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