some signed/unsigned comparisons removed
This commit is contained in:
parent
8ae796ab28
commit
8034b9f344
1 changed files with 5 additions and 3 deletions
|
|
@ -156,7 +156,7 @@ public :
|
||||||
|
|
||||||
double fitness = 0.0;
|
double fitness = 0.0;
|
||||||
|
|
||||||
for (int i = 0; i < inputs.size(); ++i)
|
for (unsigned i = 0; i < inputs.size(); ++i)
|
||||||
{
|
{
|
||||||
_eo.apply(outputs[i], inputs[i]);
|
_eo.apply(outputs[i], inputs[i]);
|
||||||
fitness += (outputs[i] - target[i]) * (outputs[i] - target[i]);
|
fitness += (outputs[i] - target[i]) * (outputs[i] - target[i]);
|
||||||
|
|
@ -183,7 +183,7 @@ void print_best(eoPop<EOT>& pop)
|
||||||
FitnessType best = pop[0].fitness();
|
FitnessType best = pop[0].fitness();
|
||||||
int index = 0;
|
int index = 0;
|
||||||
|
|
||||||
for (int i = 1; i < pop.size(); ++i)
|
for (unsigned i = 1; i < pop.size(); ++i)
|
||||||
{
|
{
|
||||||
if (best < pop[i].fitness())
|
if (best < pop[i].fitness())
|
||||||
{
|
{
|
||||||
|
|
@ -210,7 +210,7 @@ void print_best(eoPop<EOT>& pop)
|
||||||
#include "eoSteadyStateEA.h"
|
#include "eoSteadyStateEA.h"
|
||||||
#include "eoScalarFitness.h"
|
#include "eoScalarFitness.h"
|
||||||
|
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
typedef eoMinimizingFitness FitnessType;
|
typedef eoMinimizingFitness FitnessType;
|
||||||
typedef SymregNode GpNode;
|
typedef SymregNode GpNode;
|
||||||
|
|
@ -280,6 +280,8 @@ void main()
|
||||||
}
|
}
|
||||||
|
|
||||||
print_best<EoType, FitnessType>(pop);
|
print_best<EoType, FitnessType>(pop);
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue