Closed aatmdelissen closed 2 years ago
The taylor1 approximation now calculates delta_y each time the function is evaluated. This can be omitted if we calculate the 'constant' part first: g(x) = g0 + dfdy.dot(y(x) - y0) = (g0 - dfdy.dot(y0)) + dfdy.dot(y(x))
delta_y
g(x) = g0 + dfdy.dot(y(x) - y0) = (g0 - dfdy.dot(y0)) + dfdy.dot(y(x))
Probably will make the code a bit faster :)
Indeed, that's also how Svanberg has coded it; we can probably do the same for the Taylor2 expansion too.
There's a PR for that now
The taylor1 approximation now calculates
delta_y
each time the function is evaluated. This can be omitted if we calculate the 'constant' part first:g(x) = g0 + dfdy.dot(y(x) - y0) = (g0 - dfdy.dot(y0)) + dfdy.dot(y(x))
Probably will make the code a bit faster :)