|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Objectga4robot.GeneGroup
public class GeneGroup
代选基因组
构造方法摘要 | |
---|---|
GeneGroup(int id,
int n)
基因组构造函数 |
方法摘要 | |
---|---|
void |
addGene(int id,
Gene gene)
添加基因 |
Gene |
getGene(int id)
获取基因 |
static GeneGroup |
getGroup(int id)
获取组 |
static int |
getGroupSize()
|
Gene |
getRandomGene()
随机获取基因 |
int |
getSize()
基因组大小 |
static void |
initGroup(int n)
随机初始化测试数据 |
static void |
loadGroup(java.io.InputStream config)
加载基因组 |
static void |
saveGroup(java.io.OutputStream config)
保存基因组 |
void |
setGene(int id,
Gene gene)
设置基因 |
从类 java.lang.Object 继承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
构造方法详细信息 |
---|
public GeneGroup(int id, int n)
id
- 基因位n
- 基因组大小方法详细信息 |
---|
public void setGene(int id, Gene gene)
id
- 基因位gene
- 基因public void addGene(int id, Gene gene)
id
- 基因位gene
- 基因public Gene getGene(int id)
id
- 基因位
public Gene getRandomGene()
public int getSize()
public static void initGroup(int n) throws java.io.IOException
n
- 基因位数
java.io.IOException
public static void saveGroup(java.io.OutputStream 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
public static void loadGroup(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
public static GeneGroup getGroup(int id)
id
- 基因位
public static int getGroupSize()
|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |