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

📄 deproblem.java

📁 Differential Evolution(JAVA)
💻 JAVA
字号:
package DeApp1.problem;

import java.awt.*;         // Import all classes from the java.awt package
                           // AWT is the Abstract Window Toolkit. The AWT
import java.io.*;
import DeApp1.de.*;



public abstract class DEProblem
/***********************************************************
**                                                        **
** Describes the problem to solve.                        **
** The abstract class declares the methods that all       **
** subtypes must have. Not all of them, however, are      **
** implemented in the abstract class.                     **
**                                                        **
** Authors:            Mikal Keenan                       **
**                     Rainer Storn                       **
**                                                        **
***********************************************************/
{
  /*----Public variables---------------------*/
  public static final int NAPTIME = 10;
  public double mincost;

  /*----Protected variables------------------*/
  double best[];
  int    dim;


  /*----Function stubs-----------------------*/
  public abstract boolean completed(); // TRUE if evaluation is completed
  public abstract double evaluate (T_DEOptimizer t_DEOptimizer, double[] X, int dim); //the actal cost function


  public final double[] getBest ()
  /**********************************
  ** Best vector.                  **
  **********************************/
  {
    return best;
  }

  public final int getLength ()
  /***********************************
  ** Dimensionality of the problem. **
  ***********************************/
  {
    return dim;
  }
}




⌨️ 快捷键说明

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