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