Struct genetic_planner::genetic::Individual
[−]
[src]
pub struct Individual<T: 'static> { pub genes: Vec<T>, }
Rappresent a candidate solution for the problem
Fields
genes: Vec<T>
Methods
impl<T> Individual<T> where T: Clone + Rand + Send + Sync + PartialEq + 'static
[src]
fn new(genenumber: usize) -> Individual<T>
Create a new individual which contains a vector of genenumber of random initiliazed T
fn new_with_vec(v: Vec<T>) -> Individual<T>
Create a new individual from a vector of T
fn crossover(&self, i2: Individual<T>, uniform_rate: f32) -> Individual<T>
Return an Individual
fn mutate(&self, mutation_rate: f32) -> Individual<T>
Return an Individual
Trait Implementations
impl<T: PartialEq + 'static> PartialEq for Individual<T>
[src]
fn eq(&self, __arg_0: &Individual<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Individual<T>) -> bool
This method tests for !=
.
impl<T: Clone + 'static> Clone for Individual<T>
[src]
fn clone(&self) -> Individual<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more