pub enum SimulationType {
EndIteration(u32),
EndFitness(f64),
EndFactor(f64),
}
Expand description
The SimulationType
type. Speficies the criteria on how a simulation should stop.
Variants§
EndIteration(u32)
Finish the simulation when a number of iteration has been reached.
EndFitness(f64)
Finish the simulation when a specific fitness is rached.
That means if at least one of the individuals has this fitness.
The fitness is calculated using the implemented calculate_fitness
functions
of the Individual
trait.
EndFactor(f64)
Finish the simulation when a specific improvement factor is reached. That means the relation between the very first fitness and the current fitness of the fittest individual.
Trait Implementations§
Source§impl Clone for SimulationType
impl Clone for SimulationType
Source§fn clone(&self) -> SimulationType
fn clone(&self) -> SimulationType
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 Freeze for SimulationType
impl RefUnwindSafe for SimulationType
impl Send for SimulationType
impl Sync for SimulationType
impl Unpin for SimulationType
impl UnwindSafe for SimulationType
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