pub struct Ic0<I, T> { /* private fields */ }Expand description
Numeric IC(0) factor of a Hermitian positive-definite CSC matrix A.
Holds the L value buffer together with the symbolic structure and the
dense workspace used during refactorisation. After construction the
factor can be refactored against any matrix with the same lower-triangle
pattern — Ic0::refactorize performs zero heap allocations.
Implementations§
Source§impl<I: Index, T: ComplexField> Ic0<I, T>
impl<I: Index, T: ComplexField> Ic0<I, T>
Sourcepub fn new_with_symbolic(symbolic: SymbolicIc0<I>) -> Self
pub fn new_with_symbolic(symbolic: SymbolicIc0<I>) -> Self
Allocate the value buffer and dense workspace for a given symbolic factor.
The returned factor is not yet populated — call Ic0::refactorize
to fill it with values from a matrix matching symbolic’s pattern.
Sourcepub fn try_new(a: SparseColMatRef<'_, I, T>) -> Result<Self, Ic0Error>
pub fn try_new(a: SparseColMatRef<'_, I, T>) -> Result<Self, Ic0Error>
Build a fully populated IC(0) factor from a Hermitian PD CSC matrix A.
Only the lower triangle of A is consumed — values above the diagonal
are silently ignored. Allocates internally for the symbolic structure,
the L value buffer, and the dense workspace.
Sourcepub fn symbolic(&self) -> &SymbolicIc0<I>
pub fn symbolic(&self) -> &SymbolicIc0<I>
Borrow the symbolic factor.
Sourcepub fn refactorize(
&mut self,
a: SparseColMatRef<'_, I, T>,
) -> Result<(), Ic0Error>
pub fn refactorize( &mut self, a: SparseColMatRef<'_, I, T>, ) -> Result<(), Ic0Error>
Refactorise against a new matrix with the same sparsity pattern.
Performs zero heap allocations.
§Errors
Ic0Error::PatternMismatchifa’s shape or column lengths disagree with the symbolic structure, or if the diagonal entries land at unexpected positions.Ic0Error::NotPositiveDefiniteif a non-positive pivot is encountered (indicating the matrix is not positive definite, or that the IC(0) algorithm has broken down on a non-H-matrix input).
Sourcepub fn l_view(&self) -> SparseColMatRef<'_, I, T>
pub fn l_view(&self) -> SparseColMatRef<'_, I, T>
Construct a SparseColMatRef view over the L factor (lower
triangular, diagonal stored first in each column with the positive
real pivot value).
Trait Implementations§
Source§impl<I, T> BiLinOp<T> for Ic0<I, T>
impl<I, T> BiLinOp<T> for Ic0<I, T>
Source§fn transpose_apply_scratch(&self, _rhs_ncols: usize, _par: Par) -> StackReq
fn transpose_apply_scratch(&self, _rhs_ncols: usize, _par: Par) -> StackReq
self to a matrix with rhs_ncols columnsSource§impl<I, T> BiPrecond<T> for Ic0<I, T>
impl<I, T> BiPrecond<T> for Ic0<I, T>
Source§fn transpose_apply_in_place_scratch(
&self,
_rhs_ncols: usize,
_par: Par,
) -> StackReq
fn transpose_apply_in_place_scratch( &self, _rhs_ncols: usize, _par: Par, ) -> StackReq
self to a matrix with rhs_ncols columns in placeSource§impl<I, T> LinOp<T> for Ic0<I, T>
impl<I, T> LinOp<T> for Ic0<I, T>
Source§fn apply_scratch(&self, _rhs_ncols: usize, _par: Par) -> StackReq
fn apply_scratch(&self, _rhs_ncols: usize, _par: Par) -> StackReq
self or the conjugate
o self to a matrix with rhs_ncols columnsSource§impl<I, T> Precond<T> for Ic0<I, T>
impl<I, T> Precond<T> for Ic0<I, T>
Source§fn apply_in_place_scratch(&self, _rhs_ncols: usize, _par: Par) -> StackReq
fn apply_in_place_scratch(&self, _rhs_ncols: usize, _par: Par) -> StackReq
self or the conjugate
of self to a matrix with rhs_ncols columns in placeAuto Trait Implementations§
impl<I, T> Freeze for Ic0<I, T>
impl<I, T> RefUnwindSafe for Ic0<I, T>where
T: RefUnwindSafe,
I: RefUnwindSafe,
impl<I, T> Send for Ic0<I, T>
impl<I, T> Sync for Ic0<I, T>
impl<I, T> Unpin for Ic0<I, T>
impl<I, T> UnsafeUnpin for Ic0<I, T>
impl<I, T> UnwindSafe for Ic0<I, T>where
T: UnwindSafe,
I: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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>
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>
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