Back to Eqiora docs Skip to main content

LinearSolverBackend

Trait LinearSolverBackend 

pub trait LinearSolverBackend: Debug + Sync {
    // Required methods
    fn provider(&self) -> SolverProvider;
    fn capabilities(&self) -> SolverCapabilities;
    fn solve_with_execution(
        &self,
        problem: &LinearProblem<'_>,
        plan: SolverPlan,
        execution: &dyn ReplicatedLinearExecution,
    ) -> Result<LinearSolution, Diagnostic>;

    // Provided methods
    fn id(&self) -> BackendId { ... }
    fn solve(
        &self,
        problem: &LinearProblem<'_>,
        plan: SolverPlan,
    ) -> Result<LinearSolution, Diagnostic> { ... }
}
Description

Backend-neutral solver execution boundary.

Required Methods§

fn provider(&self) -> SolverProvider

Stable identity and declared release/dependency inventory of this provider.

fn capabilities(&self) -> SolverCapabilities

Exact numerical policy admitted by this adapter.

fn solve_with_execution( &self, problem: &LinearProblem<'_>, plan: SolverPlan, execution: &dyn ReplicatedLinearExecution, ) -> Result<LinearSolution, Diagnostic>

Solve through one explicit replicated-vector execution.

Backends must consume the execution or reject it before numerical work; they must not silently run elsewhere and rewrite provenance afterward.

§Errors

Returns a stable diagnostic for incompatible execution, unsupported policy, invalid operator behavior, breakdown, non-convergence, or true-residual rejection.

Provided Methods§

fn id(&self) -> BackendId

Stable adapter identity used in evidence and diagnostics.

fn solve( &self, problem: &LinearProblem<'_>, plan: SolverPlan, ) -> Result<LinearSolution, Diagnostic>

Solve one validated problem under the exact plan.

§Errors

Returns a stable diagnostic for unsupported policy, invalid operator behavior, breakdown, non-convergence, or true-residual rejection.

Implementors§