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

📄 destrategy.java

📁 Differential Evolution(JAVA)
💻 JAVA
字号:
package DeApp1.de;
import java.io.*;

public abstract class DEStrategy
/***********************************************************
**                                                        **
** Parent class for all the different DE-strategies you   **
** can choose.                                            **
**                                                        **
** Authors:            Mikal Keenan                       **
**                     Rainer Storn                       **
**                                                        **
***********************************************************/
{
   protected DERandom deRandom;

   protected int i, counter;

   
   abstract public void apply (double F, double Cr, int dim, 
	                          double[]x, double[]gen_best,
                              double[][]g0);
   /***********************************************************
   ** Contains the actual strategy which alters your vectors.**
   ***********************************************************/

   public void init (DERandom deRnd)
   /***********************************************************
   ** Link to the random number generator.                   **
   ***********************************************************/
   { 
	   deRandom = deRnd;
   }

   protected final void prepare (int dim)
   /***********************************************************
   ** Fetch a random number ex [0,dim].                      **
   ***********************************************************/
   {
     i = deRandom.nextValue (dim);
     counter = 0;
   }
}




⌨️ 快捷键说明

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