ConstrainedOptPack: C++ Tools for Constrained (and Unconstrained) Optimization  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
ConstrainedOptPack::VariableBoundsTester Class Reference

Tests that a set of variables are within their bounds. More...

#include <ConstrainedOptPack_VariableBoundsTester.hpp>

Public Member Functions

 STANDARD_MEMBER_COMPOSITION_MEMBERS (value_type, warning_tol)
 
 STANDARD_MEMBER_COMPOSITION_MEMBERS (value_type, error_tol)
 
 VariableBoundsTester (value_type warning_tol=1e-10, value_type error_tol=1e-5)
 
virtual ~VariableBoundsTester ()
 
virtual bool check_in_bounds (std::ostream *out, bool print_all_warnings, bool print_vectors, const Vector &xL, const char xL_name[], const Vector &xU, const char xU_name[], const Vector &x, const char x_name[])
 Check that the variables are within bounds. More...
 

Detailed Description

Tests that a set of variables are within their bounds.

  xL <= x <= xU

The relative error for each comparison is rel_err(i) = (xL(i)-x(i))/(1+||x||inf) or rel_err(i) = (x(i)-xU(i))/(1+||x||inf). If rel_err(i) >= error_tol, then the tests will be terminated immediately. All of the rel_err(i) >= warning_tol will be printed.

Definition at line 62 of file ConstrainedOptPack_VariableBoundsTester.hpp.

Constructor & Destructor Documentation

ConstrainedOptPack::VariableBoundsTester::VariableBoundsTester ( value_type  warning_tol = 1e-10,
value_type  error_tol = 1e-5 
)

Definition at line 51 of file ConstrainedOptPack_VariableBoundsTester.cpp.

virtual ConstrainedOptPack::VariableBoundsTester::~VariableBoundsTester ( )
inlinevirtual

Definition at line 78 of file ConstrainedOptPack_VariableBoundsTester.hpp.

Member Function Documentation

ConstrainedOptPack::VariableBoundsTester::STANDARD_MEMBER_COMPOSITION_MEMBERS ( value_type  ,
warning_tol   
)

ConstrainedOptPack::VariableBoundsTester::STANDARD_MEMBER_COMPOSITION_MEMBERS ( value_type  ,
error_tol   
)

bool ConstrainedOptPack::VariableBoundsTester::check_in_bounds ( std::ostream *  out,
bool  print_all_warnings,
bool  print_vectors,
const Vector &  xL,
const char  xL_name[],
const Vector &  xU,
const char  xU_name[],
const Vector &  x,
const char  x_name[] 
)
virtual

Check that the variables are within bounds.

Parameters
print_all_warnings[in] If true, then all errors greater than warning_tol will be printed.
xL[in] Sparse lower bound vector (xL.size()==x.size())
xL_name[in] The name of the vector xL (null terminated string).
xU[in] Sparse upper bound vector (xU.size()==x.size())
xU_name[in] The name of the vector xU (null terminated string).
x[in] Variable to test that it is in bounds.
x_name[in] The name of the vector x (null terminated string).
Returns
true if all of the errors are greater than the error tolerances, otherwise it returns false

Definition at line 59 of file ConstrainedOptPack_VariableBoundsTester.cpp.


The documentation for this class was generated from the following files: