Skip to main content

KluSolver

Struct KluSolver 

Source
pub struct KluSolver { /* private fields */ }
Expand description

SuiteSparse KLU factorization for a fixed square CSC sparsity pattern.

Implementations§

Source§

impl KluSolver

Source

pub fn new( dim: usize, col_ptrs: &[usize], row_indices: &[usize], ) -> SparseResult<Self>

Analyze a square CSC sparsity pattern.

Source

pub fn from_csc<T>(matrix: &CscMatrix<T>) -> SparseResult<Self>

Analyze the sparsity pattern from a validated CSC matrix.

Source

pub fn factor(&mut self, values: &[f64]) -> SparseResult<()>

Source

pub fn refactor(&mut self, values: &[f64]) -> SparseResult<()>

Source

pub fn solve(&mut self, rhs: &mut [f64]) -> SparseResult<()>

Source

pub fn solve_transpose(&mut self, rhs: &mut [f64]) -> SparseResult<()>

Source

pub fn rcond(&self) -> f64

Source

pub fn solve_many(&mut self, rhs: &mut [f64], nrhs: usize) -> SparseResult<()>

Solve AX = B in-place for multiple RHS columns.

rhs must contain dim * nrhs values laid out column-major, so column j occupies rhs[j * dim .. (j + 1) * dim].

Trait Implementations§

Source§

impl Drop for KluSolver

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for KluSolver

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V