Class AbstractListChromosome<T>

    • Method Detail

      • getRepresentation

        protected List<TgetRepresentation()
        Returns the (immutable) inner representation of the chromosome.
        the representation of the chromosome
      • getLength

        public int getLength()
        Returns the length of the chromosome.
        the length of the chromosome
      • newFixedLengthChromosome

        public abstract AbstractListChromosome<TnewFixedLengthChromosome​(List<T> chromosomeRepresentation)
        Creates a new instance of the same class as this is, with a given arrayRepresentation. This is needed in crossover and mutation operators, where we need a new instance of the same class, but with different array representation.

        Usually, this method just calls a constructor of the class.

        chromosomeRepresentation - the inner array representation of the new chromosome.
        new instance extended from FixedLengthChromosome with the given arrayRepresentation