资源简介
最全的java多目标进化算法,包括naga2,spea2,pesa2等等目前流行的多目标进化算法
代码片段和文件信息
/**
* Algorithm.java
* @author Juan J. Durillo
* @version 1.0
*/
package jmetal.base ;
import java.io.Serializable;
import java.util.*;
import jmetal.util.JMException;
/** This class implements a generic template for the algorithms developed in
* jmetal. Every algorithm must have a mapping between the parameters and
* and their names and another mapping between the operators and their names.
* The class declares an abstract method called execute
which
* defines the behavior of the algorithm.
*/
public abstract class Algorithm implements Serializable {
/**
* Stores the operators used by the algorithm such as selection crossover
* etc.
*/
protected Map operators_ = null;
/**
* Stores algorithm specific parameters. For example in NSGA-II these
* parameters include the population size and the maximum number of function
* evaluations.
*/
protected Mapject> inputParameters_ = null;
/**
* Stores output parameters which are retrieved by Main object to
* obtain information from an algorithm.
*/
protected Mapject> outPutParameters_ = null;
/**
* Launches the execution of an specific algorithm.
* @return a SolutionSet
that is a set of non dominated solutions
* as a result of the algorithm execution
*/
public abstract SolutionSet execute() throws JMException ;
/**
* Offers facilities for add new operators for the algorithm. To use an
* operator an algorithm has to obtain it through the
* getOperator
method.
* @param name The operator name
* @param operator The operator
*/
public void addOperator(String name Operator operator){
if (operators_ == null) {
operators_ = new HashMap();
}
operators_.put(nameoperator);
} // addOperator
/**
* Gets an operator through his name. If the operator doesn‘t exist or the name
* is wrong this method returns null. The client of this method have to check
* the result of the method.
* @param name The operator name
* @return The operator if exists null in another case.
*/
public Operator getOperator(String name){
return operators_.get(name);
} // getOperator
/**
* Sets an input parameter to an algorithm. Typically
* the method is invoked by a Main object before running an algorithm.
* The parameters have to been inserted using their name to access them through
* the getInputParameter
method.
* @param name The parameter name
* @param object object that represent a parameter for the
* algorithm.
*/
public void setInputParameter(String name object object){
if (inputParameters_ == null) {
inputParameters_ = new HashMapject>();
}
inputParameters_.put(nameobject);
} // setInputParameter
/**
* Gets an input parameter through its name. Typically
* the method is invoked by an object
- 上一篇:android 播放器按钮图标
- 下一篇:java web 聊天室 源码
相关资源
- 微博系统(Java源码,servlet+jsp),适
- java串口通信全套完整代码-导入eclip
- jsonarray所必需的6个jar包.rar
- 三角网构TIN生成算法,Java语言实现
- java代码编写将excel数据导入到mysql数据
- Java写的cmm词法分析器源代码及javacc学
- JAVA JSP公司财务管理系统 源代码 论文
- JSP+MYSQL旅行社管理信息系统
- 推荐算法的JAVA实现
- 基于Java的酒店管理系统源码(毕业设
- java-图片识别 图片比较
- android毕业设计
- java23种设计模式+23个实例demo
- java Socket发送/接受报文
- JAVA828436
- java界面美化 提供多套皮肤直接使用
- 在线聊天系统(java代码)
- 基于Java的图书管理系统807185
- java中实现将页面数据导入Excel中
- java 企业销售管理系统
- java做的聊天系统(包括正规课程设计
- Java编写的qq聊天室
- 商店商品管理系统 JAVA写的 有界面
- JAVA开发聊天室程序
- 在linux系统下用java执行系统命令实例
- java期末考试试题两套(答案) 选择(
- JAVA3D编程示例(建模、交互)
- Java 文件加密传输
- java做的房产管理系统
- 基于jsp的bbs论坛 非常详细
评论
共有 条评论