[][src]Enum radiate::engine::survival::SurvivalCriteria

pub enum SurvivalCriteria {
    Fittest,
    TopNumber(usize),
    TopPercent(f32),
}

Note these should not be directly exposed to the user as to avoid confusion with /// too many knobs to turn to create a population. Instead, provide functions to add /// them and defaults if they are not added. These are not nessesarily needed options, /// they are add-ons and really only for if you really want to test around with your /// structure that is evolving, provides users with more options wich is always good /// Implement a way to pick which way to pick those members who survice each generation, in other words - pick who gets to stay, those who do not get to stay 'die off' and are replaced by the children

Fittest - the default option, the top member from each species TopNumber - given a number, keep the top number regardless of species TopPercent - given a percent out of 100, keep the top percent regardless of species

Variants

Fittest
TopNumber(usize)
TopPercent(f32)

Methods

impl SurvivalCriteria[src]

Implement the survival enum

pub fn pick_survivers<T, E>(
    &self,
    members: &mut Vec<Container<T, E>>,
    families: &Vec<Family<T, E>>
) -> Option<Vec<Arc<RwLock<T>>>> where
    T: Genome<T, E> + Send + Sync + Clone,
    E: Send + Sync
[src]

Based on the survival critera, given a vec of containers and families, pick who survives

Trait Implementations

impl Clone for SurvivalCriteria[src]

impl Debug for SurvivalCriteria[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Type for T where
    T: ?Sized
[src]

impl<T> Type for T[src]

type Meta = Concrete

Type of metadata for type.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,