Sets the function evaluation routine for the line search
ls - the TaoLineSearch context
func - the objective function evaluation routine
ctx - the (optional) user-defined context for private data
Calling sequence of func#
x - input vector
f - function value
ctx (optional) user- defined context
Use this routine only if you want the line search objective evaluation routine to be different from the Tao’s objective evaluation routine. If you use this routine you must also set the line search gradient and/or function/gradient routine.
Some algorithms (lcl, gpcg) set their own objective routine for the line search, application programmers should be wary of overriding the default objective routine.