pub struct IterativeRefinementLS {
pub max_refinement_steps: usize,
pub inner_tol: f64,
pub outer_tol: f64,
pub use_blendenpik: bool,
pub oversampling: f64,
pub seed: Option<u64>,
}Expand description
Iterative refinement for least-squares with a random preconditioner.
Combines Blendenpik/LSRN preconditioning with iterative refinement steps to achieve high-accuracy solutions even for ill-conditioned problems.
Algorithm:
- Compute initial solution x₀ using Blendenpik/LSRN
- Compute residual r = b - A x₀
- Solve the correction problem: x₁ = x₀ + δ where δ minimizes ‖A δ - r‖
- Repeat until residual tolerance is met
Fields§
§max_refinement_steps: usizeMaximum number of refinement steps
inner_tol: f64Convergence tolerance for each inner solve
outer_tol: f64Overall convergence tolerance
use_blendenpik: boolUse Blendenpik (true) or LSRN (false) as inner preconditioner
oversampling: f64Oversampling factor for the preconditioner
seed: Option<u64>Random seed
Implementations§
Source§impl IterativeRefinementLS
impl IterativeRefinementLS
Sourcepub fn with_max_steps(self, steps: usize) -> Self
pub fn with_max_steps(self, steps: usize) -> Self
Set the maximum number of refinement steps.
Sourcepub fn with_inner_tol(self, tol: f64) -> Self
pub fn with_inner_tol(self, tol: f64) -> Self
Set inner solver tolerance.
Sourcepub fn with_outer_tol(self, tol: f64) -> Self
pub fn with_outer_tol(self, tol: f64) -> Self
Set outer convergence tolerance.
Sourcepub fn with_oversampling(self, alpha: f64) -> Self
pub fn with_oversampling(self, alpha: f64) -> Self
Set oversampling factor.
Sourcepub fn solve(
&self,
a: &ArrayView2<'_, f64>,
b: &ArrayView1<'_, f64>,
) -> LinalgResult<RandomizedPrecondResult>
pub fn solve( &self, a: &ArrayView2<'_, f64>, b: &ArrayView1<'_, f64>, ) -> LinalgResult<RandomizedPrecondResult>
Solve min ‖A x - b‖ with iterative refinement.
Trait Implementations§
Source§impl Clone for IterativeRefinementLS
impl Clone for IterativeRefinementLS
Source§fn clone(&self) -> IterativeRefinementLS
fn clone(&self) -> IterativeRefinementLS
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for IterativeRefinementLS
impl RefUnwindSafe for IterativeRefinementLS
impl Send for IterativeRefinementLS
impl Sync for IterativeRefinementLS
impl Unpin for IterativeRefinementLS
impl UnsafeUnpin for IterativeRefinementLS
impl UnwindSafe for IterativeRefinementLS
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
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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