Struct radiate_rust::engines::genome::chromosome::Chromosome
source · pub struct Chromosome<G: Gene<G, A>, A> {
pub genes: Vec<G>,
/* private fields */
}Fields§
§genes: Vec<G>Implementations§
source§impl<G: Gene<G, A>, A> Chromosome<G, A>
impl<G: Gene<G, A>, A> Chromosome<G, A>
pub fn from_genes(genes: Vec<G>) -> Self
pub fn get_gene(&self, index: usize) -> &G
pub fn set_gene(&mut self, index: usize, gene: G)
pub fn len(&self) -> usize
pub fn is_valid(&self) -> bool
pub fn iter(&self) -> Iter<'_, G>
pub fn iter_mut(&mut self) -> IterMut<'_, G>
Trait Implementations§
source§impl<G: Gene<G, A>, A> Clone for Chromosome<G, A>
impl<G: Gene<G, A>, A> Clone for Chromosome<G, A>
Auto Trait Implementations§
impl<G, A> Freeze for Chromosome<G, A>
impl<G, A> RefUnwindSafe for Chromosome<G, A>where
A: RefUnwindSafe,
G: RefUnwindSafe,
impl<G, A> Send for Chromosome<G, A>
impl<G, A> Sync for Chromosome<G, A>
impl<G, A> Unpin for Chromosome<G, A>
impl<G, A> UnwindSafe for Chromosome<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)