pub struct Individual<T> { /* private fields */ }Expand description
Struct for single point (agent) in the search space
T - type of a point in the search space for goal function (chromosomes).
Implementations§
Source§impl<T> Individual<T>
impl<T> Individual<T>
Sourcepub fn get_chromosomes(&self) -> &T
pub fn get_chromosomes(&self) -> &T
Return reference to chromosomes.
Sourcepub fn get_fitness(&self) -> f64
pub fn get_fitness(&self) -> f64
Return value of the goal function.
Trait Implementations§
Source§impl<T> Agent<T> for Individual<T>
impl<T> Agent<T> for Individual<T>
Source§impl<T: Clone> Clone for Individual<T>
impl<T: Clone> Clone for Individual<T>
Source§fn clone(&self) -> Individual<T>
fn clone(&self) -> Individual<T>
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 moreAuto Trait Implementations§
impl<T> Freeze for Individual<T>where
T: Freeze,
impl<T> RefUnwindSafe for Individual<T>where
T: RefUnwindSafe,
impl<T> Send for Individual<T>where
T: Send,
impl<T> Sync for Individual<T>where
T: Sync,
impl<T> Unpin for Individual<T>where
T: Unpin,
impl<T> UnwindSafe for Individual<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