@Override
	protected MutatorResult<Chromosome<G>> mutate(
		final Chromosome<G> chromosome,
		final double p,
		final RandomGenerator random
	) {
		final int P = Probabilities.toInt(p);
		return random.nextInt() < P
			? mutate(chromosome)
			: new MutatorResult<>(chromosome, 0);
	}
Mutates the given chromosome.

@param chromosome the chromosome to mutate
@param p the mutation probability for the underlying genetic objects
@param random the random engine used for the genotype mutation
@return the mutation result
jenetics.ext/src/main/java/io/jenetics/ext/TreeMutator.java