pub struct NeumannPreconditioner { /* private fields */ }Expand description
Neumann series preconditioner.
Approximates A^{-1} by the truncated Neumann series:
M^{-1} = alpha * sum_{k=0}^{d} (I - alpha * A)^k
Convergent when ||I - alpha * A|| < 1. The scaling alpha is chosen
automatically as 1 / ||A||_inf (infinity norm).
Implementations§
Source§impl NeumannPreconditioner
impl NeumannPreconditioner
Sourcepub fn from_csr(
csr: &CsrMatrix<f64>,
degree: usize,
alpha: Option<f64>,
) -> SparseResult<Self>
pub fn from_csr( csr: &CsrMatrix<f64>, degree: usize, alpha: Option<f64>, ) -> SparseResult<Self>
Build a Neumann series preconditioner from a CSR matrix.
§Arguments
csr- The sparse matrix in CSR format (should be well-conditioned).degree- Number of terms in the Neumann series (1-10 typical).alpha- Scaling factor. PassNonefor automatic estimation.
Auto Trait Implementations§
impl Freeze for NeumannPreconditioner
impl RefUnwindSafe for NeumannPreconditioner
impl Send for NeumannPreconditioner
impl Sync for NeumannPreconditioner
impl Unpin for NeumannPreconditioner
impl UnsafeUnpin for NeumannPreconditioner
impl UnwindSafe for NeumannPreconditioner
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more