pub struct ConjugateGradientSolution {
pub x: Vec<f64>,
pub relative_residual: f64,
pub iterations: usize,
pub status: Status,
}Expand description
The result of conjugate_gradient.
Fields§
§x: Vec<f64>The final iterate.
relative_residual: f64||b - A x||_2 / ||b||_2, recomputed from the matrix at the final
iterate (zero when b is zero). A computed value, not an estimate.
iterations: usizeIterations taken.
status: StatusStatus::Converged when the relative residual met the tolerance,
Status::BudgetExhausted when the iteration budget ran out first.
Implementations§
Source§impl ConjugateGradientSolution
impl ConjugateGradientSolution
Sourcepub fn converged(self) -> NumericResult<Self>
pub fn converged(self) -> NumericResult<Self>
The solution when its tolerance was met.
§Errors
NumericError::NotConverged with the relative residual reached.
Trait Implementations§
Source§impl Clone for ConjugateGradientSolution
impl Clone for ConjugateGradientSolution
Source§fn clone(&self) -> ConjugateGradientSolution
fn clone(&self) -> ConjugateGradientSolution
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 ConjugateGradientSolution
impl Debug for ConjugateGradientSolution
impl StructuralPartialEq for ConjugateGradientSolution
Auto Trait Implementations§
impl Freeze for ConjugateGradientSolution
impl RefUnwindSafe for ConjugateGradientSolution
impl Send for ConjugateGradientSolution
impl Sync for ConjugateGradientSolution
impl Unpin for ConjugateGradientSolution
impl UnwindSafe for ConjugateGradientSolution
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