Struct darwin_rs::individual::IndividualWrapper [] [src]

pub struct IndividualWrapper<T: Individual> {
    pub individual: T,
    pub fitness: f64,
    pub num_of_mutations: u32,
    pub id: u32,
}

A wrapper helper struct for the individuals. It does the book keeping of the fitness and the number of mutations this individual has to run in one iteration.

Fields

The actual individual, user defined struct.

The current calculated fitness for this individual.

The number of mutation this individual is doing in one iteration.

The id of the population that this individual belongs to. Just for statistics.

Trait Implementations

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

Formats the value using the given formatter.

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Individual> PartialEq for IndividualWrapper<T>
[src]

Implement this for sorting

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T: Individual> Eq for IndividualWrapper<T>
[src]

Implement this for sorting

impl<T: Individual> Ord for IndividualWrapper<T>
[src]

Implement this for sorting

This method returns an Ordering between self and other. Read more

impl<T: Individual> PartialOrd for IndividualWrapper<T>
[src]

Implement this for sorting

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more