Class CrossOverFunction.NoCross

    • Constructor Detail

    • Method Detail

      • setCrossOverProbs

        public void setCrossOverProbs​(double[] crossOverProb)
                               throws ChangeVetoException
        Description copied from interface: CrossOverFunction
        Sets the probability of crossing at each base. Each position in the array corresponds to a position in the sequences to be crossed. The probability of a cross occuring after position 1 in the SymbolList is given by crossOverProbs[1]. CrossOverProbs[0] is effectively redundant as the cross would occur before the 1st position in the SymbolList. By convention if the array is shorter than the SymbolList it is being applied to then the last value in the array will be applied to every subsequent residue. The default value in all implementations should be DEFAULT_CROSS_PROB
        Specified by:
        setCrossOverProbs in interface CrossOverFunction
        Parameters:
        crossOverProb - an array of doubles giving the probability of a cross occuring at any place.
        Throws:
        ChangeVetoException
      • setMaxCrossOvers

        public void setMaxCrossOvers​(int max)
                              throws ChangeVetoException
        Description copied from interface: CrossOverFunction
        Sets an upper limit on the number of crosses. Its up to the implementation to decide what to do when the limit is reached although a good convention would be to keep only the first N crosses from the left end (5' end) of the sequence. By convention the default upper limit is DEFAULT_MAX_CROSS (eg infinite). This value should be used as the default by all implementations.
        Specified by:
        setMaxCrossOvers in interface CrossOverFunction
        Parameters:
        max - the limit on crosses
        Throws:
        ChangeVetoException - if a ChangeListener vetoes this change
      • isUnchanging

        public boolean isUnchanging​(ChangeType t)
        Description copied from interface: Changeable

        A particular ChangeType can never be raised by this Changeable.

        If this returns true, then it is guaranteed that change events of this type (and all child types) can never under any circumstances be fired by this Changeable instance. If it returns false, that does not mean that this type of event will or even can be raised, but that it is worth registering listeners incase.

        Specified by:
        isUnchanging in interface Changeable
        Parameters:
        t - the ChangeType to check
        Returns:
        true if ChangeEvents of this type are guaranteed to never be fired