Class SwapDistanceMutator

    • Constructor Detail

      • SwapDistanceMutator

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

      • swapComponent

        protected void swapComponent​(io.jenetics.util.MSeq<DiscreteGene> mSeq,
                                     int a,
                                     int b)
        Swap the distances 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