#include <convergence_window.hpp>
Public Member Functions | |
| ConvergenceWindow (Real relative_tolerance, int window) | |
| bool | has_converged () const |
| const std::vector< Real > & | history () const |
| int | number_of_steps () const |
| std::vector< Real > | recent_history (int count=5) const |
The last count values, oldest first. | |
| std::string | recent_history_text (int count=5) const |
The last count values, oldest first, as "a, b, c" with six decimals each. | |
| void | record (Real value) |
| The objective at the end of one more step. | |
Static Public Member Functions | |
| static std::string | history_text (const std::vector< Real > &values) |
Definition at line 28 of file convergence_window.hpp.
|
inline |
Definition at line 30 of file convergence_window.hpp.
|
inline |
Whether the last window differences are all within the tolerance of the current value. Needs window + 1 values, so the first steps never count as converged.
Definition at line 54 of file convergence_window.hpp.
References q3::math::tolerances::relative_change_scale_floor.
Referenced by q3::SpreadMinimizer::run(), and q3::SubspaceDisentangler::run().
|
inline |
Definition at line 70 of file convergence_window.hpp.
|
inlinestatic |
values as "a, b, c" with six decimals each: the one form in which an error names the spreads it reached, in its prose and on its own line.
Definition at line 96 of file convergence_window.hpp.
Referenced by recent_history_text(), and q3::WannierDiagnosticError::spreads_text().
|
inline |
Definition at line 74 of file convergence_window.hpp.
|
inline |
The last count values, oldest first.
Definition at line 79 of file convergence_window.hpp.
Referenced by recent_history_text(), and q3::SubspaceDisentangler::run().
|
inline |
The last count values, oldest first, as "a, b, c" with six decimals each.
Definition at line 88 of file convergence_window.hpp.
References history_text(), and recent_history().
Referenced by q3::SubspaceDisentangler::run().
|
inline |
The objective at the end of one more step.
Definition at line 45 of file convergence_window.hpp.
Referenced by q3::SpreadMinimizer::run(), and q3::SubspaceDisentangler::run().