[−][src]Enum radiate::engine::survival::SurvivalCriteria
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 necessarily 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 which is always good /// Implement a way to pick which way to pick those members who survive 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
TopNumber(usize)
TopPercent(f32)
Implementations
impl SurvivalCriteria
[src]
Implement the survival enum
pub fn pick_survivors<T, E>(
&self,
members: &mut [Container<T, E>],
families: &[Family<T, E>]
) -> Option<Vec<Arc<RwLock<T>>>> where
T: Genome<T, E> + Send + Sync + Clone,
E: Send + Sync,
[src]
&self,
members: &mut [Container<T, E>],
families: &[Family<T, E>]
) -> Option<Vec<Arc<RwLock<T>>>> where
T: Genome<T, E> + Send + Sync + Clone,
E: Send + Sync,
Based on the survival criteria, given a vec of containers and families, pick who survives
Trait Implementations
impl Clone for SurvivalCriteria
[src]
fn clone(&self) -> SurvivalCriteria
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for SurvivalCriteria
[src]
impl<'de> Deserialize<'de> for SurvivalCriteria
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for SurvivalCriteria
[src]
Auto Trait Implementations
impl RefUnwindSafe for SurvivalCriteria
impl Send for SurvivalCriteria
impl Sync for SurvivalCriteria
impl Unpin for SurvivalCriteria
impl UnwindSafe for SurvivalCriteria
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Serialize for T where
T: Serialize + ?Sized,
[src]
T: Serialize + ?Sized,
pub fn erased_serialize(
&self,
serializer: &mut dyn Serializer
) -> Result<Ok, Error>
[src]
&self,
serializer: &mut dyn Serializer
) -> Result<Ok, Error>
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut 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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,