pub trait LinearSolver {
// Required methods
fn analyze(&mut self, pattern: &Pattern);
fn factor(
&mut self,
values: &[f64],
diag_gmin: f64,
) -> Result<(), LinalgError>;
fn solve_in_place(&mut self, rhs: &mut [f64]) -> Result<(), LinalgError>;
fn factor_complex(
&mut self,
re: &[f64],
im: &[f64],
) -> Result<(), LinalgError>;
fn solve_complex_in_place(
&mut self,
rhs_re: &mut [f64],
rhs_im: &mut [f64],
) -> Result<(), LinalgError>;
fn solve_complex_transposed_in_place(
&mut self,
rhs_re: &mut [f64],
rhs_im: &mut [f64],
) -> Result<(), LinalgError>;
fn det_complex(&mut self, re: &[f64], im: &[f64]) -> (Complex64, i32);
}Required Methods§
Sourcefn factor(&mut self, values: &[f64], diag_gmin: f64) -> Result<(), LinalgError>
fn factor(&mut self, values: &[f64], diag_gmin: f64) -> Result<(), LinalgError>
Factor with values (parallel to the pattern’s entries).
diag_gmin is added to every diagonal position present in
the pattern, exactly like the 3f5’s LoadGmin.
Sourcefn solve_in_place(&mut self, rhs: &mut [f64]) -> Result<(), LinalgError>
fn solve_in_place(&mut self, rhs: &mut [f64]) -> Result<(), LinalgError>
Solve A x = rhs, overwriting rhs with x.
Sourcefn factor_complex(&mut self, re: &[f64], im: &[f64]) -> Result<(), LinalgError>
fn factor_complex(&mut self, re: &[f64], im: &[f64]) -> Result<(), LinalgError>
Factor the complex matrix G + jB over the same pattern
(SMPcLUfac); re/im are parallel to the pattern entries.
Sourcefn solve_complex_in_place(
&mut self,
rhs_re: &mut [f64],
rhs_im: &mut [f64],
) -> Result<(), LinalgError>
fn solve_complex_in_place( &mut self, rhs_re: &mut [f64], rhs_im: &mut [f64], ) -> Result<(), LinalgError>
Solve the complex system in place (SMPcSolve).
Sourcefn solve_complex_transposed_in_place(
&mut self,
rhs_re: &mut [f64],
rhs_im: &mut [f64],
) -> Result<(), LinalgError>
fn solve_complex_transposed_in_place( &mut self, rhs_re: &mut [f64], rhs_im: &mut [f64], ) -> Result<(), LinalgError>
Solve the transposed complex system in place
(SMPcaSolve, the noise adjoint). Requires a prior
LinearSolver::factor_complex.
Sourcefn det_complex(&mut self, re: &[f64], im: &[f64]) -> (Complex64, i32)
fn det_complex(&mut self, re: &[f64], im: &[f64]) -> (Complex64, i32)
Determinant of the complex matrix G + jB as a base-2
mantissa/exponent pair (SMPcLUfac + SMPcDProd): the
mantissa is normalized so max(|re|,|im|) ∈ (0.5, 1] like
the 3f5’s C_NORM. A singular matrix returns a zero
mantissa — the pole-zero search treats that as a root.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".