pub struct Chromosome<G> {
pub value: Vec<G>,
pub fitness: f64,
}Expand description
Represents a Chromosome with Genes
Fields§
§value: Vec<G>§fitness: f64Implementations§
Source§impl<G> Chromosome<G>
impl<G> Chromosome<G>
Sourcepub fn new(value: Vec<G>) -> Self
pub fn new(value: Vec<G>) -> Self
Creates a new Chromosome
Trait Implementations§
Source§impl<G: Clone> Clone for Chromosome<G>
impl<G: Clone> Clone for Chromosome<G>
Source§fn clone(&self) -> Chromosome<G>
fn clone(&self) -> Chromosome<G>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<G: Debug> Debug for Chromosome<G>
impl<G: Debug> Debug for Chromosome<G>
Source§impl<G> Ord for Chromosome<G>where
G: PartialEq,
impl<G> Ord for Chromosome<G>where
G: PartialEq,
Source§impl<G: PartialEq> PartialEq for Chromosome<G>
impl<G: PartialEq> PartialEq for Chromosome<G>
Source§impl<G> PartialOrd for Chromosome<G>where
G: PartialEq,
impl<G> PartialOrd for Chromosome<G>where
G: PartialEq,
impl<G> Eq for Chromosome<G>where
G: PartialEq,
impl<G> StructuralPartialEq for Chromosome<G>
Auto Trait Implementations§
impl<G> Freeze for Chromosome<G>
impl<G> RefUnwindSafe for Chromosome<G>where
G: RefUnwindSafe,
impl<G> Send for Chromosome<G>where
G: Send,
impl<G> Sync for Chromosome<G>where
G: Sync,
impl<G> Unpin for Chromosome<G>where
G: Unpin,
impl<G> UnwindSafe for Chromosome<G>where
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