#include <quala/anderson-acceleration.hpp>
Anderson Acceleration.
Algorithm for accelerating fixed-point iterations for finding fixed points of a function \( g \), i.e. \( g(x^\star) = x^\star \), or equivalently, roots of the residual \( r(x) \triangleq g(x) - x \).
Definition at line 33 of file anderson-acceleration.hpp.
Collaboration diagram for AndersonAccel:Public Types | |
| using | Params = AndersonAccelParams |
Public Member Functions | |
| AndersonAccel (Params params) | |
| AndersonAccel (Params params, length_t n) | |
| void | resize (length_t n) |
| Change the problem dimension. More... | |
| void | initialize (crvec g_0, vec r_0) |
| Call this function on the first iteration to initialize the accelerator. More... | |
| void | compute (crvec gₖ, crvec rₖ, rvec xₖ_aa) |
| Compute the accelerated iterate \( x^k_\text{AA} \), given the function value at the current iterate \( g^k = g(x^k) \) and the corresponding residual \( r^k = g^k - x^k \). More... | |
| void | compute (crvec gₖ, vec &&rₖ, rvec xₖ_aa) |
| Compute the accelerated iterate \( x^k_\text{AA} \), given the function value at the current iterate \( g^k = g(x^k) \) and the corresponding residual \( r^k = g^k - x^k \). More... | |
| void | reset () |
| Reset the accelerator (but keep the last function value and residual, so calling initialize is not necessary). More... | |
| length_t | n () const |
| Get the problem dimension. More... | |
| length_t | history () const |
| Get the maximum number of stored columns. More... | |
| length_t | current_history () const |
| Get the number of columns currently stored in the buffer. More... | |
| const Params & | get_params () const |
| Get the parameters. More... | |
Private Attributes | |
| Params | params |
| LimitedMemoryQR | qr |
| mat | G |
| vec | rₗₐₛₜ |
| vec | γ_LS |
| bool | initialized = false |
| using Params = AndersonAccelParams |
Definition at line 35 of file anderson-acceleration.hpp.
|
inline |
| params | Parameters. |
Definition at line 39 of file anderson-acceleration.hpp.
|
inline |
| params | Parameters. |
| n | Problem dimension (size of the vectors). |
Definition at line 44 of file anderson-acceleration.hpp.
Here is the call graph for this function:
|
inline |
Change the problem dimension.
Flushes the history.
| n | Problem dimension (size of the vectors). |
Definition at line 49 of file anderson-acceleration.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:Call this function on the first iteration to initialize the accelerator.
Definition at line 59 of file anderson-acceleration.hpp.
Here is the call graph for this function:Compute the accelerated iterate \( x^k_\text{AA} \), given the function value at the current iterate \( g^k = g(x^k) \) and the corresponding residual \( r^k = g^k - x^k \).
Definition at line 71 of file anderson-acceleration.hpp.
Here is the call graph for this function:Compute the accelerated iterate \( x^k_\text{AA} \), given the function value at the current iterate \( g^k = g(x^k) \) and the corresponding residual \( r^k = g^k - x^k \).
Definition at line 81 of file anderson-acceleration.hpp.
Here is the call graph for this function:
|
inline |
Reset the accelerator (but keep the last function value and residual, so calling initialize is not necessary).
Definition at line 93 of file anderson-acceleration.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Get the problem dimension.
Definition at line 101 of file anderson-acceleration.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Get the maximum number of stored columns.
Definition at line 103 of file anderson-acceleration.hpp.
Here is the call graph for this function:
|
inline |
Get the number of columns currently stored in the buffer.
Definition at line 105 of file anderson-acceleration.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Get the parameters.
Definition at line 108 of file anderson-acceleration.hpp.
Here is the caller graph for this function:
|
private |
Definition at line 111 of file anderson-acceleration.hpp.
|
private |
Definition at line 112 of file anderson-acceleration.hpp.
|
private |
Definition at line 113 of file anderson-acceleration.hpp.
|
private |
Definition at line 114 of file anderson-acceleration.hpp.
|
private |
Definition at line 115 of file anderson-acceleration.hpp.
|
private |
Definition at line 116 of file anderson-acceleration.hpp.