pub struct SolverStats {
pub step_count: u64,
pub moves_evaluated: u64,
pub moves_accepted: u64,
pub score_calculations: u64,
/* private fields */
}Fields§
§step_count: u64§moves_evaluated: u64§moves_accepted: u64§score_calculations: u64Implementations§
Source§impl SolverStats
impl SolverStats
pub fn elapsed(&self) -> Duration
Sourcepub fn record_move(&mut self, accepted: bool)
pub fn record_move(&mut self, accepted: bool)
Records a move evaluation and whether it was accepted.
Sourcepub fn record_step(&mut self)
pub fn record_step(&mut self)
Records a step completion.
Sourcepub fn record_score_calculation(&mut self)
pub fn record_score_calculation(&mut self)
Records a score calculation.
pub fn moves_per_second(&self) -> f64
pub fn acceptance_rate(&self) -> f64
Trait Implementations§
Source§impl Debug for SolverStats
impl Debug for SolverStats
Source§impl Default for SolverStats
impl Default for SolverStats
Source§fn default() -> SolverStats
fn default() -> SolverStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SolverStats
impl RefUnwindSafe for SolverStats
impl Send for SolverStats
impl Sync for SolverStats
impl Unpin for SolverStats
impl UnsafeUnpin for SolverStats
impl UnwindSafe for SolverStats
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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