pounce_linsol/sym_solver.rs
1//! High-level symmetric linear-solver trait — port of
2//! `IpSymLinearSolver.hpp`.
3//!
4//! This is the algorithm-side abstraction (it takes a `SymMatrix` /
5//! `Vector` rather than raw triplet arrays). The concrete
6//! [`crate::SparseSymLinearSolverInterface`] backend is wrapped by
7//! `TSymLinearSolver` (Phase 5+, when `IpoptData` lands).
8//!
9//! Phase 4 only needs the trait surface so `pounce-hsl` can be
10//! compiled and tested against it. The `multi_solve` entry point
11//! lands in Phase 5 once the `SymMatrix`/`Vector` traits from Phase 2
12//! are connected to `IpoptData`.
13
14use pounce_common::types::Index;
15
16pub trait SymLinearSolver {
17 /// Most recent factorization's negative-eigenvalue count.
18 fn number_of_neg_evals(&self) -> Index;
19
20 /// Ask for a higher-quality next solve.
21 fn increase_quality(&mut self) -> bool;
22
23 /// Whether this solver reports inertia.
24 fn provides_inertia(&self) -> bool;
25}