pub struct GeneticAlgorithm<S, Sel, Sur, Cross, Mut, F, G>where
S: SamplingOperator,
Sel: SelectionOperator<FDim = F::Dim>,
Sur: SurvivalOperator<FDim = F::Dim>,
Cross: CrossoverOperator,
Mut: MutationOperator,
F: FitnessFn,
G: ConstraintsFn,{
pub population: Option<Population<F::Dim, G::Dim>>,
pub context: AlgorithmContext,
/* private fields */
}Fields§
§population: Option<Population<F::Dim, G::Dim>>§context: AlgorithmContextImplementations§
Source§impl<S, Sel, Sur, Cross, Mut, F, G> GeneticAlgorithm<S, Sel, Sur, Cross, Mut, F, G>where
S: SamplingOperator,
Sel: SelectionOperator<FDim = F::Dim>,
Sur: SurvivalOperator<FDim = F::Dim>,
Cross: CrossoverOperator,
Mut: MutationOperator,
F: FitnessFn,
G: ConstraintsFn,
impl<S, Sel, Sur, Cross, Mut, F, G> GeneticAlgorithm<S, Sel, Sur, Cross, Mut, F, G>where
S: SamplingOperator,
Sel: SelectionOperator<FDim = F::Dim>,
Sur: SurvivalOperator<FDim = F::Dim>,
Cross: CrossoverOperator,
Mut: MutationOperator,
F: FitnessFn,
G: ConstraintsFn,
pub fn new( population: Option<Population<F::Dim, G::Dim>>, sampler: S, survivor: Sur, evolve: Evolve<Sel, Cross, Mut>, evaluator: Evaluator<F, G>, context: AlgorithmContext, verbose: bool, rng: MOORandomGenerator, ) -> Self
pub fn run(&mut self) -> Result<(), AlgorithmError>
Trait Implementations§
Source§impl<S, Sel, Sur, Cross, Mut, F, G> Debug for GeneticAlgorithm<S, Sel, Sur, Cross, Mut, F, G>where
S: SamplingOperator + Debug,
Sel: SelectionOperator<FDim = F::Dim> + Debug,
Sur: SurvivalOperator<FDim = F::Dim> + Debug,
Cross: CrossoverOperator + Debug,
Mut: MutationOperator + Debug,
F: FitnessFn + Debug,
G: ConstraintsFn + Debug,
F::Dim: Debug,
G::Dim: Debug,
impl<S, Sel, Sur, Cross, Mut, F, G> Debug for GeneticAlgorithm<S, Sel, Sur, Cross, Mut, F, G>where
S: SamplingOperator + Debug,
Sel: SelectionOperator<FDim = F::Dim> + Debug,
Sur: SurvivalOperator<FDim = F::Dim> + Debug,
Cross: CrossoverOperator + Debug,
Mut: MutationOperator + Debug,
F: FitnessFn + Debug,
G: ConstraintsFn + Debug,
F::Dim: Debug,
G::Dim: Debug,
Auto Trait Implementations§
impl<S, Sel, Sur, Cross, Mut, F, G> !RefUnwindSafe for GeneticAlgorithm<S, Sel, Sur, Cross, Mut, F, G>
impl<S, Sel, Sur, Cross, Mut, F, G> !Send for GeneticAlgorithm<S, Sel, Sur, Cross, Mut, F, G>
impl<S, Sel, Sur, Cross, Mut, F, G> !Sync for GeneticAlgorithm<S, Sel, Sur, Cross, Mut, F, G>
impl<S, Sel, Sur, Cross, Mut, F, G> !UnwindSafe for GeneticAlgorithm<S, Sel, Sur, Cross, Mut, F, G>
impl<S, Sel, Sur, Cross, Mut, F, G> Freeze for GeneticAlgorithm<S, Sel, Sur, Cross, Mut, F, G>
impl<S, Sel, Sur, Cross, Mut, F, G> Unpin for GeneticAlgorithm<S, Sel, Sur, Cross, Mut, F, G>
impl<S, Sel, Sur, Cross, Mut, F, G> UnsafeUnpin for GeneticAlgorithm<S, Sel, Sur, Cross, Mut, F, G>where
S: UnsafeUnpin,
Sur: UnsafeUnpin,
Sel: UnsafeUnpin,
Cross: UnsafeUnpin,
Mut: UnsafeUnpin,
F: UnsafeUnpin,
G: UnsafeUnpin,
<F as FitnessFn>::Dim: UnsafeUnpin,
<G as ConstraintsFn>::Dim: UnsafeUnpin,
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