Commit a6d099d6 authored by Jakob Knollmüller's avatar Jakob Knollmüller
Browse files

RelaxedNewton implemented, QuasiNewtonMinimizer has to be changed in _get_descent_direction

parent 86e1eda4
Pipeline #9978 passed with stage
in 29 minutes and 53 seconds
# -*- coding: utf-8 -*-
from .quasi_newton_minimizer import QuasiNewtonMinimizer
class RelaxedNewton(QuasiNewtonMinimizer):
def _get_descend_direction(self, energy):
descend_direction = energy.curvature.inverse_times(energy.gradient)
norm = descend_direction.norm()
if norm != 1:
return descend_direction / -norm
else:
return descend_direction * -1
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