pub struct OptimizedConjugateGradientSolver { /* private fields */ }Expand description
High-performance conjugate gradient solver with SIMD optimizations.
Implementations§
Source§impl OptimizedConjugateGradientSolver
impl OptimizedConjugateGradientSolver
Sourcepub fn new(config: OptimizedSolverConfig) -> Self
pub fn new(config: OptimizedSolverConfig) -> Self
Create a new optimized solver.
Sourcepub fn solve(
&mut self,
matrix: &OptimizedSparseMatrix,
b: &[Precision],
) -> Result<OptimizedSolverResult, String>
pub fn solve( &mut self, matrix: &OptimizedSparseMatrix, b: &[Precision], ) -> Result<OptimizedSolverResult, String>
Solve the linear system Ax = b using optimized conjugate gradient.
Sourcepub fn get_last_iteration_count(&self) -> usize
pub fn get_last_iteration_count(&self) -> usize
Get the last iteration count.
Sourcepub fn solve_with_callback<F>(
&mut self,
matrix: &OptimizedSparseMatrix,
b: &[Precision],
_chunk_size: usize,
_callback: F,
) -> Result<OptimizedSolverResult, String>where
F: FnMut(&OptimizedSolverStats),
pub fn solve_with_callback<F>(
&mut self,
matrix: &OptimizedSparseMatrix,
b: &[Precision],
_chunk_size: usize,
_callback: F,
) -> Result<OptimizedSolverResult, String>where
F: FnMut(&OptimizedSolverStats),
Solve with callback for streaming results.
Trait Implementations§
Source§impl Complexity for OptimizedConjugateGradientSolver
impl Complexity for OptimizedConjugateGradientSolver
Source§const CLASS: ComplexityClass = ComplexityClass::Linear
const CLASS: ComplexityClass = ComplexityClass::Linear
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).
Auto Trait Implementations§
impl Freeze for OptimizedConjugateGradientSolver
impl RefUnwindSafe for OptimizedConjugateGradientSolver
impl Send for OptimizedConjugateGradientSolver
impl Sync for OptimizedConjugateGradientSolver
impl Unpin for OptimizedConjugateGradientSolver
impl UnsafeUnpin for OptimizedConjugateGradientSolver
impl UnwindSafe for OptimizedConjugateGradientSolver
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