11use crate :: {
22 constraints,
33 core:: { panoc:: PANOCCache , AlgorithmEngine , Problem } ,
4- matrix_operations, numeric:: cast, FunctionCallResult , SolverError ,
4+ matrix_operations,
5+ numeric:: cast,
6+ FunctionCallResult , SolverError ,
57} ;
68use lbfgs:: LbfgsPrecision ;
79use num:: Float ;
@@ -210,8 +212,7 @@ where
210212 self . cache . lbfgs . reset ( ) ; // invalidate the L-BFGS buffer
211213
212214 // update L, sigma and gamma...
213- self . cache . lipschitz_constant =
214- self . cache . lipschitz_constant * cast :: < T > ( 2.0 ) ;
215+ self . cache . lipschitz_constant = self . cache . lipschitz_constant * cast :: < T > ( 2.0 ) ;
215216 self . cache . gamma = self . cache . gamma / cast :: < T > ( 2.0 ) ;
216217
217218 // recompute the half step...
@@ -226,8 +227,7 @@ where
226227 self . compute_fpr ( u_current) ;
227228 it_lipschitz_search += 1 ;
228229 }
229- self . cache . sigma = ( T :: one ( ) - gamma_l_coeff :: < T > ( ) )
230- / ( cast :: < T > ( 4.0 ) * self . cache . gamma ) ;
230+ self . cache . sigma = ( T :: one ( ) - gamma_l_coeff :: < T > ( ) ) / ( cast :: < T > ( 4.0 ) * self . cache . gamma ) ;
231231
232232 Ok ( ( ) )
233233 }
@@ -390,8 +390,7 @@ where
390390 self . cache_gradient_norm ( ) ;
391391 self . cache . gamma =
392392 gamma_l_coeff :: < T > ( ) / self . cache . lipschitz_constant . max ( min_l_estimate ( ) ) ;
393- self . cache . sigma = ( T :: one ( ) - gamma_l_coeff :: < T > ( ) )
394- / ( cast :: < T > ( 4.0 ) * self . cache . gamma ) ;
393+ self . cache . sigma = ( T :: one ( ) - gamma_l_coeff :: < T > ( ) ) / ( cast :: < T > ( 4.0 ) * self . cache . gamma ) ;
395394 self . gradient_step ( u_current) ; // updated self.cache.gradient_step
396395 self . half_step ( ) ; // updates self.cache.u_half_step
397396
0 commit comments