NLPInterfacePack::NLPTester Class Reference

Testing class for base NLP interface. More...

#include <NLPInterfacePack_NLPTester.hpp>

List of all members.

Public Member Functions

 STANDARD_MEMBER_COMPOSITION_MEMBERS (bool, print_all)
 Members for option print_all() (see Teuchos_StandardMemberCompositionMacros.hpp).
 STANDARD_MEMBER_COMPOSITION_MEMBERS (bool, throw_exception)
 Members for option throw_exception() (see Teuchos_StandardMemberCompositionMacros.hpp).
 NLPTester (bool print_all=false, bool throw_exception=true)
 Constructor (default options).
bool test_interface (NLP *nlp, const Vector &xo, bool print_all_warnings, std::ostream *out)
 Test the NLP interface as the given base point xo.


Detailed Description

Testing class for base NLP interface.

This class is little more than a unit tester for the NLP base interface. This class will call all of the NLP methods and print out quanities if asked to. This class simply validates the pre and post conditions for all of the methods. In that this class is useful.

Definition at line 47 of file NLPInterfacePack_NLPTester.hpp.


Constructor & Destructor Documentation

NLPInterfacePack::NLPTester::NLPTester ( bool  print_all = false,
bool  throw_exception = true 
)

Constructor (default options).

Definition at line 46 of file NLPInterfacePack_NLPTester.cpp.


Member Function Documentation

NLPInterfacePack::NLPTester::STANDARD_MEMBER_COMPOSITION_MEMBERS ( bool  ,
print_all   
)

Members for option print_all() (see Teuchos_StandardMemberCompositionMacros.hpp).

NLPInterfacePack::NLPTester::STANDARD_MEMBER_COMPOSITION_MEMBERS ( bool  ,
throw_exception   
)

Members for option throw_exception() (see Teuchos_StandardMemberCompositionMacros.hpp).

bool NLPInterfacePack::NLPTester::test_interface ( NLP nlp,
const Vector &  xo,
bool  print_all_warnings,
std::ostream *  out 
)

Test the NLP interface as the given base point xo.

Parameters:
nlp [in/out] The NLP object being tested. The pointers returned by nlp->get_f(), nlp->get_c() and nlp->get_h() will be preserved on output and will not be modified by this function.. The NLP must be initialized before input.
xo [in] Base point for the unknown variables to test the calcuation methods at.
print_all_warnings [in] Determines if warnings for all of the comparison tests are printed or not. Warning: may cause as much as O(this->n()) output.
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 the options print_all() and throw_exception() and the input arguments print_all_warnings and out.

Definition at line 53 of file NLPInterfacePack_NLPTester.cpp.


The documentation for this class was generated from the following files:
Generated on Wed May 12 21:31:55 2010 for NLPInterfacePack: C++ Interfaces and Implementation for Non-Linear Programs by  doxygen 1.4.7