Class SwapPositionsMutator

    • Constructor Detail

      • SwapPositionsMutator

        public SwapPositionsMutator​(double probability)
        Standard probability constructor. Utilized by the MutatorTableModel.
        Parameters:
        probability - the probability of a position swap
    • Method Detail

      • swapComponent

        protected void swapComponent​(io.jenetics.util.MSeq<DiscreteGene> mSeq,
                                     int a,
                                     int b)
        Swap the positions of two DiscreteGenes in a chromosome sequence of DiscreteGenes.
        Specified by:
        swapComponent in class SwapPropertyMutator
        Parameters:
        mSeq - chromosome sequence
        a - integer position a for swap
        b - integer position b for swap