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