def compute_direction_newton(cls): optimize.initialize_newton() for ilcg in range(PAR.LCGMAX): m = loadnpy('m_lcg') g = problem.grad(m) savenpy('g_lcg', g) isdone = optimize.iterate_newton() if isdone: break
def evaluate_gradient(cls): m = loadnpy('m_new') f = problem.func(m) g = problem.grad(m) savetxt('f_new',f) savenpy('g_new',g)
def evaluate_gradient(cls): m = loadnpy('m_new') f = problem.func(m) g = problem.grad(m) savetxt('f_new', f) savenpy('g_new', g)