pounce_algorithm/hess/
exact.rs1use crate::hess::r#trait::HessianUpdater;
7use crate::ipopt_cq::IpoptCqHandle;
8use crate::ipopt_data::IpoptDataHandle;
9
10pub struct ExactHessianUpdater;
11
12impl ExactHessianUpdater {
13 pub fn new() -> Self {
14 Self
15 }
16}
17
18impl Default for ExactHessianUpdater {
19 fn default() -> Self {
20 Self::new()
21 }
22}
23
24impl HessianUpdater for ExactHessianUpdater {
25 fn update_hessian(&mut self, data: &IpoptDataHandle, cq: &IpoptCqHandle) -> bool {
26 let w = cq.borrow().curr_exact_hessian();
27 data.borrow_mut().w = Some(w);
28 true
29 }
30}