public Roulette(Vector<Chromosome> chroms, int objective,
            boolean max_optimal) {
        slots = new Vector<RouletteElement>();

        if(max_optimal) {
            double min = -1;

            for(Chromosome curr : chroms) {
                if(curr.getObjectives()[objective] < min || min == -1) {
                    min = curr.getObjectives()[objective];
                }
            }

            for(int i = 0; i < chroms.size(); i++) {
                Chromosome curr = chroms.get(i);
                slots.add(new RouletteElement
                        (i, curr.getObjectives()[objective] - min));
            }
        } else {
            double max = -1;

            for(Chromosome curr : chroms) {
                if(curr.getObjectives()[objective] > max || max == -1) {
                    max = curr.getObjectives()[objective];
                }
            }

            for(int i = 0; i < chroms.size(); i++) {
                Chromosome curr = chroms.get(i);
                slots.add(new RouletteElement
                        (i, max - curr.getObjectives()[objective]));
            }
        }
    }