pub struct ShiftedDiagonalPreconditioner { /* private fields */ }Expand description
Diagonal preconditioner for the SHIFTED systems (A + tI) a rational
log-determinant plan solves.
The caller supplies the unshifted operator’s diagonal; the shift is added
per solve, exactly as it is added to the operator. That single fact is what
makes one diagonal serve the whole shift ladder: diag(A + tI) = diag(A) + t.
diagonal: None is the identity, i.e. the unpreconditioned iteration. On the
overcomplete arrow border the supplied diagonal is the shared block’s own —
the atom FIRING-COUNT distribution, orders of magnitude wide — and it is
exactly the spread that stalls an unpreconditioned CG (#2576).
Implementations§
Source§impl ShiftedDiagonalPreconditioner
impl ShiftedDiagonalPreconditioner
Sourcepub fn from_operator_diagonal(diagonal: &Array1<f64>) -> Self
pub fn from_operator_diagonal(diagonal: &Array1<f64>) -> Self
Build from the unshifted operator’s diagonal. A non-finite or
non-positive entry means there is no usable scale, and the identity is
returned rather than a fabricated one: the iteration is then exactly the
unpreconditioned one, which is still correct for SPD A.
pub fn identity() -> Self
Sourcepub fn is_identity(&self) -> bool
pub fn is_identity(&self) -> bool
Whether this preconditioner does anything.
Trait Implementations§
Source§impl Clone for ShiftedDiagonalPreconditioner
impl Clone for ShiftedDiagonalPreconditioner
Source§fn clone(&self) -> ShiftedDiagonalPreconditioner
fn clone(&self) -> ShiftedDiagonalPreconditioner
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ShiftedDiagonalPreconditioner
impl RefUnwindSafe for ShiftedDiagonalPreconditioner
impl Send for ShiftedDiagonalPreconditioner
impl Sync for ShiftedDiagonalPreconditioner
impl Unpin for ShiftedDiagonalPreconditioner
impl UnsafeUnpin for ShiftedDiagonalPreconditioner
impl UnwindSafe for ShiftedDiagonalPreconditioner
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.