[−][src]Struct optlib::genetic::cross::CrossMean
Child chromosome is arithmetic mean of parent chromosomes. Result of cross is single child. The chromosomes must be numeric type.
Methods
impl CrossMean
[src]
Trait Implementations
impl<G: NumCast + Num + Clone> Cross<G> for CrossMean
[src]
use optlib::genetic::cross; use optlib::genetic::Cross; assert!(cross::CrossMean::new().cross(&vec![&1.0_f32, &2.0_f32]) == vec![1.5_f32]); assert!(cross::CrossMean::new().cross(&vec![&0.0_f64, &1.0_f64]) == vec![0.5_f64]); assert!(cross::CrossMean::new().cross(&vec![&0.0_f64, &1.0_f64, &2.0_f64]) == vec![1.0_f64]);
Auto Trait Implementations
impl Send for CrossMean
impl Sync for CrossMean
impl Unpin for CrossMean
impl UnwindSafe for CrossMean
impl RefUnwindSafe for CrossMean
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,