pub trait Cache<T, const NX: usize, const NU: usize> {
// Required methods
fn update_active(&mut self, prim_residual: T, dual_residual: T) -> Option<T>;
fn get_active(&self) -> &SingleCache<T, NX, NU>;
}Required Methods§
Sourcefn update_active(&mut self, prim_residual: T, dual_residual: T) -> Option<T>
fn update_active(&mut self, prim_residual: T, dual_residual: T) -> Option<T>
Updates which cache is active by evaluating the primal and dual residuals.
Returns: A scalar (old_rho/new_rho) to be applied to constraint duals in case the cache changed
Sourcefn get_active(&self) -> &SingleCache<T, NX, NU>
fn get_active(&self) -> &SingleCache<T, NX, NU>
Get a reference to the currently active cache.