Class TreeCrossover<G extends TreeGene<?,​G>,​C extends Comparable<? super C>>

    • Constructor Detail

      • TreeCrossover

        protected TreeCrossover​(double probability)
        Constructs an tree crossover with a given recombination probability.
        Parameters:
        probability - the recombination probability
        Throws:
        IllegalArgumentException - if the probability is not in the valid range of [0, 1]
    • Method Detail

      • crossover

        protected abstract <A> int crossover​(TreeNode<A> that,
                                             TreeNode<A> other)
        Template method which performs the crossover. The arguments given are mutable non null trees.
        Type Parameters:
        A - the existential allele type
        Parameters:
        that - the first (chromosome) tree
        other - he second (chromosome) tree
        Returns:
        the number of altered genes