pub struct JacobiOperatorPreconditioner { /* private fields */ }Expand description
Diagonal (Jacobi) preconditioning built from any LinearOperator:
z[i] = r[i] / A[i][i].
Stores the reciprocal diagonal, so applying it is one multiply per row.
Cannot break down: a diagonal entry whose magnitude is below 1e-300 is
treated as 1.0, matching crate::krylov::JacobiPreconditioner.
§Units
The stored reciprocals carry the inverse of whatever units the matrix
entries had; treated as dimensionless f64 here.
Implementations§
Source§impl JacobiOperatorPreconditioner
impl JacobiOperatorPreconditioner
Sourcepub fn new<A: LinearOperator + ?Sized>(a: &A) -> Self
pub fn new<A: LinearOperator + ?Sized>(a: &A) -> Self
Extract and invert the diagonal of a.
Cost: one LinearOperator::diagonal call plus n divisions.
Sourcepub fn reciprocal_diagonal(&self) -> &[f64]
pub fn reciprocal_diagonal(&self) -> &[f64]
The stored reciprocal diagonal 1 / A[i][i], length n.
Trait Implementations§
Source§impl Clone for JacobiOperatorPreconditioner
impl Clone for JacobiOperatorPreconditioner
Source§impl Debug for JacobiOperatorPreconditioner
impl Debug for JacobiOperatorPreconditioner
Auto Trait Implementations§
impl Freeze for JacobiOperatorPreconditioner
impl RefUnwindSafe for JacobiOperatorPreconditioner
impl Send for JacobiOperatorPreconditioner
impl Sync for JacobiOperatorPreconditioner
impl Unpin for JacobiOperatorPreconditioner
impl UnsafeUnpin for JacobiOperatorPreconditioner
impl UnwindSafe for JacobiOperatorPreconditioner
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