pub struct GAPopulation<T: GASolution> { /* private fields */ }Expand description
Genetic Algorithm Population
Implementations§
Source§impl<T: GASolution> GAPopulation<T>
impl<T: GASolution> GAPopulation<T>
pub fn new(p: Vec<T>, order: GAPopulationSortOrder) -> GAPopulation<T>
pub fn population(&mut self) -> &mut Vec<T>
pub fn evaluate(&mut self)
pub fn size(&self) -> usize
pub fn order(&self) -> GAPopulationSortOrder
pub fn select(&self) -> &T
pub fn best(&self) -> &T
pub fn worst(&self) -> &T
pub fn best_by_raw_score(&self) -> &T
pub fn worst_by_raw_score(&self) -> &T
pub fn best_by_scaled_score(&self) -> &T
pub fn worst_by_scaled_score(&self) -> &T
pub fn individual(&self, i: usize, sort_basis: GAPopulationSortBasis) -> &T
pub fn sort(&mut self)
pub fn sort_int(&mut self, force_sort: bool, sort_basis: GAPopulationSortBasis)
Auto Trait Implementations§
impl<T> Freeze for GAPopulation<T>
impl<T> RefUnwindSafe for GAPopulation<T>where
T: RefUnwindSafe,
impl<T> Send for GAPopulation<T>where
T: Send,
impl<T> Sync for GAPopulation<T>where
T: Sync,
impl<T> Unpin for GAPopulation<T>where
T: Unpin,
impl<T> UnwindSafe for GAPopulation<T>where
T: 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