pub struct SublinearNeumannSolver { /* private fields */ }Expand description
Sublinear Neumann series solver
Implementations§
Source§impl SublinearNeumannSolver
impl SublinearNeumannSolver
Sourcepub fn new(config: SublinearConfig) -> Self
pub fn new(config: SublinearConfig) -> Self
Create a new sublinear Neumann solver
Sourcepub fn with_max_terms(self, max_terms: usize) -> Self
pub fn with_max_terms(self, max_terms: usize) -> Self
Create solver with custom term limit
Sourcepub fn solve_sublinear_guaranteed(
&self,
matrix: &dyn Matrix,
b: &[Precision],
) -> Result<SublinearNeumannResult>
pub fn solve_sublinear_guaranteed( &self, matrix: &dyn Matrix, b: &[Precision], ) -> Result<SublinearNeumannResult>
Solve with guaranteed O(log n) complexity
Algorithm:
- Verify matrix is diagonally dominant (required for convergence)
- Apply Johnson-Lindenstrauss dimension reduction: n → k = O(log n)
- Solve reduced system: (I - M_k)x_k = D_k^{-1}b_k using O(log k) terms
- Reconstruct solution in original space
- Apply Richardson extrapolation for accuracy
Total complexity: O(log n) matrix operations + O(n) dimension reduction = O(n) But for well-conditioned matrices, can achieve O(log n) through adaptive sampling
Trait Implementations§
Source§impl Clone for SublinearNeumannSolver
impl Clone for SublinearNeumannSolver
Source§fn clone(&self) -> SublinearNeumannSolver
fn clone(&self) -> SublinearNeumannSolver
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 moreSource§impl Complexity for SublinearNeumannSolver
impl Complexity for SublinearNeumannSolver
Source§const CLASS: ComplexityClass
const CLASS: ComplexityClass
Worst-case complexity class on a single-query call. For iterative
solvers this is the per-iter cost; the iteration count is bounded by
other configuration (max_iterations, tolerance, ef_construction).
Source§const DETAIL: &'static str = "O(log n) per single-entry query on diagonally-dominant systems via JL + recursive Neumann; \
O(n) base case at n ≤ base_case_threshold."
const DETAIL: &'static str = "O(log n) per single-entry query on diagonally-dominant systems via JL + recursive Neumann; \ O(n) base case at n ≤ base_case_threshold."
Optional human-readable detail for documentation / MCP tool schemas.
Defaults to the short label of
CLASS. Override when there’s a
non-obvious constant or k-bound.Source§impl Debug for SublinearNeumannSolver
impl Debug for SublinearNeumannSolver
Source§impl SublinearSolver for SublinearNeumannSolver
impl SublinearSolver for SublinearNeumannSolver
Source§fn verify_sublinear_conditions(
&self,
matrix: &dyn Matrix,
) -> Result<ComplexityBound>
fn verify_sublinear_conditions( &self, matrix: &dyn Matrix, ) -> Result<ComplexityBound>
Verify that the matrix satisfies conditions for sublinear complexity
Source§fn solve_sublinear(
&self,
matrix: &dyn Matrix,
b: &[Precision],
config: &SublinearConfig,
) -> Result<Vec<Precision>>
fn solve_sublinear( &self, matrix: &dyn Matrix, b: &[Precision], config: &SublinearConfig, ) -> Result<Vec<Precision>>
Solve with guaranteed sublinear complexity
Source§fn complexity_bound(&self) -> ComplexityBound
fn complexity_bound(&self) -> ComplexityBound
Get the actual complexity bound achieved
Auto Trait Implementations§
impl Freeze for SublinearNeumannSolver
impl RefUnwindSafe for SublinearNeumannSolver
impl Send for SublinearNeumannSolver
impl Sync for SublinearNeumannSolver
impl Unpin for SublinearNeumannSolver
impl UnsafeUnpin for SublinearNeumannSolver
impl UnwindSafe for SublinearNeumannSolver
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