#include <pow.hh>
Inheritance diagram for RVLUmin::PowerMethod< Scalar >:
Public Member Functions | |
PowerMethod (Vector< Scalar > &x, AScalar &sig, LinearOp< Scalar > const &A, int nstep, AScalar tol, ostream &str) | |
Constructor parameters:. | |
void | run () |
int | getCount () |
Algorithm: stopping criterion based on an estimate of the relative residual , in which
is the largest eigenvalue of the normal operator and
is the current Rayleigh quotient. Since
is not available, this numerator is approximated by the residual norm, the denominator by
: thus the error estimator is
.
Parameters: The only two characteristic parameters required by this algorithm are the max number of steps permitted, and the stopping tolerance for the relative residual test. Reasonable values for these depend on the convergence rate, which is a function of the distribution of singular values. An isolated largest singular value (or group of singular values near the max) produces fastest convergence, with an elementary estimate showing dependence of the rate on the gap between largest and next-largest singular values (eg. Parlett, The Symmetric Eigenvalue Problem, SIAM, 1998). Thus, no general guidance may be given for selection of these parameters.
Other parameters supplied to the constructor are mutable references for the singular value and vector workspace, and a const reference for the operator. See constructor docs.
Typical use case: see functional test source.
Definition at line 181 of file pow.hh.
RVLUmin::PowerMethod< Scalar >::PowerMethod | ( | Vector< Scalar > & | x, | |
AScalar & | sig, | |||
LinearOp< Scalar > const & | A, | |||
int | nstep, | |||
AScalar | tol, | |||
ostream & | str | |||
) |
Constructor parameters:.
x | = initial singular vector estimate - mutable reference, updated on return | |
sig | = initial singular value estimate - mutable reference, updated on return | |
A | = linear operator for which singular pair is sought - const reference | |
nstep | = number of power method iterations permitted. Typical value = 50. | |
tol | = stopping threshold for error estimator. Typical value = 0.001 | |
str | = output stream on which to report progress of iteration |
void RVLUmin::PowerMethod< Scalar >::run | ( | ) | [virtual] |
Implements RVLAlg::Algorithm.
Definition at line 217 of file pow.hh.
References RVLAlg::CountTerminator::getCount(), RVLAlg::VectorCountingThresholdIterationTable< Scalar >::init(), and RVLAlg::LoopAlg::run().
int RVLUmin::PowerMethod< Scalar >::getCount | ( | ) |