Trees | Indices | Help |
|
---|
|
Quadratic and cubic interpolation method.
This file is part of the minfx optimisation library.
|
|||
|
|||
|
|||
|
|||
|
|
|||
__package__ =
|
Imports: sqrt
|
Cubic interpolation using f(a), f(b), g(a), and g(b). EquationsThe equations used are: f(a) = a'a**3 + b'a**2 + c'a + d' f(b) = a'b**3 + b'b**2 + c'b + d' g(a) = 3a'a**2 + 2b'a + c' g(b) = 3a'b**2 + 2b'b + c' InterpolationThe extrema are the roots of the quadratic equation: 3a'*alpha**2 + 2b'*alpha + c' = 0 The cubic interpolant is given by the formula: g(b) + beta2 - beta1 ac = b - (b - a) . --------------------- g(b) - g(a) + 2*beta2 where: f(a) - f(b) beta1 = g(a) + g(b) - 3 . ----------- a - b if a < b: beta2 = sqrt(beta1**2 - g(a).g(b)) else: beta2 = -sqrt(beta1**2 - g(a).g(b)) |
Cubic Extrapolation using f(a), f(b), g(a), and g(b). ExtrapolationThe extrema are the roots of the quadratic equation: 3a'*alpha**2 + 2b'*alpha + c' = 0 The cubic extrapolant is given by the formula: g(b) + beta2 - beta1 ac = b - (b - a) . --------------------- g(b) - g(a) + 2*beta2 where: f(a) - f(b) beta1 = g(a) + g(b) - 3 . ----------- a - b if a < b: beta2 = sqrt(max(0.0, beta1**2 - g(a).g(b))) else: beta2 = -sqrt(max(0.0, beta1**2 - g(a).g(b))) |
Quadratic interpolation using f(a), f(b), and g(a). The extremum of the quadratic is given by: 1 g(a) aq = a + - . ------------------------- 2 f(a) - f(b) - (a - b)g(a) |
Quadratic interpolation using g(a) and g(b). The extremum of the quadratic is given by: bg(a) - ag(b) aq = ------------- g(a) - g(b) |
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Apr 10 13:30:30 2013 | http://epydoc.sourceforge.net |