[−][src]Struct optlib::genetic::Population
Stores all individuals for current generation.
T
- type of a point in the search space for goal function (chromosomes).
Methods
impl<T: Clone> Population<T>
[src]
pub fn iter(&self) -> Iter<Individual<T>>
[src]
Returns iterator for all individuals (Individual
struct) in population.
pub fn iter_mut(&mut self) -> IterMut<Individual<T>>
[src]
Returns mut iterator for all individuals (Individual
struct) in population.
pub fn get_iteration(&self) -> usize
[src]
Returns iteration number (generation number).
pub fn len(&self) -> usize
[src]
Returns count of the individuals in the population.
pub fn len_alive(&self) -> usize
[src]
Return count of live individuals
pub fn get_best(&self) -> &Option<Individual<T>>
[src]
Returns the best individual in the population if exists or None otherwise.
pub fn get_worst(&self) -> &Option<Individual<T>>
[src]
Returns the worst individual in the population if exists or None otherwise.
Trait Implementations
impl<T: Clone> Index<usize> for Population<T>
[src]
Index trait implementation for Population
type Output = Individual<T>
The returned type after indexing.
fn index(&self, index: usize) -> &Individual<T>
[src]
impl<T: Clone> IndexMut<usize> for Population<T>
[src]
IndexMut trait implementation for Population
fn index_mut<'a>(&'a mut self, index: usize) -> &'a mut Individual<T>
[src]
Auto Trait Implementations
impl<T> !Send for Population<T>
impl<T> !Sync for Population<T>
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,