pub struct NeumannSolver { /* private fields */ }Expand description
Neumann series solver implementation.
Solves systems of the form Ax = b by reformulating as (I - M)x = D^(-1)b where M = I - D^(-1)A and D is the diagonal of A.
The solution is computed using the Neumann series: x = (I - M)^(-1) D^(-1) b = Σ_{k=0}^∞ M^k D^(-1) b
For diagonally dominant matrices, ||M|| < 1, ensuring convergence.
Implementations§
Source§impl NeumannSolver
impl NeumannSolver
Sourcepub fn high_precision() -> Self
pub fn high_precision() -> Self
Create a solver optimized for high precision.
Sourcepub fn with_adaptive_truncation(self, enable: bool) -> Self
pub fn with_adaptive_truncation(self, enable: bool) -> Self
Configure adaptive truncation.
Sourcepub fn with_power_caching(self, enable: bool) -> Self
pub fn with_power_caching(self, enable: bool) -> Self
Configure matrix power caching.
Trait Implementations§
Source§impl Clone for NeumannSolver
impl Clone for NeumannSolver
Source§fn clone(&self) -> NeumannSolver
fn clone(&self) -> NeumannSolver
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NeumannSolver
impl Debug for NeumannSolver
Source§impl SolverAlgorithm for NeumannSolver
impl SolverAlgorithm for NeumannSolver
Source§fn solve(
&self,
matrix: &dyn Matrix,
b: &[Precision],
options: &SolverOptions,
) -> Result<SolverResult>
fn solve( &self, matrix: &dyn Matrix, b: &[Precision], options: &SolverOptions, ) -> Result<SolverResult>
Custom solve implementation that provides matrix access to steps.
Source§type State = NeumannState
type State = NeumannState
Solver-specific state type
Source§fn initialize(
&self,
matrix: &dyn Matrix,
b: &[Precision],
options: &SolverOptions,
) -> Result<Self::State>
fn initialize( &self, matrix: &dyn Matrix, b: &[Precision], options: &SolverOptions, ) -> Result<Self::State>
Initialize the solver state for a given problem.
Source§fn step(&self, state: &mut Self::State) -> Result<StepResult>
fn step(&self, state: &mut Self::State) -> Result<StepResult>
Perform a single iteration step.
Source§fn is_converged(&self, state: &Self::State) -> bool
fn is_converged(&self, state: &Self::State) -> bool
Check if the current state meets convergence criteria.
Source§fn extract_solution(&self, state: &Self::State) -> Vec<Precision> ⓘ
fn extract_solution(&self, state: &Self::State) -> Vec<Precision> ⓘ
Extract the current solution from the state.
Source§fn update_rhs(
&self,
state: &mut Self::State,
delta_b: &[(usize, Precision)],
) -> Result<()>
fn update_rhs( &self, state: &mut Self::State, delta_b: &[(usize, Precision)], ) -> Result<()>
Update the right-hand side for incremental solving.
Source§fn algorithm_name(&self) -> &'static str
fn algorithm_name(&self) -> &'static str
Get the algorithm name for identification.
Auto Trait Implementations§
impl Freeze for NeumannSolver
impl RefUnwindSafe for NeumannSolver
impl Send for NeumannSolver
impl Sync for NeumannSolver
impl Unpin for NeumannSolver
impl UnwindSafe for NeumannSolver
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