Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Gss ¶
func Gss(fWrapped func(float64, bool) float64, a, b, tol float64, logger *log.Logger) (float64, float64)
Gss golden section search (recursive version) https://en.wikipedia.org/wiki/Golden-section_search https://github.com/pa-m/optimize/blob/master/gss.go ”' Golden section search, recursive. Given a function f with a single local minimum in the interval [a,b], gss returns a subset interval [c,d] that contains the minimum with d-c <= tol.
logger may be nil
example: >>> f = lambda x: (x-2)**2 >>> a = 1 >>> b = 5 >>> tol = 1e-5 >>> (c,d) = gssrec(f, a, b, tol) >>> print (c,d) (1.9999959837979107, 2.0000050911830893) ”'
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.