fix: more refactoring
This commit is contained in:
@@ -154,7 +154,7 @@ impl LBFGS {
|
||||
g_converged || x_converged || state.counter_f_tol > self.successive_f_tol
|
||||
}
|
||||
|
||||
fn update_hessian<'a, X: Matrix>(&self, df: &'a DF<X>, state: &mut LBFGSState<X>) {
|
||||
fn update_hessian<'a, X: Matrix>(&self, _: &'a DF<X>, state: &mut LBFGSState<X>) {
|
||||
state.dg = state.x_df.sub(&state.x_df_prev);
|
||||
let rho_iteration = 1. / state.dx.vector_dot(&state.dg);
|
||||
if !rho_iteration.is_infinite() {
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
pub mod first_order;
|
||||
pub mod line_search;
|
||||
|
||||
use crate::linalg::Matrix;
|
||||
|
||||
pub type F<'a, X: Matrix> = dyn for<'b> Fn(&'b X) -> f64 + 'a;
|
||||
pub type DF<'a, X: Matrix> = dyn for<'b> Fn(&'b mut X, &'b X) + 'a;
|
||||
pub type F<'a, X> = dyn for<'b> Fn(&'b X) -> f64 + 'a;
|
||||
pub type DF<'a, X> = dyn for<'b> Fn(&'b mut X, &'b X) + 'a;
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub enum FunctionOrder {
|
||||
|
||||
Reference in New Issue
Block a user