pub struct SpaiPreconditioner<F> { /* private fields */ }
Expand description
Sparse Approximate Inverse (SPAI) preconditioner
This preconditioner computes a sparse approximate inverse M ≈ A^(-1) using a minimization approach: minimize ||I - AM||_F subject to sparsity constraints on M.
Implementations§
Source§impl<F: Float + NumAssign + Sum + Debug + 'static> SpaiPreconditioner<F>
impl<F: Float + NumAssign + Sum + Debug + 'static> SpaiPreconditioner<F>
Sourcepub fn new(matrix: &CsrMatrix<F>, options: SpaiOptions) -> SparseResult<Self>
pub fn new(matrix: &CsrMatrix<F>, options: SpaiOptions) -> SparseResult<Self>
Create a new SPAI preconditioner from a sparse matrix
Trait Implementations§
Source§impl<F: Float + NumAssign + Sum + Debug + 'static> LinearOperator<F> for SpaiPreconditioner<F>
impl<F: Float + NumAssign + Sum + Debug + 'static> LinearOperator<F> for SpaiPreconditioner<F>
Source§fn has_adjoint(&self) -> bool
fn has_adjoint(&self) -> bool
Check if the operator supports adjoint operations
Source§fn rmatvec(&self, x: &[F]) -> SparseResult<Vec<F>>
fn rmatvec(&self, x: &[F]) -> SparseResult<Vec<F>>
Apply the adjoint of the operator to a vector: y = A^H * x
Default implementation returns an error
Auto Trait Implementations§
impl<F> Freeze for SpaiPreconditioner<F>
impl<F> RefUnwindSafe for SpaiPreconditioner<F>where
F: RefUnwindSafe,
impl<F> Send for SpaiPreconditioner<F>where
F: Send,
impl<F> Sync for SpaiPreconditioner<F>where
F: Sync,
impl<F> Unpin for SpaiPreconditioner<F>where
F: Unpin,
impl<F> UnwindSafe for SpaiPreconditioner<F>where
F: 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
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