[][src]Struct optlib::genetic::Individual

pub struct Individual<T: Clone> { /* fields omitted */ }

Struct for single point (agent) in the search space

T - type of a point in the search space for goal function (chromosomes).

Methods

impl<T: Clone> Individual<T>[src]

pub fn get_chromosomes(&self) -> &T[src]

Return reference to chromosomes.

pub fn get_fitness(&self) -> f64[src]

Return value of the guoal function.

pub fn is_alive(&self) -> bool[src]

Returns true if the individual go into the next generation and false otherwise.

pub fn kill(&mut self)[src]

Kill individual. The individual do not go into next generation.

Trait Implementations

impl<T: Clone> Agent<T> for Individual<T>[src]

impl<T: Clone> Clone for Individual<T>[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T: Debug + Clone> Debug for Individual<T>[src]

Auto Trait Implementations

impl<T> Send for Individual<T> where
    T: Send

impl<T> Sync for Individual<T> where
    T: Sync

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.