Expand description
Positional crossovers for any Vec<T>: one-point, two-point and uniform. They also accept
parents of different lengths: cut points lie within the shorter parent and tails are
exchanged whole, so lengths are swapped, never invented.
Structs§
- OnePoint
- One-point crossover: cut both parents at the same position
c ∈ 1..min_lenand exchange the tails. - TwoPoint
- Two-point crossover: exchange the segment between two cut points within the shorter parent.
- Uniform
Crossover - Uniform crossover: exchange each position of the common prefix with probability
swap.