#include <lsqr.hh>
Public Member Functions | |
LSQRAlg< Scalar > * | build (Vector< Scalar > &x, LinearOp< Scalar > const &A, Vector< Scalar > const &d, atype &rnorm, atype &nrnorm, ostream &str) const |
build method - see TRGNAlg specs | |
void | assign (atype _rtol, atype _nrtol, atype _Delta, int _maxcount, bool _verbose) |
post-construction initialization | |
void | assign (Table const &t) |
parameter table overload | |
void | assign (LSQRPolicyData< Scalar > const &s) |
data struct overload | |
LSQRPolicy (atype _rtol=numeric_limits< atype >::max(), atype _nrtol=numeric_limits< atype >::max(), atype _Delta=numeric_limits< atype >::max(), int _maxcount=0, bool _verbose=true) | |
main constructor - acts as default. | |
LSQRPolicy (LSQRPolicy< Scalar > const &p) | |
Public Attributes | |
atype | Delta |
only Delta need be changed repeatedly, as opposed to set post-construction. |
rtol = residual threshhold for convergence nrtol = normal residual (LS gradient) tolerance for convergence Delta = trust radius - truncate iteration when reached maxcount = max number of iterations permitted
Default values set to cause immediate return from LSQRAlg::run.
Other attributes are arguments of build method.
Conforms to specifications described in TRGNAlg docs.
Usage: use as policy type, i.e. class name as template parameter to TRGNAlg constructor. After construction of TRGNAlg, which IS a LSQRPolicy by inheritance, call the assign method on it to set rtol, nrtol, and maxcount, BEFORE calling TRGNAlg::run() - else you will get immediate termination, as intended.
Definition at line 465 of file lsqr.hh.
RVLUmin::LSQRPolicy< Scalar >::LSQRPolicy | ( | atype | _rtol = numeric_limits<atype>::max() , |
|
atype | _nrtol = numeric_limits<atype>::max() , |
|||
atype | _Delta = numeric_limits<atype>::max() , |
|||
int | _maxcount = 0 , |
|||
bool | _verbose = true | |||
) |
main constructor - acts as default.
Default values of parameters set to result in immediate return, no iteration. Note that policy design requires that default construction must be valid, and all run-time instance data be initiated post-construction, in this case by the assign function, to be called by drivers of user classes (subclassed from this and with this as template param).
RVLUmin::LSQRPolicy< Scalar >::LSQRPolicy | ( | LSQRPolicy< Scalar > const & | p | ) |
LSQRAlg<Scalar>* RVLUmin::LSQRPolicy< Scalar >::build | ( | Vector< Scalar > & | x, | |
LinearOp< Scalar > const & | A, | |||
Vector< Scalar > const & | d, | |||
atype & | rnorm, | |||
atype & | nrnorm, | |||
ostream & | str | |||
) | const |
build method - see TRGNAlg specs
x | - solution vector, initialize to zero on input, estimated solution on output | |
A | - Linear Operator of least squares problem | |
d | - data vector of least squares problem | |
rnorm | - reference to residual norm scalar, norm of RHS on input, of residual on output | |
nrnorm | - reference to normal residual norm scalar, norm of normal residual (least squares gradient) on input, updated to estimated solution on output | |
str | - verbose output stream |
Definition at line 489 of file lsqr.hh.
References RVLUmin::LSQRPolicy< Scalar >::Delta.
void RVLUmin::LSQRPolicy< Scalar >::assign | ( | atype | _rtol, | |
atype | _nrtol, | |||
atype | _Delta, | |||
int | _maxcount, | |||
bool | _verbose | |||
) |
post-construction initialization
_rtol | - residual norm stopping threshhold | |
_nrtol | - normal residual (LS gradient) norm stopping threshhold | |
_maxcount | - max number of permitted iterations |
Definition at line 506 of file lsqr.hh.
References RVLUmin::LSQRPolicy< Scalar >::Delta.
void RVLUmin::LSQRPolicy< Scalar >::assign | ( | Table const & | t | ) |
parameter table overload
Definition at line 511 of file lsqr.hh.
References RVLUmin::LSQRPolicy< Scalar >::Delta.
void RVLUmin::LSQRPolicy< Scalar >::assign | ( | LSQRPolicyData< Scalar > const & | s | ) |
data struct overload
Definition at line 520 of file lsqr.hh.
References RVLUmin::LSQRPolicyData< Scalar >::Delta, RVLUmin::LSQRPolicy< Scalar >::Delta, RVLUmin::LSQRPolicyData< Scalar >::maxcount, RVLUmin::LSQRPolicyData< Scalar >::nrtol, RVLUmin::LSQRPolicyData< Scalar >::rtol, and RVLUmin::LSQRPolicyData< Scalar >::verbose.
atype RVLUmin::LSQRPolicy< Scalar >::Delta [mutable] |
only Delta need be changed repeatedly, as opposed to set post-construction.
Simplest way to do this - make it public
Definition at line 532 of file lsqr.hh.
Referenced by RVLUmin::LSQRPolicy< Scalar >::assign(), and RVLUmin::LSQRPolicy< Scalar >::build().