pub struct PermutateBuilder<G: PermutateGenotype, F: Fitness<Genotype = G>, SR: StrategyReporter<Genotype = G>> {
pub genotype: Option<G>,
pub fitness: Option<F>,
pub fitness_ordering: FitnessOrdering,
pub par_fitness: bool,
pub replace_on_equal_fitness: bool,
pub reporter: SR,
}
Expand description
The builder for an Permutate struct.
Fields§
§genotype: Option<G>
§fitness: Option<F>
§fitness_ordering: FitnessOrdering
§par_fitness: bool
§replace_on_equal_fitness: bool
§reporter: SR
Implementations§
Source§impl<G: PermutateGenotype, F: Fitness<Genotype = G>> Builder<G, F, StrategyReporterNoop<G>>
impl<G: PermutateGenotype, F: Fitness<Genotype = G>> Builder<G, F, StrategyReporterNoop<G>>
Source§impl<G: PermutateGenotype, F: Fitness<Genotype = G>, SR: StrategyReporter<Genotype = G>> Builder<G, F, SR>
impl<G: PermutateGenotype, F: Fitness<Genotype = G>, SR: StrategyReporter<Genotype = G>> Builder<G, F, SR>
pub fn build(self) -> Result<Permutate<G, F, SR>, TryFromBuilderError>
pub fn with_genotype(self, genotype: G) -> Self
pub fn with_fitness_ordering(self, fitness_ordering: FitnessOrdering) -> Self
pub fn with_par_fitness(self, par_fitness: bool) -> Self
pub fn with_replace_on_equal_fitness( self, replace_on_equal_fitness: bool, ) -> Self
pub fn with_fitness(self, fitness: F) -> Self
pub fn with_reporter<SR2: StrategyReporter<Genotype = G>>( self, reporter: SR2, ) -> Builder<G, F, SR2>
Source§impl<G: PermutateGenotype, F: Fitness<Genotype = G>, SR: StrategyReporter<Genotype = G>> Builder<G, F, SR>
impl<G: PermutateGenotype, F: Fitness<Genotype = G>, SR: StrategyReporter<Genotype = G>> Builder<G, F, SR>
pub fn call(self) -> Result<Permutate<G, F, SR>, TryFromBuilderError>
Trait Implementations§
Source§impl<G: Clone + PermutateGenotype, F: Clone + Fitness<Genotype = G>, SR: Clone + StrategyReporter<Genotype = G>> Clone for Builder<G, F, SR>
impl<G: Clone + PermutateGenotype, F: Clone + Fitness<Genotype = G>, SR: Clone + StrategyReporter<Genotype = G>> Clone for Builder<G, F, SR>
Source§impl<G: Debug + PermutateGenotype, F: Debug + Fitness<Genotype = G>, SR: Debug + StrategyReporter<Genotype = G>> Debug for Builder<G, F, SR>
impl<G: Debug + PermutateGenotype, F: Debug + Fitness<Genotype = G>, SR: Debug + StrategyReporter<Genotype = G>> Debug for Builder<G, F, SR>
Source§impl<G: PermutateGenotype, F: Fitness<Genotype = G>> Default for Builder<G, F, StrategyReporterNoop<G>>
impl<G: PermutateGenotype, F: Fitness<Genotype = G>> Default for Builder<G, F, StrategyReporterNoop<G>>
Source§impl<G: PermutateGenotype, F: Fitness<Genotype = G>, SR: StrategyReporter<Genotype = G>> TryFrom<Builder<G, F, SR>> for Permutate<G, F, SR>
impl<G: PermutateGenotype, F: Fitness<Genotype = G>, SR: StrategyReporter<Genotype = G>> TryFrom<Builder<G, F, SR>> for Permutate<G, F, SR>
Source§type Error = TryFromStrategyBuilderError
type Error = TryFromStrategyBuilderError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl<G, F, SR> Freeze for Builder<G, F, SR>
impl<G, F, SR> RefUnwindSafe for Builder<G, F, SR>
impl<G, F, SR> Send for Builder<G, F, SR>
impl<G, F, SR> Sync for Builder<G, F, SR>
impl<G, F, SR> Unpin for Builder<G, F, SR>
impl<G, F, SR> UnwindSafe for Builder<G, F, SR>
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,
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