pub struct Ecosystem<C: Chromosome> {
pub population: Population<C>,
pub species: Option<Vec<Species<C>>>,
}
Fields§
§population: Population<C>
§species: Option<Vec<Species<C>>>
Implementations§
Source§impl<C: Chromosome> Ecosystem<C>
impl<C: Chromosome> Ecosystem<C>
pub fn new(population: Population<C>) -> Self
pub fn population(&self) -> &Population<C>
pub fn population_mut(&mut self) -> &mut Population<C>
pub fn species(&self) -> Option<&Vec<Species<C>>>
pub fn species_mut(&mut self) -> Option<&mut Vec<Species<C>>>
pub fn get_phenotype(&self, index: usize) -> Option<&Phenotype<C>>
pub fn get_phenotype_mut(&mut self, index: usize) -> Option<&mut Phenotype<C>>
pub fn get_genotype(&self, index: usize) -> Option<&Genotype<C>>
pub fn get_genotype_mut(&mut self, index: usize) -> Option<&mut Genotype<C>>
pub fn get_species(&self, index: usize) -> Option<&Species<C>>
pub fn get_species_mut(&mut self, index: usize) -> Option<&mut Species<C>>
pub fn species_mascots(&self) -> Vec<&Phenotype<C>>
pub fn push_species(&mut self, species: Species<C>)
pub fn add_species_member(&mut self, species_idx: usize, member_idx: usize)where
C: Clone,
pub fn generate_mascots(&mut self)where
C: Clone,
Trait Implementations§
Auto Trait Implementations§
impl<C> Freeze for Ecosystem<C>
impl<C> !RefUnwindSafe for Ecosystem<C>
impl<C> Send for Ecosystem<C>
impl<C> Sync for Ecosystem<C>
impl<C> Unpin for Ecosystem<C>where
C: Unpin,
impl<C> !UnwindSafe for Ecosystem<C>
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