pub struct GeneticTable {
pub population: usize,
pub elite_count: usize,
pub tournament_size: usize,
pub crossover_rate: f64,
pub mutation_rate: f64,
pub mutation_scale: f64,
pub reevaluate_fraction: f64,
}Expand description
Settings of a genetic algorithm, each defaulting to GeneticSettings::default.
Fields§
§population: usizeNumber of members in each generation.
elite_count: usizeNumber of best members of a generation carried unchanged into the next.
tournament_size: usizeNumber of members drawn for each tournament, the best of whom becomes a parent.
crossover_rate: f64Probability that a child has a second parent.
mutation_rate: f64Probability that each gene of a child changes.
mutation_scale: f64Largest step of a changed gene, as a fraction of its range.
reevaluate_fraction: f64Share of the population re-evaluated each generation, rounded up.
Trait Implementations§
Source§impl Clone for GeneticTable
impl Clone for GeneticTable
impl Copy for GeneticTable
Source§impl Debug for GeneticTable
impl Debug for GeneticTable
Source§impl Default for GeneticTable
impl Default for GeneticTable
Source§impl<'de> Deserialize<'de> for GeneticTablewhere
GeneticTable: Default,
impl<'de> Deserialize<'de> for GeneticTablewhere
GeneticTable: Default,
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
Source§impl From<&GeneticSettings> for GeneticTable
impl From<&GeneticSettings> for GeneticTable
Source§fn from(settings: &GeneticSettings) -> Self
fn from(settings: &GeneticSettings) -> Self
Converts to this type from the input type.
Source§impl From<GeneticTable> for GeneticSettings
impl From<GeneticTable> for GeneticSettings
Source§fn from(table: GeneticTable) -> Self
fn from(table: GeneticTable) -> Self
Converts to this type from the input type.
Source§impl PartialEq for GeneticTable
impl PartialEq for GeneticTable
Source§impl Serialize for GeneticTable
impl Serialize for GeneticTable
impl StructuralPartialEq for GeneticTable
Auto Trait Implementations§
impl Freeze for GeneticTable
impl RefUnwindSafe for GeneticTable
impl Send for GeneticTable
impl Sync for GeneticTable
impl Unpin for GeneticTable
impl UnsafeUnpin for GeneticTable
impl UnwindSafe for GeneticTable
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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