Struct radiate_rust::engines::genome::population::Population
source · pub struct Population<G: Gene<G, A>, A> {
pub individuals: Vec<Phenotype<G, A>>,
pub is_sorted: bool,
}Fields§
§individuals: Vec<Phenotype<G, A>>§is_sorted: boolImplementations§
source§impl<G: Gene<G, A>, A> Population<G, A>
impl<G: Gene<G, A>, A> Population<G, A>
pub fn get(&self, index: usize) -> &Phenotype<G, A>
pub fn get_mut(&mut self, index: usize) -> &mut Phenotype<G, A>
pub fn set(&mut self, index: usize, individual: Phenotype<G, A>)
pub fn iter(&self) -> Iter<'_, Phenotype<G, A>>
pub fn iter_mut(&mut self) -> IterMut<'_, Phenotype<G, A>>
pub fn len(&self) -> usize
pub fn sort_by<F>(&mut self, f: F)
pub fn from_vec(individuals: Vec<Phenotype<G, A>>) -> Self
pub fn from_func<F>(size: usize, f: F) -> Self
Trait Implementations§
source§impl<G: Gene<G, A>, A> Clone for Population<G, A>
impl<G: Gene<G, A>, A> Clone for Population<G, A>
source§impl<G: Gene<G, A>, A> FromIterator<Phenotype<G, A>> for Population<G, A>
impl<G: Gene<G, A>, A> FromIterator<Phenotype<G, A>> for Population<G, A>
source§impl<G: Gene<G, A>, A> IntoIterator for Population<G, A>
impl<G: Gene<G, A>, A> IntoIterator for Population<G, A>
Auto Trait Implementations§
impl<G, A> Freeze for Population<G, A>
impl<G, A> RefUnwindSafe for Population<G, A>where
A: RefUnwindSafe,
G: RefUnwindSafe,
impl<G, A> Send for Population<G, A>
impl<G, A> Sync for Population<G, A>
impl<G, A> Unpin for Population<G, A>
impl<G, A> UnwindSafe for Population<G, A>where
A: UnwindSafe,
G: 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)