Class SimpleGACrossResult

  • All Implemented Interfaces:
    GACrossResult

    public final class SimpleGACrossResult
    extends java.lang.Object
    implements GACrossResult

    Simple implementation of the GACross interface. Basically a data structure to hold the results of a GACross

    Since:
    1.5
    Version:
    1.0
    Author:
    Mark Schreiber
    • Constructor Detail

      • SimpleGACrossResult

        public SimpleGACrossResult​(PointLocation[] crossOverPositions,
                                   SymbolList[] chromosomes)
    • Method Detail

      • getCrossOverPositions

        public PointLocation[] getCrossOverPositions()
        Description copied from interface: GACrossResult
        Returns the collection of cross over locations from the last cross
        Specified by:
        getCrossOverPositions in interface GACrossResult
        Returns:
        null if there has been no call to performCrossOver, a zero length array if there was no cross overs or an array of PointLocations describing the cross over points.
      • getChromosomes

        public SymbolList[] getChromosomes()
        Description copied from interface: GACrossResult
        Gets the chromosomes after the cross
        Specified by:
        getChromosomes in interface GACrossResult
        Returns:
        the two Chromosomes, by convention the first will be chromA and the second chromB