pub struct SolverStatus<T = f64>where
T: Float,{ /* private fields */ }Expand description
Solver status
This structure contais information about the solver status. Instances of
SolverStatus are returned by optimizers.
Implementations§
Source§impl<T: Float> SolverStatus<T>
impl<T: Float> SolverStatus<T>
Sourcepub fn new(
exit_status: ExitStatus,
num_iter: usize,
solve_time: Duration,
fpr_norm: T,
cost_value: T,
) -> SolverStatus<T>
pub fn new( exit_status: ExitStatus, num_iter: usize, solve_time: Duration, fpr_norm: T, cost_value: T, ) -> SolverStatus<T>
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) -> T
pub fn cost_value(&self) -> T
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<T> Clone for SolverStatus<T>
impl<T> Clone for SolverStatus<T>
Source§fn clone(&self) -> SolverStatus<T>
fn clone(&self) -> SolverStatus<T>
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<T> Debug for SolverStatus<T>
impl<T> Debug for SolverStatus<T>
Source§impl<T> PartialEq for SolverStatus<T>
impl<T> PartialEq for SolverStatus<T>
impl<T> Copy for SolverStatus<T>
impl<T> StructuralPartialEq for SolverStatus<T>where
T: Float,
Auto Trait Implementations§
impl<T> Freeze for SolverStatus<T>where
T: Freeze,
impl<T> RefUnwindSafe for SolverStatus<T>where
T: RefUnwindSafe,
impl<T> Send for SolverStatus<T>where
T: Send,
impl<T> Sync for SolverStatus<T>where
T: Sync,
impl<T> Unpin for SolverStatus<T>where
T: Unpin,
impl<T> UnsafeUnpin for SolverStatus<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for SolverStatus<T>where
T: UnwindSafe,
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