#include <cgnealg.hh>
Inheritance diagram for RVLUmin::CGNEStep< Scalar >:
Public Member Functions | |
CGNEStep (LinearOp< Scalar > const &_A, Vector< Scalar > &_x, Vector< Scalar > const &_b, atype &_rnorm, atype &_nrnorm) | |
void | run () |
Run a single step of the conjugate gradients for the normal equations. | |
~CGNEStep () | |
Protected Attributes | |
LinearOp< Scalar > const & | A |
Vector< Scalar > & | x |
Vector< Scalar > const & | b |
atype & | rnorm |
atype & | nrnorm |
Friends | |
class | CGNEAlg< Scalar > |
On construction, internal workspace allocated and initialized. Each step updates internal state of CGNEStep object. Since solution vector, residual norm, and normal residual norm are stored as mutable references to external objects, these external objects are updated as well.
IMPORTANT NOTE: this version of the algorithm assumes that the solution vector reference (internal data member x) refers to a zero vector on initialization. To accommodate nontrivial initial guess, modify the right-hand-side vector (argument _b) externally.
Solution vector (x), iteration count, residual norm, and normal residual (gradient) norm are all references to external objects, which may be monitored by appropriate terminators to build a LoopAlg out of this Algorithm.
See CGNEAlg for description of a fully functional algorithm class, combining this step with a Terminator to make a LoopAlg.
Definition at line 84 of file cgnealg.hh.
RVLUmin::CGNEStep< Scalar >::CGNEStep | ( | LinearOp< Scalar > const & | _A, | |
Vector< Scalar > & | _x, | |||
Vector< Scalar > const & | _b, | |||
atype & | _rnorm, | |||
atype & | _nrnorm | |||
) |
Definition at line 92 of file cgnealg.hh.
References RVLUmin::CGNEStep< Scalar >::A, RVLUmin::CGNEStep< Scalar >::b, RVLUmin::CGNEStep< Scalar >::nrnorm, and RVLUmin::CGNEStep< Scalar >::rnorm.
RVLUmin::CGNEStep< Scalar >::~CGNEStep | ( | ) |
Definition at line 160 of file cgnealg.hh.
void RVLUmin::CGNEStep< Scalar >::run | ( | ) | [virtual] |
Run a single step of the conjugate gradients for the normal equations.
Implements RVLAlg::Algorithm.
Definition at line 112 of file cgnealg.hh.
References RVLUmin::CGNEStep< Scalar >::A, RVLUmin::CGNEStep< Scalar >::nrnorm, RVLUmin::CGNEStep< Scalar >::rnorm, and RVLUmin::CGNEStep< Scalar >::x.
friend class CGNEAlg< Scalar > [friend] |
Definition at line 86 of file cgnealg.hh.
LinearOp<Scalar> const& RVLUmin::CGNEStep< Scalar >::A [protected] |
Definition at line 165 of file cgnealg.hh.
Referenced by RVLUmin::CGNEStep< Scalar >::CGNEStep(), and RVLUmin::CGNEStep< Scalar >::run().
Vector<Scalar>& RVLUmin::CGNEStep< Scalar >::x [protected] |
Definition at line 166 of file cgnealg.hh.
Referenced by RVLUmin::CGNEAlg< Scalar >::run(), and RVLUmin::CGNEStep< Scalar >::run().
Vector<Scalar> const& RVLUmin::CGNEStep< Scalar >::b [protected] |
atype& RVLUmin::CGNEStep< Scalar >::rnorm [protected] |
Definition at line 168 of file cgnealg.hh.
Referenced by RVLUmin::CGNEStep< Scalar >::CGNEStep(), and RVLUmin::CGNEStep< Scalar >::run().
atype& RVLUmin::CGNEStep< Scalar >::nrnorm [protected] |
Definition at line 169 of file cgnealg.hh.
Referenced by RVLUmin::CGNEStep< Scalar >::CGNEStep(), and RVLUmin::CGNEStep< Scalar >::run().