Commit 73dabd0b authored by Theo Steininger's avatar Theo Steininger
Browse files

Refactored such that there is `one expression per line`.

parent 9eaa1b90
Pipeline #9994 passed with stage
in 33 minutes and 36 seconds
......@@ -5,7 +5,9 @@ from .quasi_newton_minimizer import QuasiNewtonMinimizer
class RelaxedNewton(QuasiNewtonMinimizer):
def _get_descend_direction(self, energy):
descend_direction = energy.curvature.inverse_times(energy.gradient)
gradient = energy.gradient
curvature = energy.curvature
descend_direction = curvature.inverse_times(gradient)
norm = descend_direction.norm()
if norm != 1:
return descend_direction / -norm
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment