#include <AnasaziStatusTestCombo.hpp>
Inheritance diagram for Anasazi::StatusTestCombo< ScalarType, MV, OP >:

Public Types | |
| OR | |
| AND | |
| SEQOR | |
| SEQAND | |
| enum | ComboType { OR, AND, SEQOR, SEQAND } |
| Enumerated type to list the types of StatusTestCombo combo types. More... | |
Public Member Functions | |
Constructors/destructors | |
| StatusTestCombo () | |
| Default constructor has no tests and initializes to ComboType OR. | |
| StatusTestCombo (ComboType type, Teuchos::Array< Teuchos::RCP< StatusTest< ScalarType, MV, OP > > > tests) | |
| Constructor specifying the ComboType and the tests. | |
| virtual | ~StatusTestCombo () |
| Destructor. | |
Status methods | |
| TestStatus | checkStatus (Eigensolver< ScalarType, MV, OP > *solver) |
| TestStatus | getStatus () const |
| Return the result of the most recent checkStatus call. | |
Accessor methods | |
| void | setComboType (ComboType type) |
| Set the maximum number of iterations. This also resets the test status to Undefined. | |
| ComboType | getComboType () const |
| Get the maximum number of iterations. | |
| void | setTests (Teuchos::Array< Teuchos::RCP< StatusTest< ScalarType, MV, OP > > > tests) |
| Set the tests This also resets the test status to Undefined. | |
| Teuchos::Array< Teuchos::RCP< StatusTest< ScalarType, MV, OP > > > | getTests () const |
| Get the tests. | |
| void | addTest (Teuchos::RCP< StatusTest< ScalarType, MV, OP > > test) |
| Add a test to the combination. | |
| void | removeTest (const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > &test) |
| Removes a test from the combination, if it exists in the tester. | |
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. | |
Test types include OR, AND, SEQOR and SEQAND. The OR and AND tests evaluate all of the tests, in the order they were passed to the StatusTestCombo. The SEQOR and SEQAND run only the tests necessary to determine the final outcome, short-circuiting on the first test that conclusively decides the outcome. More formally, SEQAND runs the tests in the order they were given to the StatusTestCombo class and stops after the first test that evaluates Failed. SEQOR run the tests in the order they were given to the StatusTestCombo class and stops after the first test that evaluates Passed.
Definition at line 62 of file AnasaziStatusTestCombo.hpp.
| enum Anasazi::StatusTestCombo::ComboType |
Enumerated type to list the types of StatusTestCombo combo types.
| OR | Logical OR which evaluates all tests |
| AND | Logical AND which evaluates all tests |
| SEQOR | Short-circuited logical OR |
| SEQAND | Short-circuited logical AND |
Definition at line 70 of file AnasaziStatusTestCombo.hpp.
| Anasazi::StatusTestCombo< ScalarType, MV, OP >::StatusTestCombo | ( | ) | [inline] |
Default constructor has no tests and initializes to ComboType OR.
Constructor
Definition at line 93 of file AnasaziStatusTestCombo.hpp.
| Anasazi::StatusTestCombo< ScalarType, MV, OP >::StatusTestCombo | ( | ComboType | type, | |
| Teuchos::Array< Teuchos::RCP< StatusTest< ScalarType, MV, OP > > > | tests | |||
| ) | [inline] |
Constructor specifying the ComboType and the tests.
Constructor
Definition at line 97 of file AnasaziStatusTestCombo.hpp.
| virtual Anasazi::StatusTestCombo< ScalarType, MV, OP >::~StatusTestCombo | ( | ) | [inline, virtual] |
| TestStatus Anasazi::StatusTestCombo< ScalarType, MV, OP >::checkStatus | ( | Eigensolver< ScalarType, MV, OP > * | solver | ) | [virtual] |
Check status as defined by test.
Implements Anasazi::StatusTest< ScalarType, MV, OP >.
Definition at line 216 of file AnasaziStatusTestCombo.hpp.
| TestStatus Anasazi::StatusTestCombo< 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 117 of file AnasaziStatusTestCombo.hpp.
| void Anasazi::StatusTestCombo< ScalarType, MV, OP >::setComboType | ( | ComboType | type | ) | [inline] |
Set the maximum number of iterations. This also resets the test status to Undefined.
Definition at line 128 of file AnasaziStatusTestCombo.hpp.
| ComboType Anasazi::StatusTestCombo< ScalarType, MV, OP >::getComboType | ( | ) | const [inline] |
| void Anasazi::StatusTestCombo< ScalarType, MV, OP >::setTests | ( | Teuchos::Array< Teuchos::RCP< StatusTest< ScalarType, MV, OP > > > | tests | ) | [inline] |
Set the tests This also resets the test status to Undefined.
Definition at line 139 of file AnasaziStatusTestCombo.hpp.
| Teuchos::Array<Teuchos::RCP<StatusTest<ScalarType,MV,OP> > > Anasazi::StatusTestCombo< ScalarType, MV, OP >::getTests | ( | ) | const [inline] |
| void Anasazi::StatusTestCombo< ScalarType, MV, OP >::addTest | ( | Teuchos::RCP< StatusTest< ScalarType, MV, OP > > | test | ) | [inline] |
Add a test to the combination.
This also resets the test status to Undefined.
Definition at line 151 of file AnasaziStatusTestCombo.hpp.
| void Anasazi::StatusTestCombo< ScalarType, MV, OP >::removeTest | ( | const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > & | test | ) |
Removes a test from the combination, if it exists in the tester.
This also resets the test status to Undefined, if a test was removed.
Definition at line 204 of file AnasaziStatusTestCombo.hpp.
| void Anasazi::StatusTestCombo< ScalarType, MV, OP >::reset | ( | ) | [virtual] |
Informs the status test that it should reset its internal configuration to the uninitialized state.
The StatusTestCombo class has no internal state, but children classes might, so this method will call reset() on all child status tests. It also resets the test status to Undefined.
Implements Anasazi::StatusTest< ScalarType, MV, OP >.
Definition at line 237 of file AnasaziStatusTestCombo.hpp.
| void Anasazi::StatusTestCombo< ScalarType, MV, OP >::clearStatus | ( | ) | [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 245 of file AnasaziStatusTestCombo.hpp.
| std::ostream & Anasazi::StatusTestCombo< ScalarType, MV, OP >::print | ( | std::ostream & | os, | |
| int | indent = 0 | |||
| ) | const [virtual] |
Output formatted description of stopping test to output stream.
Implements Anasazi::StatusTest< ScalarType, MV, OP >.
Definition at line 253 of file AnasaziStatusTestCombo.hpp.
1.4.7