Skip to main content

Module cross

Module cross 

Source
Expand description

The module with most usable algorithms of crossing for various types. The module contains struct which implements the Cross trait and functions to cross chromosomes various types.

Structs§

CrossBitwise
Bitwise cross. Use single point crossing. Result of cross is single child.
CrossMean
Child chromosome is arithmetic mean of parent chromosomes. Result of cross is single child. The chromosomes must be numeric type.
FloatCrossExp
Bitwise cross for float type chromosomes. Exponent and mantissa will be crossed independently. Use single point crossing. The sign is taken from one of parents at random.
FloatCrossGeometricMean
For float type chromosomes (f32, f64). Child chromosome is geometric mean of parent chromosomes. Result of cross is single child.
VecCrossAllGenes
Struct to cross all genes (G - type of genes) in chromosome of type Vec.

Functions§

cross_f32
Single point crossing.
cross_f64
Single point crossing.
cross_i8
Single point crossing.
cross_i16
Single point crossing.
cross_u8
Single point crossing.
cross_u16
Single point crossing.
cross_u32
Single point crossing.
cross_u64
Single point crossing.