evaluator.cpp
来自「粗糙集应用软件」· C++ 代码 · 共 23 行
CPP
23 行
#include <stdafx.h> // Added 980901 by Aleksander 踙rn.
#include "../copyright.h" // Added 000323 by Aleksander 豩rn.
#include "Evaluator.h"
#include <kernel/system/float.h> // Added 980901 by Aleksander 踙rn.
void Evaluator::eval(Population &p)
{
double sum = 0.0;
double sumsq = 0.0;
double fittestFit = 0.0;
double worstFit = DBL_MAX;
// SDebug.p("Evaluator.eval: popsize: " + p.population.size());
for(unsigned int i = 0; i < p.population.size(); i++){
Individual * ind = p.population[i];
ind->fitness = fitness->eval(ind);
ind->sfitness = ind->fitness; // this will be scaled
}
p = stats.apply(p);
hook();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?