pub fn simulated_binary_crossover<R: Rng>(rng: &mut R,
                                          ind1: &mut [f32],
                                          ind2: &mut [f32],
                                          eta: f32) {
    assert!(ind1.len() == ind2.len());

    let iter = ind1.iter_mut().zip(ind2.iter_mut());
    for (x1, x2) in iter {
        let (c1, c2) = sbx_single_var(rng, (*x1, *x2), eta);
        *x1 = c1;
        *x2 = c2;
    }
}
/// Modifies ind1 and ind2 in-place.
/// Reference: http://www.iitk.ac.in/kangal/papers/k2011017.pdf
Modifies ind1 and ind2 in-place.
Modifies ind1 and ind2 in - place .
pub fn simulated_binary_crossover<R: Rng>(rng: &mut R,
                                          ind1: &mut [f32],
                                          ind2: &mut [f32],
                                          eta: f32) {
    assert!(ind1.len() == ind2.len());
    let iter = ind1.iter_mut().zip(ind2.iter_mut());
    for (x1, x2) in iter {
        let (c1, c2) = sbx_single_var(rng, (*x1, *x2), eta);
        *x1 = c1;
        *x2 = c2;
    }
}
pub fn simulated_binary_crossover < R : Rng > ( rng : & mut R , ind1 : & mut [ f32 ] , ind2 : & mut [ f32 ] , eta : f32 ) { assert ! ( ind1 len ( ) ind2 len ( ) ) ; let iter = ind1 . iter_mut ( ) . zip ( ind2 . iter_mut ( ) ) ; for ( x1 , x2 ) in iter { let ( c1 , c2 ) = sbx_single_var ( rng , ( * x1 , * x2 ) , eta ) ; * x1 = c1 ; * x2 = c2 ; } }
Modifies ind1 and ind2 in-place.
Modifies ind1 and ind2 in - place .
rng
&mut R
ind1
&mut [f32]
ind2
&mut [f32]
eta
f32