pub trait LinearSolver<M: Matrix>: Default {
// Required methods
fn set_linearisation<C: LinearOp<V = M::V, T = M::T, M = M, C = M::C>>(
&mut self,
op: &C,
);
fn set_sparsity<C: LinearOp<V = M::V, T = M::T, M = M, C = M::C>>(
&mut self,
op: &C,
);
fn solve_in_place(&self, b: &mut M::V) -> Result<(), LaError>;
// Provided method
fn solve(&self, b: &M::V) -> Result<M::V, LaError> { ... }
}Expand description
A solver for the linear problem Ax = b, where A is a LinearOp.
Required Methods§
Sourcefn set_linearisation<C: LinearOp<V = M::V, T = M::T, M = M, C = M::C>>(
&mut self,
op: &C,
)
fn set_linearisation<C: LinearOp<V = M::V, T = M::T, M = M, C = M::C>>( &mut self, op: &C, )
Set the point at which the linear operator A is evaluated and factorise it.
The operator is assumed to have the same sparsity as that given to Self::set_sparsity.
Sourcefn set_sparsity<C: LinearOp<V = M::V, T = M::T, M = M, C = M::C>>(
&mut self,
op: &C,
)
fn set_sparsity<C: LinearOp<V = M::V, T = M::T, M = M, C = M::C>>( &mut self, op: &C, )
Set the sparsity of the problem to be solved, any previous problem is discarded.
Any internal state of the solver is reset. This function will normally set the sparsity pattern of the matrix to be solved.
fn solve_in_place(&self, b: &mut M::V) -> Result<(), LaError>
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".