pub struct ComplexLinSolver<'a> {
pub actual: Box<dyn Send + ComplexLinSolTrait + 'a>,
}Expand description
Unifies the access to linear system solvers
Fields§
§actual: Box<dyn Send + ComplexLinSolTrait + 'a>Holds the actual implementation
Implementations§
Source§impl<'a> ComplexLinSolver<'a>
impl<'a> ComplexLinSolver<'a>
Sourcepub fn compute(
genie: Genie,
x: &mut ComplexVector,
mat: &ComplexCooMatrix,
rhs: &ComplexVector,
params: Option<LinSolParams>,
) -> Result<Self, StrError>
pub fn compute( genie: Genie, x: &mut ComplexVector, mat: &ComplexCooMatrix, rhs: &ComplexVector, params: Option<LinSolParams>, ) -> Result<Self, StrError>
Computes the solution of a complex linear system
Solves the linear system:
A · x = rhs
(m,n) (n) (m)§Output
x– the vector of unknown values with dimension equal to mat.ncol
§Input
genie– the actual implementation that does all the magicmat– the matrix representing the sparse coefficient matrix A (see Notes below)rhs– the right-hand side vector with know values an dimension equal to coo.nrowverbose– shows messages
§Notes
- For symmetric matrices,
MUMPSrequires crate::Sym::YesLower - For symmetric matrices,
UMFPACKrequires crate::Sym::YesFull - This function calls the actual implementation (genie) via the functions
factorize, andsolve. - This function is best for a single-use, whereas the actual solver should be considered for a recurrent use (e.g., inside a loop).
Auto Trait Implementations§
impl<'a> Freeze for ComplexLinSolver<'a>
impl<'a> !RefUnwindSafe for ComplexLinSolver<'a>
impl<'a> Send for ComplexLinSolver<'a>
impl<'a> !Sync for ComplexLinSolver<'a>
impl<'a> Unpin for ComplexLinSolver<'a>
impl<'a> !UnwindSafe for ComplexLinSolver<'a>
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