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
convergedwhether the algorithm has converged to a solution up to the specified tolerancenum_iternumber of iterationsfpr_normnorm of the fixed-point residual; a gauge of the solution qualitycost_valuethe 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 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 SolverStatus
impl Debug for SolverStatus
Source§impl PartialEq for SolverStatus
impl PartialEq for SolverStatus
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 UnsafeUnpin 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