def solve(f, Df, x): lmData = limitedMemory.LmData(x.shape[0], parameters.memory) return regularization.genericMonotone(lmData, updateLmData, calculateStep, f, Df, x)
def solve(f, Df, x): """Monotone L-BFGS algorithm with Armijo line search.""" lmData = limitedMemory.LmData(x.shape[0], parameters.memory) return linesearch.genericMonotone(lmData, updateLmData, inverseBFGS, armijo, f, Df, x)
def solveNonmonotone(f, Df, x): """Nonmonotone L-BFGS algorithm with Wolfe line search.""" lmData = limitedMemory.LmData(x.shape[0], parameters.memory) return linesearch.genericNonmonotone(lmData, updateLmData, inverseBFGS, wolfe, f, Df, x)