Struct spdkit::GeneticBreeder
source · pub struct GeneticBreeder<C, S, G>where
C: VariationOperator<G>,
S: SelectionOperator,
G: Genome + Mutate,{ /* private fields */ }
Expand description
A breeder for genetic algorithm featuring a combined use of crossover and mutation operators.
Implementations§
source§impl<C, S, G> GeneticBreeder<C, S, G>where
C: VariationOperator<G>,
S: SelectionOperator,
G: Genome + Mutate,
impl<C, S, G> GeneticBreeder<C, S, G>where C: VariationOperator<G>, S: SelectionOperator, G: Genome + Mutate,
pub fn new() -> Self
pub fn with_crossover(self, c: C) -> Self
pub fn with_selector(self, s: S) -> Self
pub fn crossover_probability(self, p: f64) -> Self
pub fn mutation_probability(self, p: f64) -> Self
Trait Implementations§
source§impl<G, C, S> Breed<G> for GeneticBreeder<C, S, G>where
G: Genome + Mutate,
C: VariationOperator<G>,
S: SelectionOperator,
impl<G, C, S> Breed<G> for GeneticBreeder<C, S, G>where G: Genome + Mutate, C: VariationOperator<G>, S: SelectionOperator,
source§impl<C, S, G> Clone for GeneticBreeder<C, S, G>where
C: VariationOperator<G> + Clone,
S: SelectionOperator + Clone,
G: Genome + Mutate + Clone,
impl<C, S, G> Clone for GeneticBreeder<C, S, G>where C: VariationOperator<G> + Clone, S: SelectionOperator + Clone, G: Genome + Mutate + Clone,
source§fn clone(&self) -> GeneticBreeder<C, S, G>
fn clone(&self) -> GeneticBreeder<C, S, G>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<C, S, G> RefUnwindSafe for GeneticBreeder<C, S, G>where C: RefUnwindSafe, G: RefUnwindSafe, S: RefUnwindSafe,
impl<C, S, G> Send for GeneticBreeder<C, S, G>where C: Send, S: Send,
impl<C, S, G> Sync for GeneticBreeder<C, S, G>where C: Sync, G: Sync, S: Sync,
impl<C, S, G> Unpin for GeneticBreeder<C, S, G>where C: Unpin, G: Unpin, S: Unpin,
impl<C, S, G> UnwindSafe for GeneticBreeder<C, S, G>where C: UnwindSafe, G: UnwindSafe, S: UnwindSafe,
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.