Skip to main content

subtree_crossover_mask

Function subtree_crossover_mask 

Source
pub fn subtree_crossover_mask() -> CrossoverMaskFn
Expand description

A value-independent, pair-symmetric subtree crossover mask for [fugue::CrossoverKernel]: picks one node path present in both parents uniformly at random and returns the union of the two parents’ addresses under that path. Swapping that block grafts each parent’s subtree into the other; the kernel’s mandatory re-score replays each child consistently (the grafted choices encode the new structure) and rejects off-support or low-density grafts via the product-target Metropolis ratio.