NANA
首页
模块
类
文件
文件列表
文件成员
NANA
modules
GA
include
GA
population.h
浏览该文件的文档.
1
#pragma once
15
#include "
gene.h
"
16
#include <list>
17
18
19
namespace
NANA {
20
namespace
GA {
21
22
class
NA_API
Popultation
{
23
public
:
24
28
struct
CResult
{
29
double
val;
30
int
index;
31
};
32
33
34
35
Popultation
(
int
groupNumber,
int
mutate);
36
41
void
run(
int
iterNum);
42
43
44
45
protected
:
49
void
choose();
50
54
void
update();
55
int
m_groupNumber
;
56
int
m_mutate
;
57
std::vector<GeneFloat>
m_members
;
58
std::vector<GeneFloat> m_oldmembers;
59
std::vector<CResult>
m_result
;
60
std::list<int>
m_lives
;
61
};
62
63
64
65
66
}
67
}
NANA::GA::Popultation
Definition:
population.h:22
NANA::GA::Popultation::m_mutate
int m_mutate
百分之
Definition:
population.h:56
NANA::GA::Popultation::m_groupNumber
int m_groupNumber
种群数量
Definition:
population.h:55
NANA::GA::Popultation::m_result
std::vector< CResult > m_result
上一代的成员
Definition:
population.h:59
NANA::GA::Popultation::m_lives
std::list< int > m_lives
活下来的个体
Definition:
population.h:60
NANA::GA::Popultation::m_members
std::vector< GeneFloat > m_members
成员
Definition:
population.h:57
NA_API
#define NA_API
兼容windows系统与linux系统
Definition:
core_global.h:24
gene.h
实现基因的运算
NANA::GA::Popultation::CResult
记录结果和序号
Definition:
population.h:28
制作者
1.9.2