Function moonlander_gp::genetic::crossover_tree
[−]
[src]
pub fn crossover_tree<T: AstNode + Mutatable + Clone, R: Rng + Sized>(
ast1: &T,
ast2: &T,
rng: &mut R
) -> (Box<T>, Box<T>)
Cross two trees.
Pick two random subtrees of the same type in both trees, and return two new trees with the subtrees switched.