pub struct System { /* private fields */ }Expand description
Sparse Matrix System
Represents a linear system of the form Ax=b
Implementations§
Source§impl System
impl System
Sourcepub fn split(self) -> (Matrix, Vec<Complex64>)
pub fn split(self) -> (Matrix, Vec<Complex64>)
Splits a System into a two-tuple of self.matrix and self.rhs.
Nothing is copied; self is consumed in the process.
Sourcepub fn solve(self) -> Result<Vec<Complex64>, &'static str>
pub fn solve(self) -> Result<Vec<Complex64>, &'static str>
Solve the system Ax=b, where:
Aisself.matrixbisself.rhsxis the return value.
Returns a Result containing the Vec<Complex64> representing x if successful.
Returns an Err if unsuccessful.
Performs LU factorization, forward and backward substitution.
Auto Trait Implementations§
impl Freeze for System
impl RefUnwindSafe for System
impl Send for System
impl Sync for System
impl Unpin for System
impl UnwindSafe for System
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