INTERFACE GradMinimizer; (* Multivariate function minimization by gradient following. Created 95/07/07 by C.H.Q.Forster and J.Stolfi *) IMPORT Minimizer, Integrator; TYPE T <: Public; (* An optimizer based on gradient descent. The "minimize" method will follow some downwards path starting at the initial guess, generally pointing away from the gradient, by integrating some set of differential equations of the form | | dx/dt = A(g(x), u) | du/dt = B(g(x), u) | where "u" is a set of internal variables and "A", "B" are suitable functions that depend on the "path" chosen. The path is followed by integrating the differential equations above with some ODE integration algorithm. *) Public = Minimizer.T OBJECT METHODS setPath(p: Path): T; (* Specifies the functions "A" and "B" that define the descent path. The "setSize" method must be called again after a "setPath". *) setIntegrator(i: Integrator.T): T; (* Specifies the numerical method used to follow the descent path. The integrator "i" doesn't need to be initialized, but the optimizer's "setSize" method must be called again after a "setIntegrator". *) END; TYPE Path <: PublicPath; PublicPath = OBJECT METHODS eqs(): TEXT; (* Prints the path-defining equations *) END; VAR (*CONST*) path: ARRAY [1..6] OF Path; END GradMinimizer.