pub struct OperatorStats {
pub weight: f64,
pub times_used: usize,
pub total_score: f64,
pub segment_score: f64,
pub segment_uses: usize,
}Expand description
Statistics for an operator.
Fields§
§weight: f64Current weight
times_used: usizeNumber of times used
total_score: f64Total score accumulated
segment_score: f64Score in current segment
segment_uses: usizeUses in current segment
Implementations§
Source§impl OperatorStats
impl OperatorStats
Sourcepub fn record_use(&mut self, score: f64)
pub fn record_use(&mut self, score: f64)
Record operator usage with a score.
Sourcepub fn update_weight(&mut self, reaction_factor: f64, min_weight: f64)
pub fn update_weight(&mut self, reaction_factor: f64, min_weight: f64)
Update weight at end of segment.
Trait Implementations§
Source§impl Clone for OperatorStats
impl Clone for OperatorStats
Source§fn clone(&self) -> OperatorStats
fn clone(&self) -> OperatorStats
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 OperatorStats
impl Debug for OperatorStats
Auto Trait Implementations§
impl Freeze for OperatorStats
impl RefUnwindSafe for OperatorStats
impl Send for OperatorStats
impl Sync for OperatorStats
impl Unpin for OperatorStats
impl UnwindSafe for OperatorStats
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§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 moreSource§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).Source§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.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.