Quote:
I was thinking about supporting optimization of smooth functions without derivatives. Two features are likely to be introduced in the next versions of the library: a) symbolic differentiation for "simple" functions, and b) built-in differentiation using difference formulas. When I talk about symbolic differentiation, I mean something like
That will be good. In the mean time the Excel VBA Evaluate function can be used to do the same thing. An example can be seen, using the ALGLIB integration functions to carry out numerical integration of functions entered as text on the spreadsheet, at this blog post:
http://newtonexcelbach.wordpress.com/20 ... functions/The code that does the work is:
Code:
Do
' Replace the integration variable with the X value returned
' by the FState function
EStep = Replace(Func, IntA(1, 1), FState.X)
' Evaluate the resulting expression
FState.F = Evaluate(EStep)
' Return to ALGLIB iteration function
ItState = AutoGKIteration(FState)
Loop While ItState = True
' When ItState is false retrieve the results
Call AutoGKResults(FState, V, Rep)