AbstractLinAlgPack::MatrixOpNonsingTester Class Reference

Testing class for MatrixOpNonsing interface. More...

#include <AbstractLinAlgPack_MatrixOpNonsingTester.hpp>

List of all members.

Public types

enum  ETestLevel { TEST_LEVEL_2_BLAS = 1, TEST_LEVEL_3_BLAS = 2 }
  More...
enum  EPrintTestLevel { PRINT_NONE = 0, PRINT_BASIC = 1, PRINT_MORE = 2, PRINT_ALL = 3 }
  More...

Set and access options

 STANDARD_MEMBER_COMPOSITION_MEMBERS (ETestLevel, test_level)
 Set the level of testing.
 STANDARD_MEMBER_COMPOSITION_MEMBERS (EPrintTestLevel, print_tests)
 Set the level of output produced durring tests.
 STANDARD_MEMBER_COMPOSITION_MEMBERS (bool, dump_all)
 Set whether vectors etc. are printed (warning, this may be a lot of output for larger systems).
 STANDARD_MEMBER_COMPOSITION_MEMBERS (bool, throw_exception)
 Set whether an exception that is thrown is thrown clear out of the testing function or not.
 STANDARD_MEMBER_COMPOSITION_MEMBERS (size_type, num_random_tests)
 Set the number of random test cases created.
 STANDARD_MEMBER_COMPOSITION_MEMBERS (value_type, warning_tol)
 Set the relative tolerance for numerical tests above which to print a warning.
 STANDARD_MEMBER_COMPOSITION_MEMBERS (value_type, error_tol)
 Set the relative tolerance for numerical tests above which to return false from the testing function.

Constructors / initializers

 MatrixOpNonsingTester (ETestLevel test_level=TEST_LEVEL_2_BLAS, EPrintTestLevel print_tests=PRINT_NONE, bool dump_all=false, bool throw_exception=true, size_type num_random_tests=1, value_type warning_tol=1e-14, value_type error_tol=1e-8)
 Constructor (default options).

Test MatrixOpNonsing

bool test_matrix (const MatrixOpNonsing &M, const char M_name[], std::ostream *out)
 Test a MatrixOpNonsing object.


Detailed Description

Testing class for MatrixOpNonsing interface.

This testing class is basically a unit tester for MatrixOpNonsing. The method test_matrix() runs several different tests to check that $ M M^{-1} \approx I $ and $ M^{-T} M^T \approx I $ using randomly generated vectors v and the methods MatrixNonsing::V_InvMtV() and MatrixOp::Vp_StMtV(). These test should only be performed, of course, on a fully initialized MatrixOpNonsing object.

The tests performed by this testing class are designed to allow some validation for even the larges systems and will produce various levels of output so as to be usefull in debugging.

ToDo: Finish documentation!

Definition at line 51 of file AbstractLinAlgPack_MatrixOpNonsingTester.hpp.


Member Enumeration Documentation

enum AbstractLinAlgPack::MatrixOpNonsingTester::ETestLevel

Enumerator:
TEST_LEVEL_2_BLAS  Test Level-2 BLAS operations only.
TEST_LEVEL_3_BLAS  Test Level-2 and Level-3 BLAS operations.

Definition at line 58 of file AbstractLinAlgPack_MatrixOpNonsingTester.hpp.

enum AbstractLinAlgPack::MatrixOpNonsingTester::EPrintTestLevel

Enumerator:
PRINT_NONE  Don't print anything.
PRINT_BASIC  Print only very basic info.
PRINT_MORE  Print greater detail about the tests.
PRINT_ALL  Print everything all the tests in great detail but output is independent of problem size.

Definition at line 63 of file AbstractLinAlgPack_MatrixOpNonsingTester.hpp.


Constructor & Destructor Documentation

AbstractLinAlgPack::MatrixOpNonsingTester::MatrixOpNonsingTester ( ETestLevel  test_level = TEST_LEVEL_2_BLAS,
EPrintTestLevel  print_tests = PRINT_NONE,
bool  dump_all = false,
bool  throw_exception = true,
size_type  num_random_tests = 1,
value_type  warning_tol = 1e-14,
value_type  error_tol = 1e-8 
)

Constructor (default options).

Definition at line 48 of file AbstractLinAlgPack_MatrixOpNonsingTester.cpp.


Member Function Documentation

AbstractLinAlgPack::MatrixOpNonsingTester::STANDARD_MEMBER_COMPOSITION_MEMBERS ( ETestLevel  ,
test_level   
)

Set the level of testing.

AbstractLinAlgPack::MatrixOpNonsingTester::STANDARD_MEMBER_COMPOSITION_MEMBERS ( EPrintTestLevel  ,
print_tests   
)

Set the level of output produced durring tests.

AbstractLinAlgPack::MatrixOpNonsingTester::STANDARD_MEMBER_COMPOSITION_MEMBERS ( bool  ,
dump_all   
)

Set whether vectors etc. are printed (warning, this may be a lot of output for larger systems).

AbstractLinAlgPack::MatrixOpNonsingTester::STANDARD_MEMBER_COMPOSITION_MEMBERS ( bool  ,
throw_exception   
)

Set whether an exception that is thrown is thrown clear out of the testing function or not.

AbstractLinAlgPack::MatrixOpNonsingTester::STANDARD_MEMBER_COMPOSITION_MEMBERS ( size_type  ,
num_random_tests   
)

Set the number of random test cases created.

AbstractLinAlgPack::MatrixOpNonsingTester::STANDARD_MEMBER_COMPOSITION_MEMBERS ( value_type  ,
warning_tol   
)

Set the relative tolerance for numerical tests above which to print a warning.

AbstractLinAlgPack::MatrixOpNonsingTester::STANDARD_MEMBER_COMPOSITION_MEMBERS ( value_type  ,
error_tol   
)

Set the relative tolerance for numerical tests above which to return false from the testing function.

bool AbstractLinAlgPack::MatrixOpNonsingTester::test_matrix ( const MatrixOpNonsing M,
const char  M_name[],
std::ostream *  out 
)

Test a MatrixOpNonsing object.

Parameters:
M [in] Matrix object being tested.
M_name [in] Name given to the matrix object to be used in outputting and error reporting (i.e. throwing an exception).
out [in/out] If out != NULL any and all output will be sent here. If out == NULL then no output will be produced.
Returns:
Returns true if all of the tests checked out and no unexpected exceptions were thrown.
The behavior of this method depends on a set of options and the input arguments.

Definition at line 66 of file AbstractLinAlgPack_MatrixOpNonsingTester.cpp.


The documentation for this class was generated from the following files:
Generated on Wed May 12 21:50:51 2010 for AbstractLinAlgPack: C++ Interfaces For Vectors, Matrices And Related Linear Algebra Objects by  doxygen 1.4.7