ga4robot
类 Generation

java.lang.Object
  继承者 ga4robot.Generation

public class Generation
extends java.lang.Object

子代


构造方法摘要
Generation()
          构造函数,加载配置文件,随机初始化基因组
Generation(java.io.InputStream config)
          构造函数
 
方法摘要
 Chromosome getBest()
           
 Chromosome getHistoryBest()
           
 void newGeneration()
          新子代
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

Generation

public Generation()
           throws java.io.IOException
构造函数,加载配置文件,随机初始化基因组

抛出:
java.io.IOException

Generation

public Generation(java.io.InputStream config)
           throws java.io.IOException,
                  org.xml.sax.SAXException,
                  javax.xml.parsers.ParserConfigurationException
构造函数

参数:
config - 基因组输入流
抛出:
java.io.IOException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
方法详细信息

newGeneration

public void newGeneration()
新子代


getHistoryBest

public Chromosome getHistoryBest()
返回:
历史最优

getBest

public Chromosome getBest()
返回:
当前最优