[][src]Struct sparse21::System

pub struct System { /* fields omitted */ }

Sparse Matrix System

Represents a linear system of the form Ax=b

Methods

impl System[src]

pub fn split(self) -> (Matrix, Vec<f64>)[src]

Splits a System into a two-tuple of self.matrix and self.rhs. Nothing is copied; self is consumed in the process.

pub fn solve(self) -> Result<Vec<f64>, &'static str>[src]

Solve the system Ax=b, where:

  • A is self.matrix
  • b is self.rhs
  • x is the return value.

Returns a Result containing the Vec<f64> representing x if successful. Returns an Err if unsuccessful.

Performs LU factorization, forward and backward substitution.

pub fn from_file(filename: &Path) -> Result<System, Box<dyn Error>>[src]

Read a System from file

Auto Trait Implementations

impl RefUnwindSafe for System

impl Send for System

impl Sync for System

impl Unpin for System

impl UnwindSafe for System

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.