/** * Create a new chromosome from the given genes array. * * @param genes the genes of the new chromosome. * @throws IllegalArgumentException if the length of the gene sequence is * empty or doesn't match with the allowed length range. * @throws IllegalArgumentException if the minimum or maximum of the range * is smaller or equal zero * @throws IllegalArgumentException if the given range size is zero * @throws NullPointerException if the {@code genes} are {@code null}. */ protected AbstractBoundedChromosome( final ISeq<? extends G> genes, final IntRange lengthRange ) { super(genes, lengthRange); _min = genes.get(0).getMin(); _max = genes.get(0).getMax(); }
/** * Return the minimum value of this {@code BoundedChromosome}. * * @return the minimum value of this {@code BoundedChromosome}. */ public default A getMin() { return getGene().getMin(); }
/** * Return the maximum value of this {@code BoundedChromosome}. * * @return the maximum value of this {@code BoundedChromosome}. */ public default A getMax() { return getGene().getMax(); }