Exemplo n.º 1
0
 internal abstract double Fitness(Generation.Solver solution);
Exemplo n.º 2
0
 internal override double Fitness(Generation.Solver solution)
 {
     double sumOfSquares = 0;
     int i = 0;
     for (double x = LeftLim; x < RightLim; x += 0.1, i++) {
         double actual = solution(x);
         double error = _sine.Points[i].YValues[0] - actual;
         sumOfSquares += error * error;
     }
     return sumOfSquares;
 }
Exemplo n.º 3
0
 internal override double Fitness(Generation.Solver solution)
 {
     return 0;
 }