Class xlifepp::StatusTestOutput#

template<class ScalarType, class MV, class OP>
class StatusTestOutput : public xlifepp::StatusTest<ScalarType, MV, OP>#

Inheritence diagram for xlifepp::StatusTestOutput:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "2" [label="xlifepp::StatusTest< ScalarType, MV, OP >" tooltip="xlifepp::StatusTest< ScalarType, MV, OP >"] "1" [label="xlifepp::StatusTestOutput< ScalarType, MV, OP >" tooltip="xlifepp::StatusTestOutput< ScalarType, MV, OP >" fillcolor="#BFBFBF"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for xlifepp::StatusTestOutput:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "11" [label="CheckingPolicy< StoragePolicy< T >::StoredType >" tooltip="CheckingPolicy< StoragePolicy< T >::StoredType >"] "6" [label="CheckingPolicy< StoragePolicy< xlifepp::OutputManager< ScalarType > >::StoredType >" tooltip="CheckingPolicy< StoragePolicy< xlifepp::OutputManager< ScalarType > >::StoredType >"] "15" [label="CheckingPolicy< StoragePolicy< xlifepp::StatusTest< ScalarType, MV, OP > >::StoredType >" tooltip="CheckingPolicy< StoragePolicy< xlifepp::StatusTest< ScalarType, MV, OP > >::StoredType >"] "7" [label="ConversionPolicy" tooltip="ConversionPolicy"] "10" [label="OwnershipPolicy< StoragePolicy< T >::InitPointerType >" tooltip="OwnershipPolicy< StoragePolicy< T >::InitPointerType >"] "5" [label="OwnershipPolicy< StoragePolicy< xlifepp::OutputManager< ScalarType > >::InitPointerType >" tooltip="OwnershipPolicy< StoragePolicy< xlifepp::OutputManager< ScalarType > >::InitPointerType >"] "14" [label="OwnershipPolicy< StoragePolicy< xlifepp::StatusTest< ScalarType, MV, OP > >::InitPointerType >" tooltip="OwnershipPolicy< StoragePolicy< xlifepp::StatusTest< ScalarType, MV, OP > >::InitPointerType >"] "3" [label="xlifepp::SmartPtr< xlifepp::OutputManager< ScalarType > >" tooltip="xlifepp::SmartPtr< xlifepp::OutputManager< ScalarType > >"] "12" [label="xlifepp::SmartPtr< xlifepp::StatusTest< ScalarType, MV, OP > >" tooltip="xlifepp::SmartPtr< xlifepp::StatusTest< ScalarType, MV, OP > >"] "9" [label="StoragePolicy< T >" tooltip="StoragePolicy< T >"] "4" [label="StoragePolicy< xlifepp::OutputManager< ScalarType > >" tooltip="StoragePolicy< xlifepp::OutputManager< ScalarType > >"] "13" [label="StoragePolicy< xlifepp::StatusTest< ScalarType, MV, OP > >" tooltip="StoragePolicy< xlifepp::StatusTest< ScalarType, MV, OP > >"] "8" [label="xlifepp::SmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy, ConstnessPolicy >" tooltip="xlifepp::SmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy, ConstnessPolicy >"] "2" [label="xlifepp::StatusTest< ScalarType, MV, OP >" tooltip="xlifepp::StatusTest< ScalarType, MV, OP >"] "1" [label="xlifepp::StatusTestOutput< ScalarType, MV, OP >" tooltip="xlifepp::StatusTestOutput< ScalarType, MV, OP >" fillcolor="#BFBFBF"] "3" -> "4" [dir=forward tooltip="public-inheritance"] "3" -> "5" [dir=forward tooltip="public-inheritance"] "3" -> "6" [dir=forward tooltip="public-inheritance"] "3" -> "7" [dir=forward tooltip="public-inheritance"] "3" -> "8" [dir=forward tooltip="template-instance"] "12" -> "13" [dir=forward tooltip="public-inheritance"] "12" -> "14" [dir=forward tooltip="public-inheritance"] "12" -> "15" [dir=forward tooltip="public-inheritance"] "12" -> "7" [dir=forward tooltip="public-inheritance"] "12" -> "8" [dir=forward tooltip="template-instance"] "8" -> "9" [dir=forward tooltip="public-inheritance"] "8" -> "10" [dir=forward tooltip="public-inheritance"] "8" -> "11" [dir=forward tooltip="public-inheritance"] "8" -> "7" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "1" -> "3" [dir=forward tooltip="usage"] "1" -> "12" [dir=forward tooltip="usage"] }

A special StatusTest for printing other status tests.

StatusTestOutput is a wrapper around another StatusTest that calls StatusTest::print() on the underlying object on calls to StatusTestOutput::checkStatus(). The frequency and occasion of the printing can be dictated according to some parameters passed to StatusTestOutput::StatusTestOutput().

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 StatusTestOutput(const SmartPtr<OutputManager<ScalarType>> &printer, SmartPtr<StatusTest<ScalarType, MV, OP>> test, int mod = 1, int printStates = _passed)#

Constructor.

The StatusTestOutput requires an OutputManager for printing the underlying StatusTest on calls to checkStatus(), as well as an underlying StatusTest.

StatusTestOutput can be initialized with a null pointer for argument test. However, calling checkStatus() with a null child pointer will result in a StatusTestError exception being thrown. See checkStatus() for more information.

The last two parameters, described below, in addition to the verbosity level of the OutputManager, control when printing is called. When both the mod criterion and the printStates criterion are satisfied, the status test will be printed to the OutputManager with MsgType of _statusTestDetailsEigen.

Parameters:
  • mod[in] A positive number describes how often the output should be printed. On every call to checkStatus(), an internal counter is incremented. Printing may only occur when this counter is congruent to zero modulo mod. Default: 1 (attempt to print on every call to checkStatus())

  • printStates[in] A combination of TestStatus values for which the output may be printed. Default: _passed (attempt to print whenever checkStatus() will return _passed)

  • printer – dedicated to print the underlying StatusTest

  • test – child pointer

inline virtual ~StatusTestOutput()#

Destructor.

Status methods

inline virtual TestStatus checkStatus(EigenSolver<ScalarType, MV, OP> *solver)#

Check and return status of underlying StatusTest.

This method calls checkStatus() on the StatusTest object passed in the constructor. If appropriate, the method will follow this call with a call to print() on the underlying object, using the OutputManager passed via the constructor with verbosity level _statusTestDetailsEigen.

The internal counter will be incremented during this call, but only after performing the tests to decide whether or not to print the underlying StatusTest. This way, the very first call to checkStatus() following initialization or reset() will enable the underlying StatusTest to be printed, regardless of the mod parameter, as the current number of calls will be zero.

If the specified SmartPtr for the child class is _smPtrNull, then calling checkStatus() will result in a StatusTestError exception being thrown.

Returns:

TestStatus indicating whether the underlying test passed or failed.

inline virtual TestStatus getStatus() const#

Return the result of the most recent checkStatus call, or undefined if it has not been run.

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 setChild(SmartPtr<StatusTest<ScalarType, MV, OP>> test)#

Set child test.

Note

This also resets the test status to _undefined.

inline SmartPtr<StatusTest<ScalarType, MV, OP>> getChild() const#

Get child test.

Reset methods

inline virtual void reset()#

Informs the status test that it should reset its internal configuration to the uninitialized state.

This resets the cached state to an _undefined state and calls reset() on the underlying test. It also resets the counter for the number of calls to checkStatus().

inline virtual void clearStatus()#

Clears the results of the last status test. This resets the cached state to an _undefined state and calls clearStatus() on the underlying test.