Anasazi
Version of the Day
|
A status test for testing the number of iterations. More...
#include <AnasaziStatusTestMaxIters.hpp>
Public Member Functions | |
Constructors/destructors | |
StatusTestMaxIters (int maxIter, bool negate=false) | |
Constructor. More... | |
virtual | ~StatusTestMaxIters () |
Destructor. More... | |
Status methods | |
TestStatus | checkStatus (Eigensolver< ScalarType, MV, OP > *solver) |
Check status as defined by test. More... | |
TestStatus | getStatus () const |
Return the result of the most recent checkStatus call. More... | |
std::vector< int > | whichVecs () const |
Get the indices for the vectors that passed the test. More... | |
int | howMany () const |
Get the number of vectors that passed the test. More... | |
Accessor methods | |
void | setMaxIters (int maxIters) |
Set the maximum number of iterations. More... | |
int | getMaxIters () |
Get the maximum number of iterations. More... | |
void | setNegate (bool negate) |
Set the negation policy for the status test. More... | |
bool | getNegate () const |
Get the negation policy for the status test. More... | |
Reset methods | |
void | reset () |
Informs the status test that it should reset its internal configuration to the uninitialized state. More... | |
void | clearStatus () |
Clears the results of the last status test. More... | |
Print methods | |
std::ostream & | print (std::ostream &os, int indent=0) const |
Output formatted description of stopping test to output stream. More... | |
![]() | |
StatusTest () | |
Constructor. More... | |
virtual | ~StatusTest () |
Destructor. More... | |
A status test for testing the number of iterations.
Anasazi::StatusTestMaxIters will test true when an eigensolver has reached some number of iterations. Specifically,
{ Passed, if solver->getNumIters() >= maxIter status(solver) = { { Failed, if solver->getNumIters() < maxIter
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.
Definition at line 64 of file AnasaziStatusTestMaxIters.hpp.
|
inline |
Constructor.
Definition at line 71 of file AnasaziStatusTestMaxIters.hpp.
|
inlinevirtual |
Destructor.
Definition at line 76 of file AnasaziStatusTestMaxIters.hpp.
|
inlinevirtual |
Check status as defined by test.
Implements Anasazi::StatusTest< ScalarType, MV, OP >.
Definition at line 85 of file AnasaziStatusTestMaxIters.hpp.
|
inlinevirtual |
Return the result of the most recent checkStatus call.
Implements Anasazi::StatusTest< ScalarType, MV, OP >.
Definition at line 95 of file AnasaziStatusTestMaxIters.hpp.
|
inlinevirtual |
Get the indices for the vectors that passed the test.
Implements Anasazi::StatusTest< ScalarType, MV, OP >.
Definition at line 100 of file AnasaziStatusTestMaxIters.hpp.
|
inlinevirtual |
Get the number of vectors that passed the test.
Implements Anasazi::StatusTest< ScalarType, MV, OP >.
Definition at line 105 of file AnasaziStatusTestMaxIters.hpp.
|
inline |
Set the maximum number of iterations.
Definition at line 117 of file AnasaziStatusTestMaxIters.hpp.
|
inline |
Get the maximum number of iterations.
Definition at line 123 of file AnasaziStatusTestMaxIters.hpp.
|
inline |
Set the negation policy for the status test.
Definition at line 128 of file AnasaziStatusTestMaxIters.hpp.
|
inline |
Get the negation policy for the status test.
Definition at line 134 of file AnasaziStatusTestMaxIters.hpp.
|
inlinevirtual |
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.
Implements Anasazi::StatusTest< ScalarType, MV, OP >.
Definition at line 148 of file AnasaziStatusTestMaxIters.hpp.
|
inlinevirtual |
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.
Implements Anasazi::StatusTest< ScalarType, MV, OP >.
Definition at line 158 of file AnasaziStatusTestMaxIters.hpp.
|
inlinevirtual |
Output formatted description of stopping test to output stream.
Implements Anasazi::StatusTest< ScalarType, MV, OP >.
Definition at line 168 of file AnasaziStatusTestMaxIters.hpp.