diff --git a/src/gradient_descent.rs b/src/gradient_descent.rs index 7283456..301a72c 100644 --- a/src/gradient_descent.rs +++ b/src/gradient_descent.rs @@ -44,7 +44,7 @@ pub(crate) fn gradient_descent(fn_function: &Function, fn_gr // Update energy and gradient fn_function(x, &g, &mut f, d); - fn_gradient(x, &mut g, &f, d); + fn_gradient(x, &mut *g, &f, d); eval += 1; let g_norm = unsafe { cblas::dnrm2(d, &g, 1) };