pub enum SolverSelection {
Auto,
Named(String),
}Expand description
How a linear solver is chosen for a system.
§Canonical solver names
Named carries one of the registered backend names below. Unknown names are
rejected with a structured SolverError — they never fall back.
| name | symmetry | definiteness | intended size | registered by default |
|---|---|---|---|---|
dense | any (general) | any | small | yes |
skyline_ldlt | symmetric only | SPD (verified) | medium/large | yes |
sparse_lu | any (general) | any | medium/large | yes |
cg | symmetric only | SPD (assumed) | large | yes |
iccg | symmetric only | SPD (assumed) | large | yes |
§Semantics
Auto: the registry analyses the matrix and picks a backend. It may substitute a different backend than any the caller had in mind.Named: the request is authoritative. The registry validates capabilities and returns an error if the backend cannot legally handle the matrix. It never substitutes another backend.
skyline_ldlt, cg and iccg require positive definiteness but perform
their own definiteness check during LinearSolver::factor (skyline rejects
a non-positive pivot; CG/ICCG report failure). They are therefore safe to
select on a symmetric matrix, but are never chosen by Auto for a matrix
whose SPD property is not established.
Variants§
Auto
Registry-based automatic selection (default).
Named(String)
Explicit backend request (canonical name, see type docs).
Implementations§
Source§impl SolverSelection
impl SolverSelection
Sourcepub fn skyline_ldlt() -> Self
pub fn skyline_ldlt() -> Self
Select the skyline LDL^T backend (symmetric SPD).
Sourcepub fn requested_name(&self) -> Option<&str>
pub fn requested_name(&self) -> Option<&str>
The explicitly requested name, or None for SolverSelection::Auto.
Trait Implementations§
Source§impl Clone for SolverSelection
impl Clone for SolverSelection
Source§impl Debug for SolverSelection
impl Debug for SolverSelection
Source§impl Default for SolverSelection
impl Default for SolverSelection
impl Eq for SolverSelection
Source§impl PartialEq for SolverSelection
impl PartialEq for SolverSelection
impl StructuralPartialEq for SolverSelection
Auto Trait Implementations§
impl Forget for SolverSelection
impl Freeze for SolverSelection
impl Move for SolverSelection
impl RefUnwindSafe for SolverSelection
impl Send for SolverSelection
impl Sync for SolverSelection
impl Unpin for SolverSelection
impl UnsafeUnpin for SolverSelection
impl UnwindSafe for SolverSelection
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