Class xlifepp::StatusTestMaxIters#
-
template<class ScalarType, class MV, class OP>
class StatusTestMaxIters : public xlifepp::StatusTest<ScalarType, MV, OP>#
-
Inheritence diagram for xlifepp::StatusTestMaxIters:
Collaboration diagram for xlifepp::StatusTestMaxIters:
A status test for testing the number of iterations.
xlifepp::StatusTestMaxIters will test true when an eigensolver has reached some number of iterations. Specifically, where maxIter is the parameter given to the status tester.
This status test also supports negation, so that it negates the need for a StatusTestMinIters status tester. In this way, all tests on the range of iterations can be constructed through the appropriate use of StatusTestMaxIters and StatusTestCombo.
Print methods
-
inline virtual std::ostream &print(std::ostream &os, int indent = 0) const#
-
Output formatted description of stopping test to output stream.
-
inline virtual PrintStream &print(PrintStream &os, int indent = 0) const#
-
Output formatted description of stopping test to output stream.
Constructors/destructors
-
inline StatusTestMaxIters(int maxIter, bool negate = false)#
-
Constructor.
-
inline virtual ~StatusTestMaxIters()#
-
Destructor.
Status methods
-
inline virtual TestStatus checkStatus(EigenSolver<ScalarType, MV, OP> *solver)#
-
Check status as defined by test.
- Returns:
-
TestStatus indicating whether the test passed or failed.
-
inline virtual TestStatus getStatus() const#
-
Return the result of the most recent checkStatus call.
-
inline virtual std::vector<int> whichVecs() const#
-
Get the indices for the vectors that passed the test.
-
inline virtual int howMany() const#
-
Get the number of vectors that passed the test.
Accessor methods
-
inline void setMaxIters(int maxIters)#
-
Set the maximum number of iterations.
Note
This also resets the test status to _undefined.
-
inline int getMaxIters()#
-
Get the maximum number of iterations.
-
inline void setNegate(bool negate)#
-
Set the negation policy for the status test.
Note
This also reset the test status to _undefined.
-
inline bool getNegate() const#
-
Get the negation policy for the status test.
Reset methods
-
inline virtual void reset()#
-
Informs the status test that it should reset its internal configuration to the uninitialized state.
The StatusTestMaxIters class has no internal state, so this call is equivalent to calling clearStatus(). eigenvalue problem. The status test may have information that pertains to a particular problem or solver state. The internal information will be reset back to the uninitialized state. The user specified information that the convergence test uses will remain.
-
inline virtual void clearStatus()#
-
Clears the results of the last status test.
This should be distinguished from the reset() method, as it only clears the cached result from the last status test, so that a call to getStatus() will return _undefined. This is necessary for the SEQOR and SEQAND tests in the StatusTestCombo class, which may short circuit and not evaluate all of the StatusTests contained in them.
-
inline virtual std::ostream &print(std::ostream &os, int indent = 0) const#