private MutatorResult<Chromosome<G>> mutate(final Chromosome<G> chromosome) {
		final TreeNode<A> tree = TreeNode.ofTree(chromosome.gene());
		mutate(tree);

		final var flat = FlatTreeNode.ofTree(tree);
		final var genes = flat.map(t -> chromosome.gene().newInstance(t));
		return new MutatorResult<>(chromosome.newInstance(genes), 1);
	}
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