Resets D space constructing full solutions as the new working set, removing instabilities from Q space, and clearing D space. More...
#include <DSpaceResetter.h>
Resets D space constructing full solutions as the new working set, removing instabilities from Q space, and clearing D space.
Resetting can happen over multiple iterations if size of the working set is less than the number of solutions. In such cases, D space is still cleared at the start, so only the first batch of solutions will be reproduced at that iteration with the other possibly showing larger errors than before. By the end of resetting, all previous solutions will be in the Q space and previous energies and residuals will be reproduced.
After resetting, the size of Q space can be reduced. The maximum size can be controlled via set_max_Qsize().
| Q |
Public Member Functions | |
| DSpaceResetter ()=default | |
| DSpaceResetter (std::size_t nreset, std::size_t max_Qsize) | |
| bool | do_reset (size_t iter, const subspace::Dimensions &dims) |
| Whether reset operation should be run. | |
| void | set_nreset (size_t i) |
| auto | get_nreset () const |
| void | set_max_Qsize (size_t i) |
| auto | get_max_Qsize () const |
| template<class R , class P , typename value_type , typename value_type_abs > | |
| std::vector< int > | run (const VecRef< R > &rparams, subspace::IXSpace< R, Q, P > &xspace, const subspace::Matrix< value_type > &solutions, const value_type_abs norm_thresh, const value_type_abs svd_thresh, ArrayHandlers< R, Q, P > &handlers, Logger &logger) |
| Run the reset operation. | |
Protected Attributes | |
| std::size_t | m_nreset = std::numeric_limits<std::size_t>::max() |
| reset D space every n iterations | |
| std::size_t | m_max_Qsize_after_reset |
| maximum size of Q space after reset | |
| std::list< Q > | solution_params |
| all current solutions that will be moved to the Q space | |
|
default |
|
inline |
|
inline |
Whether reset operation should be run.
|
inline |
|
inline |
|
inline |
Run the reset operation.
|
inline |
|
inline |
|
protected |
maximum size of Q space after reset
|
protected |
reset D space every n iterations
|
protected |
all current solutions that will be moved to the Q space