parameter.cpp
来自「基本遗传算法在求一个函数表达式的最大值应用!」· C++ 代码 · 共 20 行
CPP
20 行
#include "stdafx.h"
#include "parameter.h"
//运行参数设定
MyParameter::MyParameter(int lch,int pops,int stopc,double pc,double pm,int sw){
this->lchrom = lch;
this->popsize =pops;
this->stop_criteria = stopc;
this->pcross = pc;
this->pmutate =pm;
this->select_way = sw;
}
void MyParameter::set_parameter(int lch, int pops, int stopc, double pc, double pm ,int sw) {
this->lchrom = lch;
this->popsize =pops;
this->stop_criteria = stopc;
this->pcross = pc;
this->pmutate =pm;
this->select_way = sw;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?