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

📄 selectionalgorithm.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;import net.openai.ai.ga.population.*;import net.openai.ai.ga.cell.*;/** * <code>SelectionAlgorithm</code> is a method by which <code>Cell</code> * members are chosen from a <code>Population</code> for a given purpose * (i.e. mutation). * * @author	Jared Grubb * @version	%I%, %G% * @since	JDK1.3 */public interface SelectionAlgorithm {    /**     * Creates a <code>Population</code> according to a given algorithm or     * rule. The initial <code>Population</code> is passed and a selection     * from it is chosen and returned.     *     * <p>The <code>Population</code> passed into the algorithm should not be     * be changed by the algorithm, as it receives the original, not a clone     * of the original. If a clone is desired, it should be handled inside     * the algorithm.     *     * <p>The returned <code>Population</code> should not be considered crucial     * to any internal functions of this implementation of the <code>     * SelectionAlgorithm</code>, since the genetic algorithm may make     * changes directly onto this structure and may make the structure     * available for others to make changes to. If the structure is needed     * internally and such behavior could be detrimental to this     * implementation's function, then it is recommended that a shallow     * clone be returned via a <code>return new Population(returnPopulation)     * </code> rather than a plain <code>return returnPopulation</code>.     * This allows for this additional overhead to be avoided in cases where     * it not needed.     *     * @param pop  the <code>Population</code> to choose from     * @return a selected <code>Population</code>     */    public Population selectFromPopulation(Population pop);}/*--- formatting done in "Sun Java Convention" style on 12-28-2000 ---*/

⌨️ 快捷键说明

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