回复 3 楼 demooo
程序代码:
void evaluation(double *pop, double *fitness, unsigned int M, unsigned int D, unsigned int fun, unsigned int NF) {
unsigned int i, j, f;
for(i = 0; i < M; i++)
for(j = 0, f = fun; j < NF; j++, f++)
fitness[(NF * i) + j] = chfun(&pop[D * i], f);
}