11using namespace MATKIT;
297 tol = pow(Basics::machineEpsilon, 4.0/5.0);
LanczosInfo LanczosEigenSolver(Vector &eigVal, Matrix &eigVec, NEXT_VECTOR NextKrylovVector, mkIndex n, mkIndex neigWanted, const char eigPart[], LanczosOptions &opts)
Lanczos eigensolver, the most general form.
Vector(* NEXT_VECTOR)(const Vector &)
Definition laneig.h:434
LanczosEigenSolver() returns an instance of this class which gives the information of the Lanczos pro...
Definition laneig.h:320
Real reorthVectorRate
The value is reorthVectorCount divided by the number of vectors reorthogonalized by full reorthogonal...
Definition laneig.h:388
Real maxOrthLevelRatio
Maximum ratio of orthogonality level.
Definition laneig.h:404
mkIndex memoryForLanczosInBytes
Memory (in bytes) required for the Lanczos iterations.
Definition laneig.h:361
Real LanczosCpuTime
CPU time for the whole Lanczos procedure, including convergence check and getting eigenvectors (if re...
Definition laneig.h:344
Real maxRelativeEigenvalueError
Maximum relative eigenvalue error.
Definition laneig.h:357
bool allEigenvaluesCheckedConverged
allEigenvaluesCheckedConverged is true if all eigenvalues are checked converged.
Definition laneig.h:368
mkIndex numIter
Number of iterations performed in the Lanczos procedure.
Definition laneig.h:323
Real forNextKrylovVectorCpuTime
CPU time (in total) for obtaining the next Krylov vector in each iteration, e.g. matrix-vector produc...
Definition laneig.h:326
Real forEigenVectorsCpuTime
CPU time for obtaining eigenvectors, after the eigenvalues are obtained.
Definition laneig.h:335
mkIndex reorthVectorCount
Total number of vectors against which the reorthogonalization is performed.
Definition laneig.h:376
Real reorthogonalizationCpuTime
CPU time (in total) for partial or full reorthogonalization.
Definition laneig.h:329
mkIndex doubleReorthIterCount
Number of iterations where local reorthogonalization is performed.
Definition laneig.h:394
mkIndex localReorthIterCount
Number of iterations where reorthogonalization is doubled.
Definition laneig.h:391
Real minOrthLevelRatio
Minimum ratio of orthogonality level.
Definition laneig.h:413
Real maxEigenvalueError
Maximum eigenvalue error.
Definition laneig.h:351
mkIndex reorthIterCount
Number of iterations where reorthogonalization is performed.
Definition laneig.h:373
Real convergenceCheckCpuTime
CPU time (in total) for convergence check.
Definition laneig.h:332
An instance of this class, taken by LanczosEigenSolver(), is a collection of options for the Lanczos ...
Definition laneig.h:33
std::ostream * out
A pointer to an output stream for diagnostic information. By default, it points to std::cout.
Definition laneig.h:268
mkIndex maxIter
Maximum number of Lanczos iterations.
Definition laneig.h:59
mkIndex extraIter
Extra number of Lanczos iterations (default 100).
Definition laneig.h:87
bool checkReorth
Set checkReorth=true for checking whether semi-orthogonality is preserved with partial reorthogonaliz...
Definition laneig.h:199
Real localReorthGamma
Local reorthogonalization is performed if beta[j-1]<localReorthGamma*beta[j] or localReorthGamma>=1....
Definition laneig.h:155
mkIndex defaultMaxIterFactor
The default LanczosOptions::maxIter, if not set, is 500 plus LanczosOptions::defaultMaxIterFactor tim...
Definition laneig.h:102
int eigSort
A flag which indicates how to sort eigenvalues (default -1). The value should be no less than -2.
Definition laneig.h:252
Real eigHighCut
Eigenvalues smaller than eigHighCut in the upper end will not be computed.
Definition laneig.h:218
Real eigLowCut
Eigenvalues larger than eigLowCut in the lower end will not be computed.
Definition laneig.h:212
Real doubleReorthGamma
Reorthogonalization is doubled in the iterations with nrm < doubleReorthGamma*nrm_old,...
Definition laneig.h:143
int partialReorthStrategy
A flag to tell which partial reorthogonalization strategy is used. The value can be 0,...
Definition laneig.h:185
bool wantEigVec
This parameter tells whether eigenvectors are wanted or not (default true).
Definition laneig.h:41
LanczosOptions()
A default constructor to set default options.
Definition laneig.h:275
Vector v0
The initial Lanczos vector.
Definition laneig.h:113
int reorth
A flag to tell which reorthogonalization scheme is used (default 1). The value can be 0,...
Definition laneig.h:127
mkIndex minIter
Minimum number of Lanczos iterations.
Definition laneig.h:50
Real tol
Tolerance of eigenvalues, defined in the relative and average sense, for convergence check (default ,...
Definition laneig.h:105
mkIndex stride
The convergence is checked every ‘stride’ iterations (default 10).
Definition laneig.h:90
mkIndex defaultMinIterFactor
The default LanczosOptions::minIter, if not set, is LanczosOptions::defaultMinIterFactor times the nu...
Definition laneig.h:96
int disp
Diagnostic information display level (default 1). The value can be 0,1,2.
Definition laneig.h:265
std::ostream * err
A pointer to an output stream for error messages. By default, it points to std::cerr.
Definition laneig.h:271
Real memoryExpansionFactor
This parameter determines how much the memory should be expanded when the allocated memory is not suf...
Definition laneig.h:204