Struct genevo::termination::limit::FitnessLimit
source · [−]Expand description
The FitnessLimit
condition stops the simulation after a solution with
a certain fitness has been found.
Implementations
sourceimpl<G, F> FitnessLimit<G, F> where
G: Genotype,
F: Fitness,
impl<G, F> FitnessLimit<G, F> where
G: Genotype,
F: Fitness,
sourcepub fn new(fitness_target: F) -> Self
pub fn new(fitness_target: F) -> Self
Create a new instance of FitnessLimit
with the specified limit
of generations.
sourcepub fn fitness_target(&self) -> &F
pub fn fitness_target(&self) -> &F
Returns the fitness value that shall be reached to stop the simulation.
Trait Implementations
sourceimpl<G: Clone, F: Clone> Clone for FitnessLimit<G, F> where
G: Genotype,
F: Fitness,
impl<G: Clone, F: Clone> Clone for FitnessLimit<G, F> where
G: Genotype,
F: Fitness,
sourcefn clone(&self) -> FitnessLimit<G, F>
fn clone(&self) -> FitnessLimit<G, F>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<G: PartialEq, F: PartialEq> PartialEq<FitnessLimit<G, F>> for FitnessLimit<G, F> where
G: Genotype,
F: Fitness,
impl<G: PartialEq, F: PartialEq> PartialEq<FitnessLimit<G, F>> for FitnessLimit<G, F> where
G: Genotype,
F: Fitness,
sourcefn eq(&self, other: &FitnessLimit<G, F>) -> bool
fn eq(&self, other: &FitnessLimit<G, F>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &FitnessLimit<G, F>) -> bool
fn ne(&self, other: &FitnessLimit<G, F>) -> bool
This method tests for !=
.
sourceimpl<G, F, E, S, C, M, R> Termination<GeneticAlgorithm<G, F, E, S, C, M, R>> for FitnessLimit<G, F> where
G: Genotype,
F: Fitness + Send + Sync,
E: FitnessFunction<G, F>,
E: FitnessFunction<G, F> + Sync,
S: SelectionOp<G, F>,
C: CrossoverOp<G> + Sync,
M: MutationOp<G> + Sync,
R: ReinsertionOp<G, F>,
impl<G, F, E, S, C, M, R> Termination<GeneticAlgorithm<G, F, E, S, C, M, R>> for FitnessLimit<G, F> where
G: Genotype,
F: Fitness + Send + Sync,
E: FitnessFunction<G, F>,
E: FitnessFunction<G, F> + Sync,
S: SelectionOp<G, F>,
C: CrossoverOp<G> + Sync,
M: MutationOp<G> + Sync,
R: ReinsertionOp<G, F>,
impl<G, F> StructuralPartialEq for FitnessLimit<G, F> where
G: Genotype,
F: Fitness,
Auto Trait Implementations
impl<G, F> RefUnwindSafe for FitnessLimit<G, F> where
F: RefUnwindSafe,
G: RefUnwindSafe,
impl<G, F> Send for FitnessLimit<G, F> where
F: Send,
impl<G, F> Sync for FitnessLimit<G, F> where
F: Sync,
impl<G, F> Unpin for FitnessLimit<G, F> where
F: Unpin,
G: Unpin,
impl<G, F> UnwindSafe for FitnessLimit<G, F> where
F: UnwindSafe,
G: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more