class Population {

    public double calculateFitnessForChromosome(int idx, Function<Chromosome, Double> fitnessFunction) {
        double fitness = fitnessFunction.apply(chromosomes[idx]);
        chromosomes[idx].setFitness(fitness);
        fitnessCalculatedFlags.set(idx);
        return fitness;
    }

    public  Population(int size);

}