pub struct TimingStats {
pub evaluation_ms: f64,
pub selection_ms: f64,
pub crossover_ms: f64,
pub mutation_ms: f64,
pub total_ms: f64,
}Expand description
Timing statistics
Fields§
§evaluation_ms: f64Time spent on fitness evaluation (ms)
selection_ms: f64Time spent on selection (ms)
crossover_ms: f64Time spent on crossover (ms)
mutation_ms: f64Time spent on mutation (ms)
total_ms: f64Total generation time (ms)
Implementations§
Source§impl TimingStats
impl TimingStats
Sourcepub fn with_evaluation(self, duration: Duration) -> Self
pub fn with_evaluation(self, duration: Duration) -> Self
Set evaluation time
Sourcepub fn with_selection(self, duration: Duration) -> Self
pub fn with_selection(self, duration: Duration) -> Self
Set selection time
Sourcepub fn with_crossover(self, duration: Duration) -> Self
pub fn with_crossover(self, duration: Duration) -> Self
Set crossover time
Sourcepub fn with_mutation(self, duration: Duration) -> Self
pub fn with_mutation(self, duration: Duration) -> Self
Set mutation time
Sourcepub fn with_total(self, duration: Duration) -> Self
pub fn with_total(self, duration: Duration) -> Self
Set total time
Trait Implementations§
Source§impl Clone for TimingStats
impl Clone for TimingStats
Source§fn clone(&self) -> TimingStats
fn clone(&self) -> TimingStats
Returns a duplicate 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 moreSource§impl Debug for TimingStats
impl Debug for TimingStats
Source§impl Default for TimingStats
impl Default for TimingStats
Source§fn default() -> TimingStats
fn default() -> TimingStats
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TimingStats
impl<'de> Deserialize<'de> for TimingStats
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TimingStats
impl RefUnwindSafe for TimingStats
impl Send for TimingStats
impl Sync for TimingStats
impl Unpin for TimingStats
impl UnsafeUnpin for TimingStats
impl UnwindSafe for TimingStats
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.