Struct genetic_planner::genetic::Population [] [src]

pub struct Population<T: 'static> {
    pub individuals_and_scores: Vec<(Individual<T>, i32)>,
    pub configuration: PopulationConfiguration<T>,
    pub generation: usize,
}

A set of Individuals

Fields

Contains set of Individual and the relative score

Contains the configurations used to create the Population

Rappresent the generation of the Population

Methods

impl<T> Population<T> where
    T: Clone + Rand + Send + Sync + PartialEq + 'static, 
[src]

Create a new Population from a vector of individuals, a configuration and the number of the generation

Create a new random generation accordingly the configuration

Get the Individual and the relative score of the Individual with the highest score

Create a new Population from the current, using the crossover and mutation operator

Trait Implementations

impl<T: Clone + 'static> Clone for Population<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more