Struct genetic_algorithms::population::Population
source · pub struct Population<U>where
U: GenotypeT,{
pub individuals: Vec<U>,
pub generation_numbers: Vec<i32>,
pub f_avg: f64,
pub f_max: f64,
}
Fields§
§individuals: Vec<U>
§generation_numbers: Vec<i32>
§f_avg: f64
§f_max: f64
Implementations§
source§impl<U> Population<U>where
U: GenotypeT,
impl<U> Population<U>where
U: GenotypeT,
pub fn new_empty() -> Population<U>
pub fn new(individuals: Vec<U>) -> Population<U>
pub fn aga_init(&mut self)
pub fn add_individual_gn( &mut self, individual: U, generation_number: i32, aga: bool )
pub fn add_individuals(&mut self, individuals: &mut Vec<U>, aga: bool)
pub fn size(&self) -> usize
Auto Trait Implementations§
impl<U> RefUnwindSafe for Population<U>where
U: RefUnwindSafe,
impl<U> Send for Population<U>where
U: Send,
impl<U> Sync for Population<U>where
U: Sync,
impl<U> Unpin for Population<U>where
U: Unpin,
impl<U> UnwindSafe for Population<U>where
U: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more