Skip to main content

shared_site_crossover_mask

Function shared_site_crossover_mask 

Source
pub fn shared_site_crossover_mask(p_swap: f64) -> CrossoverMaskFn
Expand description

The address set a SharedSiteCrossover proposal may exchange: every address present in both traces with the same value type, each kept independently with probability p_swap.

Value-independent (it reads only addresses and value types) and symmetric in its two arguments (the shared set is a set intersection, iterated in BTreeMap order, so the coin sequence is identical for (a, b) and (b, a)), which is the mask contract of [fugue::CrossoverKernel]. Exposed for callers who build fugue’s kernel directly for a fixed-structure model; SharedSiteCrossover adds the strict re-score that variable-structure models need on top of it.