Struct optimization_engine::core::solver_status::SolverStatus
source · pub struct SolverStatus { /* private fields */ }
Expand description
Solver status
This structure contais information about the solver status. Instances of
SolverStatus
are returned by optimizers.
Implementations§
source§impl SolverStatus
impl SolverStatus
sourcepub fn new(
exit_status: ExitStatus,
num_iter: usize,
solve_time: Duration,
fpr_norm: f64,
cost_value: f64
) -> SolverStatus
pub fn new( exit_status: ExitStatus, num_iter: usize, solve_time: Duration, fpr_norm: f64, cost_value: f64 ) -> SolverStatus
Constructs a new instance of SolverStatus
§Arguments
converged
whether the algorithm has converged to a solution up to the specified tolerancenum_iter
number of iterationsfpr_norm
norm of the fixed-point residual; a gauge of the solution qualitycost_value
the value of the cost function at the solution
sourcepub fn has_converged(&self) -> bool
pub fn has_converged(&self) -> bool
whether the algorithm has converged
sourcepub fn iterations(&self) -> usize
pub fn iterations(&self) -> usize
number of iterations taken by the algorithm
sourcepub fn solve_time(&self) -> Duration
pub fn solve_time(&self) -> Duration
total execution time
sourcepub fn cost_value(&self) -> f64
pub fn cost_value(&self) -> f64
value of the cost at the solution
sourcepub fn exit_status(&self) -> ExitStatus
pub fn exit_status(&self) -> ExitStatus
exit status of solver
Trait Implementations§
source§impl Clone for SolverStatus
impl Clone for SolverStatus
source§fn clone(&self) -> SolverStatus
fn clone(&self) -> SolverStatus
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 moresource§impl Debug for SolverStatus
impl Debug for SolverStatus
source§impl PartialEq for SolverStatus
impl PartialEq for SolverStatus
source§fn eq(&self, other: &SolverStatus) -> bool
fn eq(&self, other: &SolverStatus) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for SolverStatus
impl StructuralPartialEq for SolverStatus
Auto Trait Implementations§
impl Freeze for SolverStatus
impl RefUnwindSafe for SolverStatus
impl Send for SolverStatus
impl Sync for SolverStatus
impl Unpin for SolverStatus
impl UnwindSafe for SolverStatus
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