亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? selectgreatestfitness.java

?? 遺傳算法源代碼,實現了選擇操作、交叉操作和變異操作
?? JAVA
字號:
/*--- formatted by Jindent 2.1, (www.c-lab.de/~jindent) ---*//** * SelectionAlgorithm Class * * location: net.openai.ai.ga.selection.SelectionAlgorithm * */package net.openai.ai.ga.selection.common;import net.openai.ai.ga.selection.*;import net.openai.ai.ga.population.*;import net.openai.ai.ga.cell.*;import java.util.Iterator;/** * <code>SelectGreatestFitness</code> is a <code>SelectionAlgorithm</code> * that will return a portion of the passed <code>Population</code> that * have the greatest fitness. It will choose either a fixed number or a * percentage. * * @author	Jared Grubb * @version	%I%, %G% * @since	JDK1.3 */public class SelectGreatestFitness implements SelectionAlgorithm {    private int goal;    private double percent;    private boolean isPercentage;    /**     * Creates a new <code>SelectGreatestFitness</code> object for choosing     * the specified number of <code>Cell</code>s out of the specified <code>     * Population</code> who have the greatest fitness.     *     * @param goalNumber the maximum number of <code>Cell</code>s to allow     * @throws <code>ArithmeticException</code> on a negative goalNumber     */    public SelectGreatestFitness(int goalNumber) {        if (goalNumber<0)            throw new ArithmeticException(                "SelectGreatestFitness: illegal goal number");        this.goal = goalNumber;        this.isPercentage = false;    }    /**     * Creates a new <code>SelectGreatestFitness</code> object for choosing     * the specified percentage of <code>Cell</code>s out of the specified <code>     * Population</code> who have the greatest fitness. The percentage must be     * between 0.0 and 1.0, inclusive.     *     * @param goalNumber the maximum number of <code>Cell</code>s to allow     * @throws <code>ArithmeticException</code> on a negative percentage or on     *          a percentage greater than 1.0     */    public SelectGreatestFitness(double goalPercentage) {        if (goalPercentage<0.0 || goalPercentage>1.0)            throw new ArithmeticException(                "SelectGreatestFitness: illegal percentile");        this.percent = goalPercentage;        this.isPercentage = true;    }    /**     * Chooses the <code>Cell</code>s in the specified <code>Population</code>     * with the greatest fitness. For a fixed number, returns a maximum number     * depending on the size of the population, but may return fewer if the     * population if the population is not that large. For a percentage, returns     * a percentage of the population, rounded down (i.e., percentage of 10%     * (0.10) on a size of 25 {0.10 * 25 = 2.5} returns a maximum of 2, not     * three; percentage of 10% on a size of 9 {0.10 * 9 = 0.9} will not return     * any objects.)     *     * <p>The returned population is guaranteed to return the members of the     * specified population such that there are no other members in that     * population who are greater than those returned. This means that cells     * who tie those already in the return population are ignored when their     * addition would cause the size to exceed that specified. For example, if     * the fitness of a population was {1,1,2,3,3,3,4,5,5} and the greatest 4     * should be returned, then the returned population will be {3,4,5,5}.     * The cells who have fitness 5 are kept since their addition will knock     * less fit members out of the list. However, the other cells of fitness 3     * are ignored since their addition could not knock any other cell out.     *     * @param pop  the <code>Population</code> to choose from     * @return a selected <code>Population</code> in arbitrary order     */    public Population selectFromPopulation(Population pop) {        if (isPercentage) {goal=(int)(percent*pop.getSize());}        Population output = new Population();        if (goal==0) return output;        Cell tempCell;        Cell lowestCellInOutput = null;        double lowestFitnessInOutput = Double.POSITIVE_INFINITY;            // That needs to be +Inf! Otherwise if(tF<lFIO) {} fails below        double tempFitness;        for(Iterator i=pop.getCellIterator(); i.hasNext(); ) {            tempCell = (Cell) i.next();            tempFitness = tempCell.getFitness();            if (output.getSize()<goal) { // Add cells until the goal is reached                output.addCell(tempCell);                if (tempFitness<=lowestFitnessInOutput) {                  // <= in case fitness==Double.POSITIVE_INFINITY                  // side effect: does not guarantee any order to adding cells                    lowestFitnessInOutput = tempFitness;                    lowestCellInOutput = tempCell;                }            } else if (tempFitness>lowestFitnessInOutput) {                // Then start trimming out cells in the output                output.removeCell(lowestCellInOutput);                output.addCell(tempCell);                lowestFitnessInOutput = tempFitness;                lowestCellInOutput = tempCell;                for (Iterator j = output.getCellIterator(); j.hasNext(); ) {                    tempCell = (Cell) j.next();                    tempFitness = tempCell.getFitness();                    if (tempFitness<lowestFitnessInOutput) {                        lowestFitnessInOutput = tempFitness;                        lowestCellInOutput = tempCell;                    }                 }            }        }        return output;    }}/*--- formatting done in "Sun Java Convention" style on 12-28-2000 ---*/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品美女一区二区三区| 欧美国产禁国产网站cc| 色偷偷久久一区二区三区| 精品亚洲国内自在自线福利| 亚洲高清在线视频| 亚洲综合视频在线观看| 亚洲免费成人av| 亚洲欧美另类久久久精品2019| 成人欧美一区二区三区白人| 亚洲欧洲在线观看av| 亚洲乱码国产乱码精品精98午夜| 亚洲久草在线视频| 亚洲一区在线观看免费观看电影高清 | 蜜桃在线一区二区三区| 蜜臀久久99精品久久久久宅男| 日产欧产美韩系列久久99| 久久精品噜噜噜成人88aⅴ| 国产精品一级黄| 欧洲人成人精品| 欧美一区二区三区啪啪| 国产网红主播福利一区二区| 亚洲欧美日韩国产成人精品影院| 一区二区三区中文字幕| 美日韩一区二区三区| 成人午夜激情片| 欧美日韩国产小视频在线观看| 欧美乱妇15p| 国产日本欧洲亚洲| 亚洲男同1069视频| 丝袜诱惑制服诱惑色一区在线观看 | 亚洲人成在线播放网站岛国| 亚洲激情图片一区| 狠狠色狠狠色综合日日91app| 国产91丝袜在线18| 欧美久久高跟鞋激| 欧美激情一区二区三区蜜桃视频| 亚洲一级二级三级在线免费观看| 久久精品国产久精国产爱| 9色porny自拍视频一区二区| 5566中文字幕一区二区电影| 中文字幕在线一区二区三区| 日韩av网站在线观看| 9l国产精品久久久久麻豆| 欧美成人综合网站| 夜夜操天天操亚洲| 成人18视频日本| 精品乱人伦小说| 亚洲午夜久久久久中文字幕久| 国产a精品视频| 日韩欧美一区二区视频| 亚洲韩国一区二区三区| 99视频一区二区三区| 久久精品欧美日韩精品| 热久久久久久久| 欧美日韩一区国产| 1区2区3区国产精品| 国产精品99精品久久免费| 日韩三级中文字幕| 亚洲3atv精品一区二区三区| 色av成人天堂桃色av| 国产精品欧美极品| 国产91精品在线观看| 久久久影视传媒| 蜜臀av一区二区| 日韩色视频在线观看| 秋霞影院一区二区| 欧美老女人第四色| 午夜av一区二区三区| 欧美日韩成人高清| 亚洲h在线观看| 91国模大尺度私拍在线视频| 亚洲欧美二区三区| 一本色道久久加勒比精品| 亚洲女厕所小便bbb| 色偷偷久久一区二区三区| 亚洲精品日日夜夜| 欧美性大战xxxxx久久久| 亚洲综合精品久久| 欧美日韩精品欧美日韩精品一| 亚洲中国最大av网站| 欧美日韩亚洲综合| 日本成人在线电影网| 欧美一级二级在线观看| 老司机精品视频导航| 国产日韩欧美高清| av电影在线观看一区| 亚洲综合免费观看高清完整版在线| 色一情一乱一乱一91av| 天天综合色天天综合| 欧美成人精品福利| 国产99久久久国产精品潘金网站| 国产精品久久影院| 欧美亚洲动漫另类| 男人的天堂亚洲一区| 国产亚洲欧美在线| 97se狠狠狠综合亚洲狠狠| 一卡二卡欧美日韩| 日韩欧美国产系列| 99视频国产精品| 视频一区二区三区入口| 精品国产欧美一区二区| 成人高清免费观看| 午夜精品在线视频一区| 久久精品一区八戒影视| 欧美综合一区二区| 精品午夜久久福利影院| 亚洲视频综合在线| 日韩视频一区二区在线观看| 色婷婷亚洲精品| 男女男精品视频网| 国产精品的网站| 欧美电影精品一区二区| 91在线国内视频| 国模冰冰炮一区二区| 亚洲在线视频网站| 国产欧美精品一区二区色综合朱莉| 欧美午夜一区二区三区免费大片| 国产一区美女在线| 亚洲一区国产视频| 国产精品三级在线观看| 91麻豆精品国产91| 91老师国产黑色丝袜在线| 加勒比av一区二区| 亚洲成av人片在www色猫咪| 国产精品久久精品日日| 日韩视频免费观看高清完整版在线观看| 成人教育av在线| 国产综合色精品一区二区三区| 午夜视频一区在线观看| 亚洲欧洲日韩女同| 国产亚洲精品超碰| 日韩欧美成人一区二区| 色94色欧美sute亚洲线路一ni| 国产精品77777| 麻豆免费精品视频| 日韩av成人高清| 亚洲成av人片一区二区梦乃 | 91麻豆国产香蕉久久精品| 狠狠色伊人亚洲综合成人| 日本美女一区二区| 三级久久三级久久久| 亚洲国产另类精品专区| 亚洲欧美日韩国产成人精品影院| 国产精品久久久久aaaa樱花| 中文字幕精品一区| 国产欧美日本一区视频| 中文字幕va一区二区三区| 久久精品网站免费观看| 久久久不卡网国产精品二区| 2021中文字幕一区亚洲| 精品乱码亚洲一区二区不卡| 精品少妇一区二区三区免费观看| 欧美一区二区精品久久911| 欧美高清hd18日本| 欧美一卡二卡在线观看| 精品美女在线播放| 国产欧美日韩在线观看| 国产欧美日韩在线| 国产精品久久午夜夜伦鲁鲁| 日韩美女久久久| 亚洲电影在线免费观看| 日韩黄色一级片| 精品写真视频在线观看| 福利91精品一区二区三区| 成人听书哪个软件好| 日本韩国精品在线| 欧美美女bb生活片| 日韩欧美久久久| 久久精品一区二区三区四区| 日韩伦理免费电影| 亚洲小少妇裸体bbw| 日韩电影一区二区三区| 国产一区91精品张津瑜| 色综合色狠狠天天综合色| 欧美日韩亚洲国产综合| 亚洲精品一线二线三线| 中文字幕欧美区| 免费成人av在线| 国产成人精品免费网站| 一本色道综合亚洲| 精品国产露脸精彩对白| 国产精品高清亚洲| 日韩精品一级中文字幕精品视频免费观看 | 欧美性猛交xxxx黑人交| 日韩一区二区三区精品视频| 国产精品久99| 天天做天天摸天天爽国产一区 | 波多野结衣中文字幕一区二区三区 | 处破女av一区二区| 欧美天堂亚洲电影院在线播放| 久久综合久久综合久久| 亚洲精品第1页| 久久99精品国产.久久久久久| 99精品视频免费在线观看| 日韩视频免费观看高清完整版 | 99视频一区二区| 日韩精品一区二区三区四区视频| 日韩美女久久久| 国产麻豆精品一区二区| 3751色影院一区二区三区|