pub struct Builder;Expand description
§Builder
Use this struct to construct concrete builder of genetic algorithm.
See public methods descriptions for explaination.
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn new<IndividualT, MutOpT, CrossOpT, SelOpT, ReplOpT, PopGenT, FitnessT, ProbeT>() -> GenericBuilder<IndividualT, MutOpT, CrossOpT, SelOpT, ReplOpT, PopGenT, FitnessT, ProbeT>where
IndividualT: IndividualTrait,
MutOpT: MutationOperator<IndividualT>,
CrossOpT: CrossoverOperator<IndividualT>,
SelOpT: SelectionOperator<IndividualT>,
ReplOpT: ReplacementOperator<IndividualT>,
PopGenT: PopulationGenerator<IndividualT>,
FitnessT: Fitness<IndividualT>,
ProbeT: Probe<IndividualT>,
pub fn new<IndividualT, MutOpT, CrossOpT, SelOpT, ReplOpT, PopGenT, FitnessT, ProbeT>() -> GenericBuilder<IndividualT, MutOpT, CrossOpT, SelOpT, ReplOpT, PopGenT, FitnessT, ProbeT>where
IndividualT: IndividualTrait,
MutOpT: MutationOperator<IndividualT>,
CrossOpT: CrossoverOperator<IndividualT>,
SelOpT: SelectionOperator<IndividualT>,
ReplOpT: ReplacementOperator<IndividualT>,
PopGenT: PopulationGenerator<IndividualT>,
FitnessT: Fitness<IndividualT>,
ProbeT: Probe<IndividualT>,
Returns new instance of GenericBuilder
Use this function if you want to configure operators && parameters for your optimizer
Sourcepub fn with_rvc<F: Fitness<RealValueIndividual>>() -> RealValuedBuilder<F>
pub fn with_rvc<F: Fitness<RealValueIndividual>>() -> RealValuedBuilder<F>
Returns new instance of RealValuedBuilder
Use this function if your problem uses real valued chromosome and you don’t want to specify all the operators manually but rely on provided defaults.
Please note that sticking to defaults rarely results in great performance.
Sourcepub fn with_bsc<F: Fitness<BitStringIndividual>>() -> BitStringBuilder<F>
pub fn with_bsc<F: Fitness<BitStringIndividual>>() -> BitStringBuilder<F>
Returns new instance of BitStringBuilder
Use this function if your problem uses bit string chromosome and you don’t want to specify all the operators manually but rely on provided defaults.
Please note that sticking to defaults rarely results in great performance.
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnsafeUnpin for Builder
impl UnwindSafe for Builder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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> ⓘ
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