public static void ObliczIndiwFitness(Particle ind) { switch (FunctionName.type) { case FunctionName.Type.Schwefel: Schwefel.setFitness(ind); break; case FunctionName.Type.DeJong1: DeJong1.setFitness(ind); break; case FunctionName.Type.Rastrigin: Rastrigin.setFitness(ind); break; case FunctionName.Type.Rosenbrock: Rosenbrock.setFitness(ind); break; } }
internal void ObliczPopulFitness(FunctionName.Type type) { for (int j = 0; j < population.Count; j++) { switch (type) { case FunctionName.Type.DeJong1: DeJong1.setFitness(population[j]); break; case FunctionName.Type.Schwefel: Schwefel.setFitness(population[j]); break; case FunctionName.Type.Rastrigin: Rastrigin.setFitness(population[j]); break; case FunctionName.Type.Rosenbrock: Rosenbrock.setFitness(population[j]); break; } } }