@Override
    public void evaluate(final Population a_chromosomes) {
         double curFitness;
        final Iterator itChromosomes = a_chromosomes.iterator();
        IChromosome chromosome;
        while (itChromosomes.hasNext()) {
            chromosome = (IChromosome) itChromosomes.next();

            curFitness = chromosome.getFitnessValueDirectly();
            if (curFitness < 0) {
                // fitness was not evaluated for this chromosome yet.

                curFitness = fitnessFunction.getFitnessValue(chromosome);
                // And store it to avoid evaluation of the same Chromosome again:
                chromosome.setFitnessValue(curFitness);
            } else {
                chromosome.setFitnessValue(curFitness);
            }

        }
    }