pub struct GPParams {
pub selection: GPSelection,
pub population_size: usize,
pub tournament_size: usize,
pub mutation_prob: f64,
pub n_delta: usize,
}Expand description
Parameters for genetic programming.
Fields§
§selection: GPSelectionThe mechanism by which individuals are selected for inclusion in the population.
population_size: usize§tournament_size: usize§mutation_prob: f64Probability for a mutation. If mutation doesn’t happen, the crossover will happen.
n_delta: usizeThe number of new children added to the population with each step of evolution.
Traditionally, this would be set to 1. If it is larger than 1, mutations and crossover will
be repeated until the threshold of n_delta is met.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GPParams
impl<'de> Deserialize<'de> for GPParams
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GPParams
impl RefUnwindSafe for GPParams
impl Send for GPParams
impl Sync for GPParams
impl Unpin for GPParams
impl UnwindSafe for GPParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more