class Population {

    public double getAverageFitness() {
        if (fitnessCalculatedFlags.cardinality() == chromosomes.length) {
            double totalFitness = 0.0;

            for (int i = 0; i < chromosomes.length; i++)
                totalFitness += chromosomes[i].getFitness();

            return totalFitness / chromosomes.length;
        }
        return Double.NaN;
    }

    public  Population(int size);

}