Skip to main content

Module dynamic_ops

Module dynamic_ops 

Source
Expand description

Variation operators for DynamicRealVector.

DynamicRealVector is a variable-length real-valued genome, but the fixed-length real operators in crate::operators are written concretely for RealVector and therefore cannot vary a genome’s length. This module provides the missing length-aware operators so a population of DynamicRealVector genomes can actually be evolved:

  • cut_and_splice: a crossover that recombines two variable-length parents and yields two children whose lengths may differ from either parent.
  • DynamicGaussianMutation: a mutation that combines per-gene Gaussian perturbation with length-changing insert/delete.

These live under crate::genome (not crate::operators) so they stay next to the genome type they are specialized for, and they operate directly on DynamicRealVector rather than through the operator traits.

Structs§

DynamicGaussianMutation
Length-aware mutation for DynamicRealVector.

Functions§

cut_and_splice
Cut-and-splice crossover for variable-length real vectors.