use crate::status::ESymSolverStatus;
use pounce_common::types::{Index, Number};
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum EMatrixFormat {
TripletFormat,
CsrFormat0Offset,
CsrFormat1Offset,
CsrFullFormat0Offset,
CsrFullFormat1Offset,
}
pub trait SparseSymLinearSolverInterface {
fn initialize_structure(
&mut self,
dim: Index,
nonzeros: Index,
ia: &[Index],
ja: &[Index],
) -> ESymSolverStatus;
fn values_array_mut(&mut self) -> &mut [Number];
#[allow(clippy::too_many_arguments)]
fn multi_solve(
&mut self,
new_matrix: bool,
ia: &[Index],
ja: &[Index],
nrhs: Index,
rhs_vals: &mut [Number],
check_neg_evals: bool,
number_of_neg_evals: Index,
) -> ESymSolverStatus;
fn number_of_neg_evals(&self) -> Index;
fn increase_quality(&mut self) -> bool;
fn provides_inertia(&self) -> bool;
fn matrix_format(&self) -> EMatrixFormat;
fn provides_degeneracy_detection(&self) -> bool {
false
}
fn determine_dependent_rows(
&mut self,
_ia: &[Index],
_ja: &[Index],
_c_deps: &mut Vec<Index>,
) -> ESymSolverStatus {
ESymSolverStatus::FatalError
}
}