pub struct ProgressInfo {
pub iteration: u32,
pub total_iterations: u32,
pub utilization: f64,
pub best_fitness: f64,
pub items_placed: usize,
pub total_items: usize,
pub elapsed_ms: u64,
pub phase: String,
pub running: bool,
}Expand description
Progress information during solving.
Fields§
§iteration: u32Current iteration/generation number.
total_iterations: u32Total expected iterations (0 if unknown).
utilization: f64Current best utilization (0.0 to 1.0).
best_fitness: f64Current best fitness value.
items_placed: usizeNumber of items placed.
total_items: usizeTotal number of items.
elapsed_ms: u64Elapsed time in milliseconds.
phase: StringCurrent phase/stage description.
running: boolWhether the solver is still running.
Implementations§
Source§impl ProgressInfo
impl ProgressInfo
Sourcepub fn with_iteration(self, current: u32, total: u32) -> Self
pub fn with_iteration(self, current: u32, total: u32) -> Self
Sets the iteration info.
Sourcepub fn with_utilization(self, utilization: f64) -> Self
pub fn with_utilization(self, utilization: f64) -> Self
Sets the utilization.
Sourcepub fn with_fitness(self, fitness: f64) -> Self
pub fn with_fitness(self, fitness: f64) -> Self
Sets the best fitness.
Sourcepub fn with_items(self, placed: usize, total: usize) -> Self
pub fn with_items(self, placed: usize, total: usize) -> Self
Sets the items placed info.
Sourcepub fn with_elapsed(self, elapsed_ms: u64) -> Self
pub fn with_elapsed(self, elapsed_ms: u64) -> Self
Sets the elapsed time.
Sourcepub fn with_phase(self, phase: impl Into<String>) -> Self
pub fn with_phase(self, phase: impl Into<String>) -> Self
Sets the phase description.
Sourcepub fn progress_percent(&self) -> f64
pub fn progress_percent(&self) -> f64
Calculates the progress percentage (0.0 to 1.0).
Trait Implementations§
Source§impl Clone for ProgressInfo
impl Clone for ProgressInfo
Source§fn clone(&self) -> ProgressInfo
fn clone(&self) -> ProgressInfo
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 ProgressInfo
impl Debug for ProgressInfo
Source§impl Default for ProgressInfo
impl Default for ProgressInfo
Source§fn default() -> ProgressInfo
fn default() -> ProgressInfo
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ProgressInfo
impl RefUnwindSafe for ProgressInfo
impl Send for ProgressInfo
impl Sync for ProgressInfo
impl Unpin for ProgressInfo
impl UnwindSafe for ProgressInfo
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.