use crate::ipopt_data::IpoptDataHandle;
use pounce_common::types::{Index, Number};
pub use pounce_common::pd_perturbation::{
DegenType, Deltas, PdPerturbationHandler, PerturbationSink, TrialStatus,
};
pub struct IpoptDataSink<'a>(pub &'a IpoptDataHandle);
impl PerturbationSink for IpoptDataSink<'_> {
fn append_info(&self, s: &str) {
self.0.borrow_mut().append_info_string(s);
}
fn set_regu_x(&self, v: Number) {
self.0.borrow_mut().info_regu_x = v;
}
fn iter_count(&self) -> Index {
self.0.borrow().iter_count
}
fn debug(&self, msg: &str) {
tracing::debug!(target: "pounce::linsol", "{msg}");
}
}